about summary refs log tree commit diff
path: root/third_party/overlays
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-05-04T15·55+0200
committerProfpatsch <mail@profpatsch.de>2022-05-05T20·18+0000
commit12869cda7dae310ec3ab792873588cefd11f3306 (patch)
tree87d87ade39f85276742eace6174930b35653dc9c /third_party/overlays
parent2a6928fb4cde593c530c3dd49cb9f80126c8df42 (diff)
fix(third_party/overlays/dhall): fix dhall-nix attr key generation r/4010
Use the dhall/dhall-nix from nixpkgs, override with current master
plus one commit that fixes dhall-nix.

We might want switch back to dhall from nixpkgs for the dhall packages
instead of using the static binaries.

Change-Id: I76b900e85e1a9e9ef8d1512c15b830e3aa798baa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5523
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'third_party/overlays')
-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 74d2a999b90a..1cfb05ace829 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/eae7f64c4d6c70681e5a56c84198236930ba425e.tar.gz";
         sha256 = "1y2x15v8a679vlpxazjpibfwajp6zph60f8wjcm4xflbvazk0dx7";
       })
-      { 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;