Unverified Commit 3d517000 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

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.
parent ddca1d0a
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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;
}