diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-12-29 16:50:21 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-12-29 16:54:50 +0100 |
commit | b91dcad4bc73006b79db21802e1e46c333298093 (patch) | |
tree | b300f3977cce7b9e56c18111322656a2c8768d09 /pkgs | |
parent | 74aac178782af088cd40e2a1c224223b6692dc7c (diff) | |
download | nixlib-b91dcad4bc73006b79db21802e1e46c333298093.tar nixlib-b91dcad4bc73006b79db21802e1e46c333298093.tar.gz nixlib-b91dcad4bc73006b79db21802e1e46c333298093.tar.bz2 nixlib-b91dcad4bc73006b79db21802e1e46c333298093.tar.lz nixlib-b91dcad4bc73006b79db21802e1e46c333298093.tar.xz nixlib-b91dcad4bc73006b79db21802e1e46c333298093.tar.zst nixlib-b91dcad4bc73006b79db21802e1e46c333298093.zip |
fetchFromBitBucket: auto-remove an impure file
Also fix the hash in goPackages.inflect, the only user of the fetcher ATM. Closes #12002 (different `inflect` fix), fixes #12012. Using fetchzip-derived functions is likely more efficient than fetchhg, and it's lighter on dependencies (hash is the same as with fetchhg in this case).
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/fetchzip/default.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 1 | ||||
-rw-r--r-- | pkgs/top-level/go-packages.nix | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix index 46e7d917160c..9015f951a519 100644 --- a/pkgs/build-support/fetchzip/default.nix +++ b/pkgs/build-support/fetchzip/default.nix @@ -10,6 +10,7 @@ { # Optionally move the contents of the unpacked tree up one level. stripRoot ? true , url +, extraPostFetch ? "" , ... } @ args: lib.overrideDerivation (fetchurl ({ @@ -47,7 +48,8 @@ lib.overrideDerivation (fetchurl ({ fi '' else '' mv "$unpackDir"/* "$out/" - ''); -} // removeAttrs args [ "stripRoot" ])) + '') #*/ + + extraPostFetch; +} // removeAttrs args [ "stripRoot" "extraPostFetch" ])) # Hackety-hack: we actually need unzip hooks, too (x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d852fdd24a41..c20403321c88 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -372,6 +372,7 @@ let inherit name sha256; url = "https://bitbucket.org/${owner}/${repo}/get/${rev}.tar.gz"; meta.homepage = "https://bitbucket.org/${owner}/${repo}/"; + extraPostFetch = ''rm -f "$out"/.hg_archival.txt''; # impure file; see #12002 }; # cgit example, snapshot support is optional in cgit diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index e1825ace20d1..b05793a6043f 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -1751,7 +1751,7 @@ let rev = "8961c3750a47b8c0b3e118d52513b97adf85a7e8"; owner = "pkg"; repo = "inflect"; - sha256 = "04iln5b9iyvr6bcn5cj2zq6vqk3a2b4vsy48y2kylhk7qnakip99"; + sha256 = "11qdyr5gdszy24ai1bh7sf0cgrb4q7g7fsd11kbpgj5hjiigxb9a"; }; }; |