Fix Nanos6 build from git

The src.rev attribute is not available as it comes from source before
the recursive operator. Instead, simply get it from the function inputs.

Cc: Aleix Boné <aleix.boneribo@bsc.es>
Reviewed-by: Aleix Roca Nonell <aleix.rocanonell@bsc.es>
This commit is contained in:
Rodrigo Arias 2025-02-10 17:16:57 +01:00
parent 22e40db034
commit c4583f787d

View File

@ -48,7 +48,7 @@ let
source = if (useGit) then git else release;
in
stdenv.mkDerivation (source // rec {
stdenv.mkDerivation (source // {
pname = "nanos6";
prePatch = ''
@ -62,7 +62,7 @@ in
export CACHELINE_WIDTH=${toString cachelineBytes}
./autogen.sh
'' + lib.optionalString (useGit) ''
export NANOS6_GIT_VERSION=${src.rev}
export NANOS6_GIT_VERSION=${gitCommit}
export NANOS6_GIT_BRANCH=${gitBranch}
'';