dfhack: move env variables into env for structuredAttrs

This commit is contained in:
Stefan Frijters
2026-05-25 14:51:39 +02:00
parent 7e18ec5706
commit b58a49e4e4

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