summaryrefslogtreecommitdiffstats
path: root/krebs/update-nixpkgs.sh
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2019-09-25 15:21:03 +0200
committermakefu <github@syntax-fehler.de>2019-09-25 15:21:03 +0200
commitbe19e6a618df0cdb44ce91f58efbc16e9d01f076 (patch)
tree3860e1e8018a17ffd81a533b034ec5da18082508 /krebs/update-nixpkgs.sh
parentab8cb5c12627f37f28ee62afb783548c90354fed (diff)
parent53c6b483ba2a17589a5e9656eeb6cbcfbde24383 (diff)
Merge remote-tracking branch 'lass/master'
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 000000000..08354357a
--- /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"