From 71242e93f11e18d3f2c35075a59a62844267f9aa Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 12 Dec 2023 11:39:52 +0100 Subject: replace nixpkgs.json with flake.lock --- krebs/krops.nix | 6 +++--- krebs/nixpkgs.json | 12 ------------ krebs/update-nixpkgs.sh | 9 --------- 3 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 krebs/nixpkgs.json delete mode 100755 krebs/update-nixpkgs.sh diff --git a/krebs/krops.nix b/krebs/krops.nix index aeb2413a4..ad277ac86 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -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; }; }; diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json deleted file mode 100644 index 0b6021ed0..000000000 --- a/krebs/nixpkgs.json +++ /dev/null @@ -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 -} diff --git a/krebs/update-nixpkgs.sh b/krebs/update-nixpkgs.sh deleted file mode 100755 index 465548f44..000000000 --- a/krebs/update-nixpkgs.sh +++ /dev/null @@ -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" -- cgit v1.2.3