about summary refs log tree commit diff
path: root/maintainers/scripts/update-python-libraries
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-12 17:20:42 +0100
committerMartin Weinelt <mweinelt@users.noreply.github.com>2023-02-27 02:21:07 +0000
commit706cae653224fcec15a2d27c539bd0437e7e9dcf (patch)
treed458b1ea683fecc650071c64f9feb86c641bb51e /maintainers/scripts/update-python-libraries
parent5d447a9e7009a116ab1e62dd5599b9272206067f (diff)
downloadnixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.tar
nixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.tar.gz
nixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.tar.bz2
nixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.tar.lz
nixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.tar.xz
nixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.tar.zst
nixlib-706cae653224fcec15a2d27c539bd0437e7e9dcf.zip
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.
Diffstat (limited to 'maintainers/scripts/update-python-libraries')
-rwxr-xr-xmaintainers/scripts/update-python-libraries8
1 files changed, 3 insertions, 5 deletions
diff --git a/maintainers/scripts/update-python-libraries b/maintainers/scripts/update-python-libraries
index 4a6024c40380..8717808daaf0 100755
--- a/maintainers/scripts/update-python-libraries
+++ b/maintainers/scripts/update-python-libraries
@@ -1,5 +1,3 @@
-#!/bin/sh
-build=`nix-build -E "with import (fetchTarball "channel:nixpkgs-unstable") {}; python3.withPackages(ps: with ps; [ packaging requests toolz ])"`
-python=${build}/bin/python
-exec ${python} pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py $@
-
+#!/usr/bin/env nix-shell
+#!nix-shell -I nixpkgs=channel:nixpkgs-unstable -i bash -p "python3.withPackages (ps: with ps; [ packaging requests ])" -p nix-prefetch-git
+exec python3 pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py $@