From 13bcd073851a3497b2181275e9bedff489e56777 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 26 May 2026 17:42:12 +0200 Subject: [PATCH] flake: don't use `self` in let block The upcoming change factors out a lot of code to make it reusable for a "legacy" Hydra project that we use to build a matrix of (Lix x nixpkgs) to have a warm cache for everyone. The Hydra project will not use flakes to have some inputs overridable, so the change is needed. In non-flake mode we don't have a notion of "self", so rename it to `lixSrc` such that the next commit is purely about moving stuff without changing any aspect. Current stock Hydra doesn't expose `lastModified` though, so right now that is a cache-miss. There's a pending Hydra PR fixing that[1]. [1] https://git.lix.systems/lix-project/hydra/pulls/82 Change-Id: I59d70b8b874f576c782217e7bca099eda4c7add9 --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index adbd25004..0911bb9b1 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,7 @@ let inherit (nixpkgs) lib; + lixSrc = self; # This notice gets echoed as a dev shell hook, and can be turned off with # `touch .nocontribmsg` @@ -87,8 +88,8 @@ "" else "pre${ - builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101") - }-dev_${self.shortRev or "dirty"}"; + builtins.substring 0 8 (lixSrc.lastModifiedDate or lixSrc.lastModified or "19700101") + }-dev_${lixSrc.shortRev or "dirty"}"; linux32BitSystems = [ "i686-linux" ]; linux64BitSystems = [