Commit 43c0c570 authored by David McFarland's avatar David McFarland
Browse files

godot: fix compiler environment in scons

parent 71d45892
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
  libXrandr,
  libXrender,
  makeWrapper,
  perl,
  pkg-config,
  runCommand,
  scons,
@@ -168,6 +169,11 @@ let
        ./CSharpLanguage-fix-crash-in-reload_assemblies-after-.patch
      ];

      postPatch = ''
        # this stops scons from hiding e.g. NIX_CFLAGS_COMPILE
        perl -pi -e '{ $r += s:(env = Environment\(.*):\1\nenv["ENV"] = os.environ: } END { exit ($r != 1) }' SConstruct
      '';

      depsBuildBuild = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
        buildPackages.stdenv.cc
        pkg-config
@@ -179,6 +185,7 @@ let
        [
          autoPatchelfHook
          installShellFiles
          perl
          pkg-config
          scons
        ]