From 4abdb218c7bd88aad8b9178cdaaa6a97079f5ac6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 22 Aug 2018 12:55:30 +0200 Subject: automate nixpkgs update --- krebs/update-channel.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 krebs/update-channel.sh (limited to 'krebs/update-channel.sh') 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" -- cgit v1.2.3