Created
March 11, 2020 13:12
-
-
Save yorickvP/ce321fc98930d25de34074b4b36862bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/old-ghc-nix/default.nix b/compiler/old-ghc-nix/default.nix | |
index 7d8a396..228c329 100644 | |
--- a/compiler/old-ghc-nix/default.nix | |
+++ b/compiler/old-ghc-nix/default.nix | |
@@ -3,8 +3,8 @@ let | |
fetch = jsonFile: | |
with builtins; | |
let spec = fromJSON (readFile jsonFile); | |
- in pkgs.fetchgit { | |
+ in builtins.fetchGit { | |
name = "old-ghc-nix"; | |
- inherit (spec) sha256 url rev; | |
+ inherit (spec) url rev; | |
}; | |
in import (fetch ./old-ghc-nix.json) { inherit pkgs; } | |
diff --git a/compiler/old-ghc-nix/old-ghc-nix.json b/compiler/old-ghc-nix/old-ghc-nix.json | |
index bd0c63d..e408881 100644 | |
--- a/compiler/old-ghc-nix/old-ghc-nix.json | |
+++ b/compiler/old-ghc-nix/old-ghc-nix.json | |
@@ -1,7 +1,7 @@ | |
{ | |
"url": "https://github.com/angerman/old-ghc-nix", | |
- "rev": "ee5e7181f681522f075e01a1875228188b03cc8c", | |
- "date": "2019-12-08T20:24:29+08:00", | |
- "sha256": "0ywvyjvyw9vm0qbf0a7k6zpsrzcz5wa7y16rfcs3wfv36plj3qd5", | |
+ "rev": "bf640c1a3f55203bb7492a366c6492ff3c211332", | |
+ "date": "2020-02-27T19:53:36+08:00", | |
+ "sha256": "050g06911rpmvn66y5lmnszswz17flw3b979imdchc2apji6a1sm", | |
"fetchSubmodules": false | |
} | |
diff --git a/lib/materialize.nix b/lib/materialize.nix | |
index bbf5393..e2ddc46 100644 | |
--- a/lib/materialize.nix | |
+++ b/lib/materialize.nix | |
@@ -82,12 +82,10 @@ let | |
calculateUseAll = | |
# Skip right to expectedPath if it already exists | |
if materialized != null && builtins.pathExists materialized | |
- then runCommand name hashArgs '' | |
- cp -r ${materialized} $out | |
- # Make sure output files can be removed from the sandbox | |
- chmod -R +w $out | |
- '' | |
- else calculateUseHash; | |
+ then derivation // { outPath = builtins.path { | |
+ inherit name; | |
+ path = materialized; | |
+ }; } else calculateUseHash; | |
in | |
if checkMaterialization |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment