[Nix-dev] [PATCH 1/2] t/scons
Marc Weber
marco-oweber at gmx.de
Mon Sep 27 01:18:28 CEST 2010
scons patches (PATH from env)
Signed-off-by: Marc Weber <marco-oweber at gmx.de>
---
.../tools/build-managers/scons/default.nix | 10 ++++++++++
.../tools/build-managers/scons/path-from-env.patch | 13 +++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
create mode 100644 pkgs/development/tools/build-managers/scons/path-from-env.patch
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index fc9e4e2..a9e5fa9 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -32,4 +32,14 @@ stdenv.mkDerivation {
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.simons ];
};
+
+ patches = [
+ # http://www.scons.org/doc/HTML/scons-user/x1741.html
+ # Some packages already override env the way shown in docs:
+ # env = Environment(ENV = {'PATH' : os.environ['PATH']})
+ # or env = Environment(ENV = os.environ)
+ # for those who don't yet (eg v8) is this patch.
+ # The default PATH is not useful on NixOS anyway.
+ ./path-from-env.patch
+ ];
}
diff --git a/pkgs/development/tools/build-managers/scons/path-from-env.patch b/pkgs/development/tools/build-managers/scons/path-from-env.patch
new file mode 100644
index 0000000..040c890
--- /dev/null
+++ b/pkgs/development/tools/build-managers/scons/path-from-env.patch
@@ -0,0 +1,13 @@
+diff --git a/engine/SCons/Platform/posix.py b/engine/SCons/Platform/posix.py
+index 87de9df..8b8633f 100644
+--- a/engine/SCons/Platform/posix.py
++++ b/engine/SCons/Platform/posix.py
+@@ -230,7 +230,7 @@ def generate(env):
+
+ if 'ENV' not in env:
+ env['ENV'] = {}
+- env['ENV']['PATH'] = '/usr/local/bin:/opt/bin:/bin:/usr/bin'
++ env['ENV']['PATH'] = os.environ['PATH']
+ env['OBJPREFIX'] = ''
+ env['OBJSUFFIX'] = '.o'
+ env['SHOBJPREFIX'] = '$OBJPREFIX'
--
1.7.2.1
More information about the nix-dev
mailing list