From 4fafee1555261aa771cc2156a73d8b2bbc183f6c Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Wed, 23 Sep 2009 13:30:04 +0000 Subject: [PATCH] Added initial OpenBSD support to the stdenv svn path=/nixpkgs/trunk/; revision=17362 --- pkgs/stdenv/generic/default.nix | 3 ++- pkgs/stdenv/native/default.nix | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 1a1f588c16aa..15f69c14f0dc 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -74,7 +74,8 @@ let || result.system == "powerpc-linux"; isi686 = result.system == "i686-linux" || result.system == "i686-darwin" - || result.system == "i686-freebsd"; + || result.system == "i686-freebsd" + || result.system == "i686-openbsd"; is64bit = result.system == "x86_64-linux"; # Utility function: allow stdenv to be easily regenerated with diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index 248cc2a3357c..72ce8e272999 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -33,6 +33,18 @@ rec { export NIX_GCC_NEEDS_GREP=1 ''; + prehookOpenBSD = builtins.toFile "prehook-openbsd.sh" '' + source ${prehookBase} + + alias make=gmake + alias grep=ggrep + 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} @@ -55,6 +67,7 @@ rec { preHook = if system == "i686-darwin" || system == "powerpc-darwin" then prehookDarwin else if system == "i686-freebsd" then prehookFreeBSD else + if system == "i686-openbsd" then prehookOpenBSD else prehookBase; initialPath = extraPath ++ path;