summaryrefslogtreecommitdiffstats
path: root/krebs/update-channel.sh
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-08-29 01:38:45 +0200
committertv <tv@krebsco.de>2018-08-29 01:38:45 +0200
commit000f2a7c9123fcd4b110c6c220570758d556c837 (patch)
tree8464e80b13adce3b5958ad6e9bcebc8a4f559cd9 /krebs/update-channel.sh
parent16ad5fb0a835a1022656253ae838e83fa024e692 (diff)
parent413e0689acd4f6b322f9996950927ebd41d0e58c (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/update-channel.sh')
-rwxr-xr-xkrebs/update-channel.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/krebs/update-channel.sh b/krebs/update-channel.sh
new file mode 100755
index 00000000..47d3f29c
--- /dev/null
+++ b/krebs/update-channel.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-18.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"