diff --git a/pkgs/stdenv/cygwin/default.nix b/pkgs/stdenv/cygwin/default.nix new file mode 100644 index 000000000000..a94533edfaf1 --- /dev/null +++ b/pkgs/stdenv/cygwin/default.nix @@ -0,0 +1,24 @@ +{stdenv, genericStdenv, gccWrapper}: + +genericStdenv { + name = "stdenv-native"; + preHook = ./prehook.sh; + initialPath = "/usr/local /usr /"; + + inherit stdenv; + + gcc = gccWrapper { + name = "gcc-native"; + nativeTools = true; + nativeGlibc = true; + nativePrefix = "/usr"; + inherit stdenv; + }; + + shell = "/bin/bash"; + + extraAttrs = { + # Curl should be in /usr/bin or so. + curl = null; + }; +} diff --git a/pkgs/stdenv/cygwin/prehook.sh b/pkgs/stdenv/cygwin/prehook.sh new file mode 100644 index 000000000000..c9feff991675 --- /dev/null +++ b/pkgs/stdenv/cygwin/prehook.sh @@ -0,0 +1,2 @@ +export NIX_ENFORCE_PURITY= +export configureFlags="$configureFlags --disable-shared" diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index b66d770782c4..191267b7b99e 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -43,15 +43,9 @@ rec { inherit genericStdenv gccWrapper; }; - stdenvNixPkgs = allPackages { - bootStdenv = stdenvNix; - noSysDirs = false; - }; - # Linux standard environment. - inherit (import ./linux {inherit allPackages;}) - stdenvLinux stdenvLinuxPkgs; + inherit (import ./linux {inherit allPackages;}) stdenvLinux; # Darwin (Mac OS X) standard environment. Very simple for now @@ -61,11 +55,6 @@ rec { inherit genericStdenv gccWrapper; }; - stdenvDarwinPkgs = allPackages { - bootStdenv = stdenvDarwin; - noSysDirs = false; - }; - # FreeBSD standard environment. Right now this is more or less the # same as the native environemnt. Eventually we'll want a pure @@ -75,9 +64,11 @@ rec { inherit genericStdenv gccWrapper; }; - stdenvFreeBSDPkgs = allPackages { - bootStdenv = stdenvFreeBSD; - noSysDirs = false; + + # Cygwin standard environment. + stdenvCygwin = (import ./cygwin) { + stdenv = stdenvInitial; + inherit genericStdenv gccWrapper; }; @@ -85,6 +76,7 @@ rec { stdenv = if system == "i686-linux" then stdenvLinux else if system == "i686-freebsd" then stdenvFreeBSD + else if system == "i686-cygwin" then stdenvCygwin else if system == "powerpc-darwin" then stdenvDarwin else stdenvNative; }