From 3d8a0d85fef0c467de1eccd37cd1ded989a1ec1d Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 14:13:12 +0000 Subject: tincr: pin in sources.json With the hash, as the package fetches it into the store, and without a branch, as a new revision needs a new plan. krops.nix reads the same entry for the NixOS module, instead of importing the package file. --- krops.nix | 11 ++--------- pkgs/rust/tincr/default.nix | 5 +++-- sources.json | 6 ++++++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/krops.nix b/krops.nix index 21b02eef..35b03eb3 100644 --- a/krops.nix +++ b/krops.nix @@ -102,15 +102,8 @@ rec { stockholm.file = { path = toString ~/sync/src/stockholm; }; - # At the revision of pkgs/rust/tincr, for its NixOS module. - tincr.git = { - ref = (import ./pkgs/rust/tincr { - fetchFromGitHub = lib.id; - installShellFiles = null; - runCommand = null; - }).src.rev; - url = "https://github.com/Mic92/tincr"; - }; + # For its NixOS module. + tincr = gitSource "tincr"; }; source = lib.evalSource [ sources ]; diff --git a/pkgs/rust/tincr/default.nix b/pkgs/rust/tincr/default.nix index 127fc8e9..424727ba 100644 --- a/pkgs/rust/tincr/default.nix +++ b/pkgs/rust/tincr/default.nix @@ -1,11 +1,12 @@ { fetchFromGitHub, installShellFiles, runCommand }: let + pin = (builtins.fromJSON (builtins.readFile ../../../sources.json)).tincr; + src = fetchFromGitHub { owner = "Mic92"; repo = "tincr"; - rev = "457908ae775007e3f26fe5857a6ccab5eb4db2da"; - hash = "sha256-rT+hOB96Fp9ALxIbkfk7rWunAuULPda6aKr9+uGCafA="; + inherit (pin) rev hash; }; in diff --git a/sources.json b/sources.json index 2d27ecf3..f0346086 100644 --- a/sources.json +++ b/sources.json @@ -21,5 +21,11 @@ "date": "2026-11-29T00:38:02Z", "rev": "c1859f83d0a6562adcc8a9c636bcf85a45590289", "url": "https://github.com/NixOS/nixpkgs" + }, + "tincr": { + "date": "2026-11-20T08:22:14Z", + "hash": "sha256-rT+hOB96Fp9ALxIbkfk7rWunAuULPda6aKr9+uGCafA=", + "rev": "457908ae775007e3f26fe5857a6ccab5eb4db2da", + "url": "https://github.com/Mic92/tincr" } } -- cgit v1.3.1