automate nixpkgs update
This commit is contained in:
parent
3e327a53b3
commit
4abdb218c7
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
krebs-source = {
|
krebs-source = {
|
||||||
nixpkgs.git = {
|
nixpkgs.git = {
|
||||||
ref = "e42c07d78a1fefc2d91f11f00e938253b3618a3b";
|
ref = (lib.importJSON ./nixpkgs.json).rev;
|
||||||
url = https://github.com/NixOS/nixpkgs;
|
url = https://github.com/NixOS/nixpkgs;
|
||||||
};
|
};
|
||||||
stockholm.file = toString ../.;
|
stockholm.file = toString ../.;
|
||||||
|
|
7
krebs/nixpkgs.json
Normal file
7
krebs/nixpkgs.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs-channels",
|
||||||
|
"rev": "4df3426f5a5e78cef4835897a43abd9e2a092b74",
|
||||||
|
"date": "2018-08-19T09:20:40+02:00",
|
||||||
|
"sha256": "05k5mssiqxffxi45mss9wjns6k76i248rpasa48akdcriry1mp63",
|
||||||
|
"fetchSubmodules": true
|
||||||
|
}
|
9
krebs/update-channel.sh
Executable file
9
krebs/update-channel.sh
Executable file
|
@ -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"
|
Loading…
Reference in a new issue