diff options
author | lassulus <lass@blue.r> | 2018-08-22 12:55:30 +0200 |
---|---|---|
committer | lassulus <lass@blue.r> | 2018-08-22 12:55:30 +0200 |
commit | 4abdb218c7bd88aad8b9178cdaaa6a97079f5ac6 (patch) | |
tree | 20ad4b864bdf4a7ff168ea6a87eecf0f5be57889 /krebs/update-channel.sh | |
parent | 3e327a53b371ab21896af12f5c361b75c58cbba3 (diff) |
automate nixpkgs update
Diffstat (limited to 'krebs/update-channel.sh')
-rwxr-xr-x | krebs/update-channel.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/krebs/update-channel.sh b/krebs/update-channel.sh new file mode 100755 index 000000000..47d3f29c4 --- /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" |