mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
706cae6532
Previously when packages that required the git fetcher were updated, we would wrongly rely on `nix-prefetch-url`, which would reliable break the hash. Instead we need to use `nix-prefetch-git` to determine the proper hash, when the relevant attributes are present.
15 lines
368 B
Nix
15 lines
368 B
Nix
{ python3, runCommand, git, nix, nix-prefetch-git }:
|
|
|
|
runCommand "update-python-libraries" {
|
|
buildInputs = [
|
|
nix
|
|
nix-prefetch-git
|
|
(python3.withPackages(ps: with ps; [ packaging requests toolz ]))
|
|
git
|
|
];
|
|
} ''
|
|
cp ${./update-python-libraries.py} $out
|
|
patchShebangs $out
|
|
substituteInPlace $out --replace 'GIT = "git"' 'GIT = "${git}/bin/git"'
|
|
''
|