From 706cae653224fcec15a2d27c539bd0437e7e9dcf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 Feb 2023 17:20:42 +0100 Subject: 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. --- maintainers/scripts/update-python-libraries | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'maintainers') 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 $@ -- cgit 1.4.1