Skip to content

Commit

Permalink
ci/update-pinned-nixpkgs.sh: Allow setting the rev
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
infinisil committed Jul 18, 2024
1 parent a0812b3 commit 545eb50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/update-pinned-nixpkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 545eb50

Please sign in to comment.