stockholm/krebs/update-nixpkgs.sh

10 lines
396 B
Bash
Raw Normal View History

2018-08-22 10:55:30 +00:00
#!/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 \
2019-03-06 15:38:28 +00:00
--rev refs/heads/nixos-19.03' \
2018-08-22 10:55:30 +00:00
> $dir/nixpkgs.json
newrev=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/')
git commit $dir/nixpkgs.json -m "nixpkgs: $oldrev -> $newrev"