about summary refs log tree commit diff
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-06-18T12·33+0200
committerProfpatsch <mail@profpatsch.de>2022-06-19T13·29+0000
commit786e515cb8e33c57e478b33db97ae5e83964892f (patch)
tree8474c560264b06a1baf77e3391d4b3ac3d83bff3
parentc2e67547b134c700e96a05422c43845330197c41 (diff)
chore(third_party/overlays/dhall): revert fix dhall-nix attr key ge… r/4245
Okay, we do need the bugfix again lol

This reverts commit b8c300f939f3b998fb5984eb2e62e7c97e4b5d03.

Change-Id: If85cf61f32e31f7f6041a1ae76b38eeb2c93a368
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5885
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
-rw-r--r--third_party/overlays/dhall/default.nix24
1 files changed, 20 insertions, 4 deletions
diff --git a/third_party/overlays/dhall/default.nix b/third_party/overlays/dhall/default.nix
index 0a18e8df9a..ecd566f18a 100644
--- a/third_party/overlays/dhall/default.nix
+++ b/third_party/overlays/dhall/default.nix
@@ -1,8 +1,17 @@
 { ... }:
 
-pkgs: _:
+self: super:
 
 let
+  dhall-source = subdir: pkg: super.haskell.lib.overrideSrc pkg {
+    src = "${super.fetchFromGitHub {
+      owner = "Profpatsch";
+      repo = "dhall-haskell";
+      rev = "fix-dhall-to-nix-key-encoding";
+      sha256 = "sha256-P4MmQfyQ7MC5Jbs1o/+AJX/kdps2CjeOrtdpK85Tg68=";
+    }}/${subdir}";
+  };
+
   # binary releases of dhall tools, since the build in nixpkgs is
   # broken most of the time. The binaries are also fully static
   # builds, instead of the half-static crap that nixpkgs produces.
@@ -12,15 +21,22 @@ let
         url = "https://github.com/justinwoo/easy-dhall-nix/archive/dce9acbb99776a7f1344db4751d6080380f76f57.tar.gz";
         sha256 = "0ckp6515gfvbxm08yyll87d9vg8sq2l21gwav2npzvwc3xz2lccf";
       })
-      { inherit pkgs; };
+      { inherit self; };
 in
 {
-  dhall = easy-dhall-nix.dhall-simple;
+  # TODO: this is to fix a bug in dhall-nix
+  haskellPackages = super.haskellPackages.override {
+    overrides = hsSelf: hsSuper: {
+      dhall = dhall-source "dhall" hsSuper.dhall;
+      dhall-nix = dhall-source "dhall-nix" hsSuper.dhall-nix;
+    };
+  };
+  # dhall = easy-dhall-nix.dhall-simple;
+  # dhall-nix = easy-dhall-nix.dhall-nix-simple;
   dhall-bash = easy-dhall-nix.dhall-bash-simple;
   dhall-docs = easy-dhall-nix.dhall-docs-simple;
   dhall-json = easy-dhall-nix.dhall-json-simple;
   dhall-lsp-server = easy-dhall-nix.dhall-lsp-simple;
-  dhall-nix = easy-dhall-nix.dhall-nix-simple;
   # not yet in dhall-simple
   # dhall-nixpkgs = easy-dhall-nix.dhall-nixpkgs-simple;
   dhall-yaml = easy-dhall-nix.dhall-yaml-simple;