[Backport release-26.05] dfhack: move env variables into env for structuredAttrs (#524238)

This commit is contained in:
@mjones
2026-05-25 23:30:05 +00:00
committed by GitHub
2 changed files with 14 additions and 8 deletions

View File

@@ -20,7 +20,7 @@
"git": {
"url": "https://github.com/DFHack/dfhack.git",
"revision": "53.14-r2",
"outputHash": "sha256-UOmp84VoY/pam99T2ktAYH3N3cFMSIb9v8KOTZCof8U="
"outputHash": "sha256-8OvJ8NULgfR+S0kzOSmQvplhPT7wcxw02sRkG450ptE="
},
"xmlRev": "01aae95cacd98850e4f477c45a4b75f800bacecc"
}

View File

@@ -145,8 +145,19 @@ stdenv.mkDerivation {
# Use SDL_GetPrefPath since this takes XDG_DATA_HOME into account (which is correct).
++ optional (versionAtLeast version "52.02-r2") ./use-df-linux-dir.patch;
# gcc 11 fix
CXXFLAGS = optionalString (versionOlder version "0.47.05-r3") "-fpermissive";
env = {
# gcc 11 fix
CXXFLAGS = optionalString (versionOlder version "0.47.05-r3") "-fpermissive";
NIX_CFLAGS_COMPILE = toString (
[
"-Wno-error=deprecated-enum-enum-conversion"
]
++ optionals (versionOlder version "0.47") [
"-fpermissive"
]
);
};
nativeBuildInputs = [
cmake
@@ -200,11 +211,6 @@ stdenv.mkDerivation {
"-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${fetchOverrides}"
];
NIX_CFLAGS_COMPILE = [
"-Wno-error=deprecated-enum-enum-conversion"
]
++ optionals (versionOlder version "0.47") [ "-fpermissive" ];
preFixup = ''
# Wrap dfhack scripts.
if [ -f $out/dfhack ]; then