sage: refactor passthru on sage-env

`writeTextFile` supports `passthru` today, so let's use it.

The previous solution could cause eval errors in some obscure override
scenarios - so obscure, that I can't provide a simple reproducer. But, I
did hit it during some experimentation.
This commit is contained in:
Wolfgang Walther
2025-06-17 17:59:11 +02:00
parent ddca1d0a43
commit 3d517000bb
+6 -5
View File
@@ -102,6 +102,12 @@ in
writeTextFile rec {
name = "sage-env";
destination = "/${name}";
passthru = {
lib = sagelib;
docbuild = sage-docbuild;
};
text =
''
export PKG_CONFIG_PATH='${
@@ -205,8 +211,3 @@ writeTextFile rec {
}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
'';
}
// {
# equivalent of `passthru`, which `writeTextFile` doesn't support
lib = sagelib;
docbuild = sage-docbuild;
}