diff options
| author | Silvan Mosberger <contact@infinisil.com> | 2024-07-18 15:51:02 +0200 |
|---|---|---|
| committer | Silvan Mosberger <contact@infinisil.com> | 2024-07-18 15:51:02 +0200 |
| commit | 545eb50c7df9973afebdfdeac350481bf6eeb81e (patch) | |
| tree | 201710278f10f0e41c73b370b3be04e2c8f0e2f7 | |
| parent | Merge pull request #328154 from dotlambda/switch-to-configuration-ng (diff) | |
| download | nixpkgs-545eb50c7df9973afebdfdeac350481bf6eeb81e.tar.gz | |
ci/update-pinned-nixpkgs.sh: Allow setting the rev
This script only needs to make sure that the revision has the relevant
packages built, it doesn't necessarily need to be a channel version.
This commit makes it possible to set the revision explicitly when
calling the update script.
| -rwxr-xr-x | ci/update-pinned-nixpkgs.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ci/update-pinned-nixpkgs.sh b/ci/update-pinned-nixpkgs.sh index 776558130057..d44b59d80ede 100755 --- a/ci/update-pinned-nixpkgs.sh +++ b/ci/update-pinned-nixpkgs.sh @@ -10,7 +10,8 @@ repo=https://github.com/nixos/nixpkgs branch=nixpkgs-unstable file=$SCRIPT_DIR/pinned-nixpkgs.json -rev=$(git ls-remote "$repo" refs/heads/"$branch" | cut -f1) +defaultRev=$(git ls-remote "$repo" refs/heads/"$branch" | cut -f1) +rev=${1:-$defaultRev} sha256=$(nix-prefetch-url --unpack "$repo/archive/$rev.tar.gz" --name source) jq -n --arg rev "$rev" --arg sha256 "$sha256" '$ARGS.named' | tee /dev/stderr > $file |
