summaryrefslogtreecommitdiffstats
path: root/krebs/update-nixpkgs-unstable.sh
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-09-22 12:46:27 +0200
committerlassulus <lassulus@lassul.us>2019-09-22 12:46:27 +0200
commit0a7989d0f0e176b81a5ee8e0510f160e27fca071 (patch)
treeb02e38ff74f3a7ec82a3c1d7beaa0e8e852ac5d2 /krebs/update-nixpkgs-unstable.sh
parentc638d038e3880608112d6e3218eed169a313caef (diff)
add nixpkgs-unstable
Diffstat (limited to 'krebs/update-nixpkgs-unstable.sh')
-rwxr-xr-xkrebs/update-nixpkgs-unstable.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/krebs/update-nixpkgs-unstable.sh b/krebs/update-nixpkgs-unstable.sh
new file mode 100755
index 00000000..068da5f6
--- /dev/null
+++ b/krebs/update-nixpkgs-unstable.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+dir=$(dirname $0)
+oldrev=$(cat $dir/nixpkgs-unstable.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-unstable' \
+> $dir/nixpkgs-unstable.json
+newrev=$(cat $dir/nixpkgs-unstable.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/')
+git commit $dir/nixpkgs.json -m "nixpkgs-unstable: $oldrev -> $newrev"