mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 10:50:30 +08:00
Compare commits
1 Commits
21.05
...
backups/da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b28b8c79dd |
23
pkgs/stdenv/darwin/default.nix
Normal file
23
pkgs/stdenv/darwin/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{stdenv, pkgs}:
|
||||
|
||||
import ../generic {
|
||||
name = "stdenv-darwin";
|
||||
preHook = ./prehook.sh;
|
||||
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
||||
|
||||
system = stdenv.system;
|
||||
|
||||
gcc = import ../../build-support/gcc-wrapper {
|
||||
nativeTools = false;
|
||||
nativeLibc = true;
|
||||
inherit stdenv;
|
||||
binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;};
|
||||
gcc = pkgs.gccApple.gcc;
|
||||
coreutils = pkgs.coreutils;
|
||||
shell = pkgs.bash + "/bin/sh";
|
||||
};
|
||||
|
||||
shell = pkgs.bash + "/bin/sh";
|
||||
|
||||
fetchurlBoot = stdenv.fetchurlBoot;
|
||||
}
|
||||
9
pkgs/stdenv/darwin/prehook.sh
Normal file
9
pkgs/stdenv/darwin/prehook.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
dontFixLibtool=1
|
||||
NIX_STRIP_DEBUG=0 # !!! do we still need this?
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
xargsFlags=" "
|
||||
@@ -39,6 +39,11 @@ rec {
|
||||
pkgs = stdenvNativePkgs;
|
||||
};
|
||||
|
||||
# Darwin standard environment.
|
||||
stdenvDarwin = import ./darwin {
|
||||
stdenv = stdenvNative;
|
||||
pkgs = stdenvNativePkgs;
|
||||
};
|
||||
|
||||
# Linux standard environment.
|
||||
stdenvLinux = (import ./linux {inherit system allPackages platform;}).stdenvLinux;
|
||||
@@ -58,7 +63,7 @@ rec {
|
||||
if stdenvType == "mips64-linux" then stdenvLinux else
|
||||
if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
|
||||
if stdenvType == "i686-mingw" then stdenvMinGW else
|
||||
if stdenvType == "i686-darwin" then stdenvNix else
|
||||
if stdenvType == "x86_64-darwin" then stdenvNix else
|
||||
if stdenvType == "i686-darwin" then stdenvDarwin else
|
||||
if stdenvType == "x86_64-darwin" then stdenvDarwin else
|
||||
stdenvNative;
|
||||
}
|
||||
|
||||
@@ -11,12 +11,8 @@ import ../generic {
|
||||
nativeTools = false;
|
||||
nativeLibc = true;
|
||||
inherit stdenv;
|
||||
binutils =
|
||||
if stdenv.isDarwin then
|
||||
import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}
|
||||
else
|
||||
pkgs.binutils;
|
||||
gcc = if stdenv.isDarwin then pkgs.gccApple.gcc else pkgs.gcc.gcc;
|
||||
binutils = pkgs.binutils;
|
||||
gcc = pkgs.gcc.gcc;
|
||||
coreutils = pkgs.coreutils;
|
||||
shell = pkgs.bash + "/bin/sh";
|
||||
};
|
||||
|
||||
@@ -1,11 +1,2 @@
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
|
||||
if test "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = "x86_64-darwin"; then
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
dontFixLibtool=1
|
||||
NIX_STRIP_DEBUG=0 # !!! do we still need this?
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
xargsFlags=" "
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user