update-python-libraries: Add support for fetchgit

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.
This commit is contained in:
Martin Weinelt
2023-02-27 02:21:07 +00:00
committed by Martin Weinelt
parent 5d447a9e70
commit 706cae6532
3 changed files with 68 additions and 21 deletions
@@ -1,8 +1,9 @@
{ python3, runCommand, git, 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
];