diff options
| author | tv <tv@krebsco.de> | 2026-11-29 14:12:15 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-29 14:12:15 +0000 |
| commit | 2288b3aaddb2a8c7cefb0af76fd1f2002f1e1b8b (patch) | |
| tree | c9221888dafd490f4ada57e7a967f71e7a857e3c | |
| parent | e03b0348a621e81f15a7644a72862192a0817b62 (diff) | |
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.
| -rw-r--r-- | krops.nix | 16 | ||||
| -rw-r--r-- | sources.json | 8 |
2 files changed, 20 insertions, 4 deletions
@@ -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" + } +} |
