replace nixpkgs.json with flake.lock
This commit is contained in:
parent
61a5c464b8
commit
71242e93f1
@ -10,8 +10,8 @@
|
||||
krebs-source = { test ? false }: rec {
|
||||
nixpkgs = if test then {
|
||||
derivation = let
|
||||
rev = (lib.importJSON ./nixpkgs.json).rev;
|
||||
sha256 = (lib.importJSON ./nixpkgs.json).sha256;
|
||||
rev = (lib.importJSON ../flake.lock).nodes.nixpkgs.locked.rev;
|
||||
sha256 = (lib.importJSON ./nixpkgs.json).nixpkgs.locked.narHash;
|
||||
in ''
|
||||
with import (builtins.fetchTarball {
|
||||
url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz";
|
||||
@ -27,7 +27,7 @@
|
||||
} else {
|
||||
git = {
|
||||
ref = (lib.importJSON ./nixpkgs.json).rev;
|
||||
url = https://github.com/NixOS/nixpkgs;
|
||||
url = "https://github.com/NixOS/nixpkgs";
|
||||
shallow = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs",
|
||||
"rev": "9075cba53e86dc318d159aee55dc9a7c9a4829c1",
|
||||
"date": "2023-09-02T08:28:47+02:00",
|
||||
"path": "/nix/store/605bv7zssv38j0ii8rbnxkv1m0f0b53p-nixpkgs",
|
||||
"sha256": "0kymzp32d31c0hny2b2f7zfn49nzrxlm963xbm4v0axka6abym36",
|
||||
"hash": "sha256-ZlS/lFGzK7BJXX2YVGnP3yZi3T9OLOEtBCyMJsb91U8=",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
#!/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 \
|
||||
--rev refs/heads/nixos-23.05' \
|
||||
> $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 New Issue
Block a user