From 2288b3aaddb2a8c7cefb0af76fd1f2002f1e1b8b Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 14:12:15 +0000 Subject: krops.nix: pin crate2nix in sources.json One file for the pins of the git sources, so a tool can update them. An entry has url, rev and date, and branch if it follows one. --- krops.nix | 16 ++++++++++++---- sources.json | 8 ++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 sources.json diff --git a/krops.nix b/krops.nix index b06b87ec..003b2908 100644 --- a/krops.nix +++ b/krops.nix @@ -53,6 +53,17 @@ assert builtins.elem switch [ "switch" "boot" "test" ]; +let + # A source pinned in sources.json, fetched with git. + gitSource = source: let + entry = (lib.importJSON ./sources.json).${source}; + in { + git = { + ref = entry.rev; + url = entry.url; + }; + }; +in rec { spec = { @@ -66,10 +77,7 @@ rec { target = if args.target or null != null then args.target else spec.target; sources = { - crate2nix.git = { - ref = "1cb60331b14f15dad145dbd4e207c1ec110e5675"; # master Mon Sep 28 09:04:14 2026 +0200 - url = "https://github.com/nix-community/crate2nix"; - }; + crate2nix = gitSource "crate2nix"; hrm.file = { path = toString ~/sync/src/hrm; }; diff --git a/sources.json b/sources.json new file mode 100644 index 00000000..7e0680df --- /dev/null +++ b/sources.json @@ -0,0 +1,8 @@ +{ + "crate2nix": { + "branch": "master", + "date": "2026-09-28T07:04:14Z", + "rev": "1cb60331b14f15dad145dbd4e207c1ec110e5675", + "url": "https://github.com/nix-community/crate2nix" + } +} -- cgit v1.3.1