Hi Peter,
Peter Simons <[email protected]> skribis:
> when lipo is added to stdenv, then use of the darwinLipoUtility
> attribute should be removed from all-packages.nix, too.
Yes, will do.
> Furthermore, one might argue that all of the following utilities should
> be moved into Darwin stdenv as well:
>
> darwinArchUtility = callPackage ../os-specific/darwin/arch { };
>
> darwinSwVersUtility = callPackage ../os-specific/darwin/sw_vers { };
Good point.
> darwinInstallNameToolUtility = callPackage
> ../os-specific/darwin/install_name_tool { };
Already added (thanks to Shea Levy.)
The attached patch incorporates all these changes.
If nobody objects, I’ll merge that next Monday.
Thanks,
Ludo’.
svn: Skipping argument: '.svn' ends in a reserved name
Index: development/tools/analysis/valgrind/default.nix
===================================================================
--- development/tools/analysis/valgrind/default.nix (revision 33620)
+++ development/tools/analysis/valgrind/default.nix (working copy)
@@ -59,21 +59,5 @@
sed -i coregrind/link_tool_exe_darwin.in \
-e 's/^my \$archstr = .*/my $archstr = "x86_64";/g'
'';
-
- preConfigure =
- # Shamelessly drag in MIG.
- '' mkdir -p "$TMPDIR/impure-deps/bin"
-
- # MIG assumes the standard Darwin core utilities (e.g., `rm -d'), so
- # let it see the impure directories.
- cat > "$TMPDIR/impure-deps/bin/mig" <<EOF
-#!/bin/sh
-export PATH="/usr/bin:/bin:\$PATH"
-exec /usr/bin/mig "\$@"
-EOF
- chmod +x "$TMPDIR/impure-deps/bin/mig"
-
- export PATH="$TMPDIR/impure-deps/bin:$PATH"
- '';
}
else {}))
Index: development/tools/build-managers/cmake/default.nix
===================================================================
--- development/tools/build-managers/cmake/default.nix (revision 33620)
+++ development/tools/build-managers/cmake/default.nix (working copy)
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, replace, curl, expat, zlib, bzip2, libarchive
, useNcurses ? false, ncurses, useQt4 ? false, qt4
-, darwinInstallNameToolUtility }:
+}:
with stdenv.lib;
@@ -27,7 +27,6 @@
optional (stdenv ? glibc) ./search-path.patch;
buildInputs = [ curl expat zlib bzip2 libarchive ]
- ++ optional stdenv.isDarwin darwinInstallNameToolUtility
++ optional useNcurses ncurses
++ optional useQt4 qt4;
Index: development/tools/build-managers/cmake/264.nix
===================================================================
--- development/tools/build-managers/cmake/264.nix (revision 33620)
+++ development/tools/build-managers/cmake/264.nix (working copy)
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, replace, curl, expat, zlib, bzip2, libarchive
, useNcurses ? false, ncurses, useQt4 ? false, qt4, xmlrpc_c
-, darwinInstallNameToolUtility }:
+}:
with stdenv.lib;
@@ -27,7 +27,6 @@
optional (stdenv ? glibc) ./search-path-264.patch;
buildInputs = [ curl expat zlib bzip2 libarchive xmlrpc_c ]
- ++ optional stdenv.isDarwin darwinInstallNameToolUtility
++ optional useNcurses ncurses
++ optional useQt4 qt4;
Index: development/interpreters/python/3.1/default.nix
===================================================================
--- development/interpreters/python/3.1/default.nix (revision 33620)
+++ development/interpreters/python/3.1/default.nix (working copy)
@@ -9,11 +9,8 @@
, openssl
, tcl, tk
, libX11, xproto
-, arch ? null, sw_vers ? null
}:
-assert stdenv.isDarwin -> arch != null;
-assert stdenv.isDarwin -> sw_vers != null;
assert readline != null -> ncurses != null;
with stdenv.lib;
@@ -23,7 +20,7 @@
version = "${majorVersion}.3";
buildInputs = filter (p: p != null) [
- zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto arch sw_vers
+ zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto
];
in
stdenv.mkDerivation {
Index: development/interpreters/python/3.2/default.nix
===================================================================
--- development/interpreters/python/3.2/default.nix (revision 33620)
+++ development/interpreters/python/3.2/default.nix (working copy)
@@ -9,11 +9,8 @@
, openssl
, tcl, tk
, libX11, xproto
-, arch ? null, sw_vers ? null
}:
-assert stdenv.isDarwin -> arch != null;
-assert stdenv.isDarwin -> sw_vers != null;
assert readline != null -> ncurses != null;
with stdenv.lib;
@@ -23,7 +20,7 @@
version = "${majorVersion}";
buildInputs = filter (p: p != null) [
- zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto arch sw_vers
+ zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto
];
in
stdenv.mkDerivation {
Index: development/interpreters/python/2.6/default.nix
===================================================================
--- development/interpreters/python/2.6/default.nix (revision 33620)
+++ development/interpreters/python/2.6/default.nix (working copy)
@@ -1,11 +1,8 @@
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2
, sqlite, tcl, tk, x11, openssl, readline, db4, ncurses, gdbm
-, darwinArchUtility ? null, darwinSwVersUtility ? null
}:
assert zlibSupport -> zlib != null;
-assert stdenv.isDarwin -> darwinArchUtility != null;
-assert stdenv.isDarwin -> darwinSwVersUtility != null;
with stdenv.lib;
@@ -33,8 +30,7 @@
buildInputs =
optional (stdenv ? gcc && stdenv.gcc.libc != null) stdenv.gcc.libc ++
[ bzip2 ]
- ++ optional zlibSupport zlib
- ++ optionals stdenv.isDarwin [ darwinArchUtility darwinSwVersUtility ];
+ ++ optional zlibSupport zlib;
# Build the basic Python interpreter without modules that have
Index: development/interpreters/python/2.7/default.nix
===================================================================
--- development/interpreters/python/2.7/default.nix (revision 33620)
+++ development/interpreters/python/2.7/default.nix (working copy)
@@ -1,11 +1,8 @@
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2
, sqlite, tcl, tk, x11, openssl, readline, db4, ncurses, gdbm
-, darwinArchUtility ? null, darwinSwVersUtility ? null
}:
assert zlibSupport -> zlib != null;
-assert stdenv.isDarwin -> darwinArchUtility != null;
-assert stdenv.isDarwin -> darwinSwVersUtility != null;
with stdenv.lib;
@@ -39,8 +36,7 @@
buildInputs =
optional (stdenv ? gcc && stdenv.gcc.libc != null) stdenv.gcc.libc ++
[ bzip2 openssl ]
- ++ optional zlibSupport zlib
- ++ optionals stdenv.isDarwin [ darwinArchUtility darwinSwVersUtility ];
+ ++ optional zlibSupport zlib;
ensurePurity =
''
Index: development/libraries/yajl/default.nix
===================================================================
--- development/libraries/yajl/default.nix (revision 33620)
+++ development/libraries/yajl/default.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, cmake, ruby, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, cmake, ruby }:
stdenv.mkDerivation {
name = "yajl-2.0.1";
@@ -9,8 +9,7 @@
sha256 = "08a7bgmdpvi6w9f9bxx5f42njwmwzdf6jz3w6ila7jgbl5mhknf2";
};
- buildInputs = [ cmake ruby ]
- ++ stdenv.lib.optional stdenv.isDarwin darwinInstallNameToolUtility;
+ buildInputs = [ cmake ruby ];
meta = {
description = "Yet Another JSON Library";
Index: development/libraries/mesa/default.nix
===================================================================
--- development/libraries/mesa/default.nix (revision 33620)
+++ development/libraries/mesa/default.nix (working copy)
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, flex, bison, pkgconfig, libdrm, file, expat, makedepend
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
, libXt, udev, enableTextureFloats ? false
-, python, libxml2Python, lipo ? null }:
+, python, libxml2Python }:
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
@@ -32,7 +32,7 @@
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
buildInputs = [ expat libdrm libXxf86vm libXfixes libXdamage glproto dri2proto
- libxml2Python libX11 libXext libxcb lipo libXt udev ];
+ libxml2Python libX11 libXext libxcb libXt udev ];
buildNativeInputs = [ pkgconfig python makedepend file flex bison ];
Index: development/compilers/ghc/head.nix
===================================================================
--- development/compilers/ghc/head.nix (revision 33620)
+++ development/compilers/ghc/head.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.4.0.20120126";
@@ -10,8 +10,7 @@
sha256 = "0arnvzhwjzk2z3m2891b4z13p4v1c84f31jgyj13a1fbfpylgs64";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/ghc/7.0.2.nix
===================================================================
--- development/compilers/ghc/7.0.2.nix (revision 33620)
+++ development/compilers/ghc/7.0.2.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.0.2";
@@ -9,8 +9,7 @@
sha256 = "f0551f1af2f008a8a14a888b70c0557e00dd04f9ae309ac91897306cd04a6668";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/ghc/7.0.3.nix
===================================================================
--- development/compilers/ghc/7.0.3.nix (revision 33620)
+++ development/compilers/ghc/7.0.3.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.0.3";
@@ -9,8 +9,7 @@
sha256 = "1nfc2c6bdcdfg3f3d9q5v109jrrwhz6by3qa4qi7k0xbip16jq8m";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/ghc/7.2.1.nix
===================================================================
--- development/compilers/ghc/7.2.1.nix (revision 33620)
+++ development/compilers/ghc/7.2.1.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.2.1";
@@ -9,8 +9,7 @@
sha256 = "099w2bvx07jq4b1k8f1hspri30wbk35dz6ilsivxr2xg661c2qjm";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/ghc/7.0.4.nix
===================================================================
--- development/compilers/ghc/7.0.4.nix (revision 33620)
+++ development/compilers/ghc/7.0.4.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.0.4";
@@ -9,8 +9,7 @@
sha256 = "1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/ghc/7.2.2.nix
===================================================================
--- development/compilers/ghc/7.2.2.nix (revision 33620)
+++ development/compilers/ghc/7.2.2.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.2.2";
@@ -9,8 +9,7 @@
sha256 = "0g87d3z9275dniaqzkf56qfgzp1msd89nqqhhm2gkc6iga072spz";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/ghc/7.4.1.nix
===================================================================
--- development/compilers/ghc/7.4.1.nix (revision 33620)
+++ development/compilers/ghc/7.4.1.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.4.1";
@@ -9,8 +9,7 @@
sha256 = "0ycscsagyy9n796a59q6761s6ar50d8inibvnrcp96siksj0j73j";
};
- buildInputs = [ghc perl gmp ncurses] ++
- (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+ buildInputs = [ ghc perl gmp ncurses ];
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
Index: development/compilers/llvm/clang.nix
===================================================================
--- development/compilers/llvm/clang.nix (revision 33620)
+++ development/compilers/llvm/clang.nix (working copy)
@@ -1,11 +1,11 @@
-{ stdenv, fetchurl, perl, groff, llvm, cmake, darwinInstallNameToolUtility }:
+{ stdenv, fetchurl, perl, groff, llvm, cmake }:
let version = "3.0"; in
stdenv.mkDerivation {
name = "clang-${version}";
- buildInputs = [ perl llvm groff cmake ] ++ stdenv.lib.optional stdenv.isDarwin darwinInstallNameToolUtility;
+ buildInputs = [ perl llvm groff cmake ];
patches = stdenv.lib.optionals (stdenv.gcc.libc != null)
[ ./clang-include-paths.patch ./clang-ld-flags.patch ];
Index: development/compilers/llvm/default.nix
===================================================================
--- development/compilers/llvm/default.nix (revision 33620)
+++ development/compilers/llvm/default.nix (working copy)
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, groff, darwinSwVersUtility, darwinInstallNameToolUtility, cmake }:
+{ stdenv, fetchurl, perl, groff, cmake }:
let version = "3.0"; in
@@ -10,8 +10,7 @@
sha256 = "0xq4gi7lflv8ilfckslhfvnja5693xjii1yvzz39kklr6hfv37ji";
};
- buildInputs = [ perl groff cmake ] ++
- stdenv.lib.optionals stdenv.isDarwin [ darwinSwVersUtility darwinInstallNameToolUtility ];
+ buildInputs = [ perl groff cmake ];
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
Index: development/web/nodejs/default.nix
===================================================================
--- development/web/nodejs/default.nix (revision 33620)
+++ development/web/nodejs/default.nix (working copy)
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, openssl, python, zlib, v8, darwinInstallNameToolUtility }:
+{ stdenv, fetchurl, openssl, python, zlib, v8 }:
stdenv.mkDerivation rec {
version = "0.6.11";
@@ -27,7 +27,7 @@
install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
'';
- buildInputs = [ python openssl v8 zlib ] ++ stdenv.lib.optional stdenv.isDarwin darwinInstallNameToolUtility;
+ buildInputs = [ python openssl v8 zlib ];
meta = with stdenv.lib; {
description = "Event-driven I/O framework for the V8 JavaScript engine";
Index: servers/sql/mysql55/default.nix
===================================================================
--- servers/sql/mysql55/default.nix (revision 33620)
+++ servers/sql/mysql55/default.nix (working copy)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, cmake, bison, ncurses, openssl, readline, zlib, darwinInstallNameToolUtility, perl}:
+{ stdenv, fetchurl, cmake, bison, ncurses, openssl, readline, zlib, perl }:
# Note: zlib is not required; MySQL can use an internal zlib.
@@ -10,8 +10,8 @@
sha256 = "03jl60mzrsd1jb8fvkz6c8j2239b37k8n1i07jk1q4yk58aq8ynh";
};
- buildInputs = [ cmake bison ncurses openssl readline zlib ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwinInstallNameToolUtility perl ];
-
+ buildInputs = [ cmake bison ncurses openssl readline zlib ];
+
cmakeFlags = "-DWITH_SSL=yes -DWITH_READLINE=yes -DWITH_EMBEDDED_SERVER=yes -DWITH_ZLIB=yes -DINSTALL_SCRIPTDIR=bin -DHAVE_IPV6=yes";
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
Index: top-level/all-packages.nix
===================================================================
--- top-level/all-packages.nix (revision 33620)
+++ top-level/all-packages.nix (working copy)
@@ -2725,15 +2725,9 @@
python27 = callPackage ../development/interpreters/python/2.7 { };
- python31 = callPackage ../development/interpreters/python/3.1 {
- arch = if stdenv.isDarwin then pkgs.darwinArchUtility else null;
- sw_vers = if stdenv.isDarwin then pkgs.darwinSwVersUtility else null;
- };
+ python31 = callPackage ../development/interpreters/python/3.1 { };
- python32 = callPackage ../development/interpreters/python/3.2 {
- arch = if stdenv.isDarwin then pkgs.darwinArchUtility else null;
- sw_vers = if stdenv.isDarwin then pkgs.darwinSwVersUtility else null;
- };
+ python32 = callPackage ../development/interpreters/python/3.2 { };
pythonFull = python27Full;
@@ -4346,9 +4340,7 @@
system == "x86_64-darwin" ||
system == "i686-darwin";
- mesa = callPackage ../development/libraries/mesa {
- lipo = if stdenv.isDarwin then darwinLipoUtility else null;
- };
+ mesa = callPackage ../development/libraries/mesa { };
metaEnvironment = recurseIntoAttrs (let callPackage = newScope pkgs.metaEnvironment; in rec {
sdfLibrary = callPackage ../development/libraries/sdf-library { aterm = aterm28; };
@@ -5364,14 +5356,6 @@
cramfsswap = callPackage ../os-specific/linux/cramfsswap { };
- darwinArchUtility = callPackage ../os-specific/darwin/arch { };
-
- darwinSwVersUtility = callPackage ../os-specific/darwin/sw_vers { };
-
- darwinLipoUtility = callPackage ../os-specific/darwin/lipo { };
-
- darwinInstallNameToolUtility = callPackage ../os-specific/darwin/install_name_tool { };
-
devicemapper = lvm2;
dmidecode = callPackage ../os-specific/linux/dmidecode { };
Index: build-support/native-darwin-cctools-wrapper/builder.sh
===================================================================
--- build-support/native-darwin-cctools-wrapper/builder.sh (revision 33620)
+++ build-support/native-darwin-cctools-wrapper/builder.sh (working copy)
@@ -1,6 +1,16 @@
source $stdenv/setup
mkdir -p $out/bin
-for i in ar as c++filt gprof ld nm nmedit ranlib size strings strip dsymutil libtool; do
- ln -s /usr/bin/$i $out/bin/
+for i in $binaries
+do
+ ln -s "/usr/bin/$i" "$out/bin/"
done
+
+# MIG assumes the standard Darwin core utilities (e.g., `rm -d'), so
+# let it see the impure directories.
+cat > "$out/bin/mig" <<EOF
+#!/bin/sh
+export PATH="/usr/bin:/bin:\$PATH"
+exec /usr/bin/mig "\$@"
+EOF
+chmod +x "$out/bin/mig"
Index: build-support/native-darwin-cctools-wrapper/default.nix
===================================================================
--- build-support/native-darwin-cctools-wrapper/default.nix (revision 33620)
+++ build-support/native-darwin-cctools-wrapper/default.nix (working copy)
@@ -2,5 +2,14 @@
stdenv.mkDerivation {
name = "native-darwin-cctools-wrapper";
+
+ # Standard binaries normally found under /usr/bin (MIG is omitted here, and
+ # handled specially in ./builder.sh).
+ binaries =
+ [ "ar" "as" "c++filt" "gprof" "ld" "nm" "nmedit" "ranlib"
+ "size" "strings" "strip" "dsymutil" "libtool" "lipo"
+ "install_name_tool" "arch" "sw_vers"
+ ];
+
builder = ./builder.sh;
}
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev