diff --git a/flake.nix b/flake.nix index 1f79c0769..dac10436c 100644 --- a/flake.nix +++ b/flake.nix @@ -11,11 +11,24 @@ let perSystem = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; nixpkgsCleanFor = system: import nixpkgs { inherit system; }; + + # temporary fix for https://github.com/cdepillabout/stacklock2nix/issues/38 + stacklock2nix-patched = system: (nixpkgsCleanFor system).stdenvNoCC.mkDerivation { + name = "stacklock2nix-patched"; + src = stacklock2nix; + dontBuild = true; + patches = [ ./stacklock2nix.patch ]; + installPhase = '' + mkdir $out + cp -r nix/* $out/ + ''; + }; + nixpkgsFor = system: import nixpkgs { inherit system; overlays = - [ stacklock2nix.overlay self.overlay haskell-backend.overlays.z3 ]; + [ (import "${(stacklock2nix-patched system)}/overlay.nix") self.overlay haskell-backend.overlays.z3 ]; }; withZ3 = pkgs: pkg: exe: pkgs.stdenv.mkDerivation { diff --git a/stacklock2nix.patch b/stacklock2nix.patch new file mode 100644 index 000000000..9313f5fa7 --- /dev/null +++ b/stacklock2nix.patch @@ -0,0 +1,12 @@ +diff --git a/nix/build-support/stacklock2nix/default.nix b/nix/build-support/stacklock2nix/default.nix +index b13f246..116ca11 100644 +--- a/nix/build-support/stacklock2nix/default.nix ++++ b/nix/build-support/stacklock2nix/default.nix +@@ -380,6 +380,7 @@ let + url = haskPkgLock.git; + name = srcName; + rev = haskPkgLock.commit; ++ allRefs = true; + }; + src = + if haskPkgLock ? "subdir" then