summary refs log tree commit diff
path: root/pkgs/stdenv/native
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stdenv/native')
-rw-r--r--pkgs/stdenv/native/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix
index 0cbfb07eb74..a3205ec517f 100644
--- a/pkgs/stdenv/native/default.nix
+++ b/pkgs/stdenv/native/default.nix
@@ -5,6 +5,7 @@ rec {
   shell = "/bin/bash";
 
   path = (if system == "i386-sunos" then [ "/usr/gnu" ] else []) ++
+    (if system == "i686-netbsd" then [ "/usr/pkg" ] else []) ++
     ["/" "/usr" "/usr/local"];
 
   prehookBase = builtins.toFile "prehook-base.sh" ''
@@ -48,6 +49,18 @@ rec {
     export NIX_GCC_NEEDS_GREP=1
   '';
 
+  prehookNetBSD = builtins.toFile "prehook-netbsd.sh" ''
+    source ${prehookBase}
+    
+    alias make=gmake
+    alias sed=gsed
+    export MAKE=gmake
+    shopt -s expand_aliases
+    
+    # Filter out stupid GCC warnings (in gcc-wrapper).
+    export NIX_GCC_NEEDS_GREP=1
+  '';
+
   prehookCygwin = builtins.toFile "prehook-cygwin.sh" ''
     source ${prehookBase}
     
@@ -71,6 +84,7 @@ rec {
         if system == "i686-darwin" || system == "powerpc-darwin" then prehookDarwin else
         if system == "i686-freebsd" then prehookFreeBSD else
         if system == "i686-openbsd" then prehookOpenBSD else
+	if system == "i686-netbsd" then prehookNetBSD else
         prehookBase;
 
       initialPath = extraPath ++ path;