mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
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).
This commit is contained in:
parent
74aac17878
commit
b91dcad4bc
@ -10,6 +10,7 @@
|
|||||||
{ # Optionally move the contents of the unpacked tree up one level.
|
{ # Optionally move the contents of the unpacked tree up one level.
|
||||||
stripRoot ? true
|
stripRoot ? true
|
||||||
, url
|
, url
|
||||||
|
, extraPostFetch ? ""
|
||||||
, ... } @ args:
|
, ... } @ args:
|
||||||
|
|
||||||
lib.overrideDerivation (fetchurl ({
|
lib.overrideDerivation (fetchurl ({
|
||||||
@ -47,7 +48,8 @@ lib.overrideDerivation (fetchurl ({
|
|||||||
fi
|
fi
|
||||||
'' else ''
|
'' else ''
|
||||||
mv "$unpackDir"/* "$out/"
|
mv "$unpackDir"/* "$out/"
|
||||||
'');
|
'') #*/
|
||||||
} // removeAttrs args [ "stripRoot" ]))
|
+ extraPostFetch;
|
||||||
|
} // removeAttrs args [ "stripRoot" "extraPostFetch" ]))
|
||||||
# Hackety-hack: we actually need unzip hooks, too
|
# Hackety-hack: we actually need unzip hooks, too
|
||||||
(x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];})
|
(x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];})
|
||||||
|
@ -372,6 +372,7 @@ let
|
|||||||
inherit name sha256;
|
inherit name sha256;
|
||||||
url = "https://bitbucket.org/${owner}/${repo}/get/${rev}.tar.gz";
|
url = "https://bitbucket.org/${owner}/${repo}/get/${rev}.tar.gz";
|
||||||
meta.homepage = "https://bitbucket.org/${owner}/${repo}/";
|
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
|
# cgit example, snapshot support is optional in cgit
|
||||||
|
@ -1751,7 +1751,7 @@ let
|
|||||||
rev = "8961c3750a47b8c0b3e118d52513b97adf85a7e8";
|
rev = "8961c3750a47b8c0b3e118d52513b97adf85a7e8";
|
||||||
owner = "pkg";
|
owner = "pkg";
|
||||||
repo = "inflect";
|
repo = "inflect";
|
||||||
sha256 = "04iln5b9iyvr6bcn5cj2zq6vqk3a2b4vsy48y2kylhk7qnakip99";
|
sha256 = "11qdyr5gdszy24ai1bh7sf0cgrb4q7g7fsd11kbpgj5hjiigxb9a";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user