summaryrefslogtreecommitdiffstats
path: root/krebs/update-nixpkgs.sh
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-09-22 12:47:02 +0200
committerlassulus <lassulus@lassul.us>2019-09-22 12:47:02 +0200
commit9612fe5a887a44a0cabbb5889531d2837cae635c (patch)
tree64c9e9dc190e1c3ff13307f658c354269aac1d86 /krebs/update-nixpkgs.sh
parent0a7989d0f0e176b81a5ee8e0510f160e27fca071 (diff)
update-channel.sh -> update-nixpkgs.sh
Diffstat (limited to 'krebs/update-nixpkgs.sh')
-rwxr-xr-xkrebs/update-nixpkgs.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/krebs/update-nixpkgs.sh b/krebs/update-nixpkgs.sh
new file mode 100755
index 00000000..08354357
--- /dev/null
+++ b/krebs/update-nixpkgs.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+dir=$(dirname $0)
+oldrev=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/')
+nix-shell -p nix-prefetch-git --run 'nix-prefetch-git \
+ --url https://github.com/NixOS/nixpkgs-channels \
+ --rev refs/heads/nixos-19.03' \
+> $dir/nixpkgs.json
+newrev=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/')
+git commit $dir/nixpkgs.json -m "nixpkgs: $oldrev -> $newrev"