diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix index b7a1a8c4a6f9..b8b21e71c930 100644 --- a/pkgs/applications/graphics/graphicsmagick/default.nix +++ b/pkgs/applications/graphics/graphicsmagick/default.nix @@ -24,10 +24,10 @@ stdenv.mkDerivation rec { buildInputs = [ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2 zlib libtool libwebp - ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + ]; - nativeBuildInputs = [ xz ]; + nativeBuildInputs = [ xz ] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; postInstall = '' sed -i 's/-ltiff.*'\'/\'/ $out/bin/* diff --git a/pkgs/applications/misc/klayout/default.nix b/pkgs/applications/misc/klayout/default.nix index 5f6c679f3ba1..0a8d7ce547f3 100644 --- a/pkgs/applications/misc/klayout/default.nix +++ b/pkgs/applications/misc/klayout/default.nix @@ -1,6 +1,6 @@ { lib, mkDerivation, fetchFromGitHub, fetchpatch , python, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns -, which, perl, makeWrapper, fixDarwinDylibNames +, which, perl, makeWrapper }: mkDerivation rec { diff --git a/pkgs/applications/science/logic/z3/default.nix b/pkgs/applications/science/logic/z3/default.nix index 88aafcdae222..dd71cf2cb1a8 100644 --- a/pkgs/applications/science/logic/z3/default.nix +++ b/pkgs/applications/science/logic/z3/default.nix @@ -22,7 +22,8 @@ stdenv.mkDerivation rec { sha256 = "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx"; }; - buildInputs = [ python fixDarwinDylibNames ] + nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = [ python ] ++ optional javaBindings jdk ++ optionals ocamlBindings [ ocaml findlib zarith ] ; diff --git a/pkgs/development/compilers/dmd/binary.nix b/pkgs/development/compilers/dmd/binary.nix index cd3a15889b21..2ff2b35060b8 100644 --- a/pkgs/development/compilers/dmd/binary.nix +++ b/pkgs/development/compilers/dmd/binary.nix @@ -17,7 +17,8 @@ in mkDerivation { dontConfigure = true; dontBuild = true; - nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; + nativeBuildInputs = [ autoPatchelfHook ] + ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames; propagatedBuildInputs = [ curl tzdata ] ++ lib.optional hostPlatform.isLinux glibc; installPhase = '' diff --git a/pkgs/development/compilers/ldc/binary.nix b/pkgs/development/compilers/ldc/binary.nix index 56d40be86194..cbdb56efb17f 100644 --- a/pkgs/development/compilers/ldc/binary.nix +++ b/pkgs/development/compilers/ldc/binary.nix @@ -17,7 +17,8 @@ in mkDerivation { dontConfigure = true; dontBuild = true; - nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; + nativeBuildInputs = [ autoPatchelfHook ] + ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ]; diff --git a/pkgs/development/compilers/llvm/10/clang/default.nix b/pkgs/development/compilers/llvm/10/clang/default.nix index a3d6e7e402ab..fef7720d726d 100644 --- a/pkgs/development/compilers/llvm/10/clang/default.nix +++ b/pkgs/development/compilers/llvm/10/clang/default.nix @@ -19,10 +19,10 @@ let ''; nativeBuildInputs = [ cmake python3 lld ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++14" diff --git a/pkgs/development/compilers/llvm/10/libc++/default.nix b/pkgs/development/compilers/llvm/10/libc++/default.nix index 651f1887553d..95711903932e 100644 --- a/pkgs/development/compilers/llvm/10/libc++/default.nix +++ b/pkgs/development/compilers/llvm/10/libc++/default.nix @@ -21,9 +21,10 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libcxxabi ]; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index 4f5e20cfe770..2de5f65b4a13 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 lld ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++14" diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index cd7d952243ce..b5e7b54fa5be 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -19,10 +19,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/5/libc++/default.nix b/pkgs/development/compilers/llvm/5/libc++/default.nix index f8185fc3ff4b..9bebedbc0442 100644 --- a/pkgs/development/compilers/llvm/5/libc++/default.nix +++ b/pkgs/development/compilers/llvm/5/libc++/default.nix @@ -25,9 +25,11 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; + nativeBuildInputs = [ cmake ] + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libcxxabi ]; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix index 8f6479fe2f4e..ec3effebfd77 100644 --- a/pkgs/development/compilers/llvm/6/clang/default.nix +++ b/pkgs/development/compilers/llvm/6/clang/default.nix @@ -19,10 +19,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/6/libc++/default.nix b/pkgs/development/compilers/llvm/6/libc++/default.nix index a922bcfaf0ea..727a32260872 100644 --- a/pkgs/development/compilers/llvm/6/libc++/default.nix +++ b/pkgs/development/compilers/llvm/6/libc++/default.nix @@ -25,9 +25,11 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; + nativeBuildInputs = [ cmake ] + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libcxxabi ]; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index 905ec862ad7e..969938681fe9 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm lld ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm lld ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/7/libc++/default.nix b/pkgs/development/compilers/llvm/7/libc++/default.nix index 83c05cf0e634..76baadf1c6e9 100644 --- a/pkgs/development/compilers/llvm/7/libc++/default.nix +++ b/pkgs/development/compilers/llvm/7/libc++/default.nix @@ -24,9 +24,12 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ] + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + + buildInputs = [ libcxxabi ] ; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index 2d7fc8068900..5c1dca5e33b1 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm lld ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm lld ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix index 9c0c7951c794..01e0d8e008cb 100644 --- a/pkgs/development/compilers/llvm/8/libc++/default.nix +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -25,9 +25,10 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libcxxabi ]; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index 81117e904d82..cfaee05944ca 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm lld ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm lld ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/9/libc++/default.nix b/pkgs/development/compilers/llvm/9/libc++/default.nix index cec6de61ca99..c9f0e6254ab4 100644 --- a/pkgs/development/compilers/llvm/9/libc++/default.nix +++ b/pkgs/development/compilers/llvm/9/libc++/default.nix @@ -21,9 +21,10 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libcxxabi ]; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix index b54ba5313011..aa132515b3e9 100644 --- a/pkgs/development/libraries/atk/default.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -17,9 +17,8 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - - nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]; + nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; propagatedBuildInputs = [ # Required by atk.pc diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 6d1c20f323d3..cb7a1f017888 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -145,11 +145,11 @@ stdenv.mkDerivation { enableParallelBuilding = true; - nativeBuildInputs = [ which ]; + nativeBuildInputs = [ which ] + ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ expat zlib bzip2 libiconv ] ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu - ++ optional stdenv.isDarwin fixDarwinDylibNames ++ optional enablePython python ++ optional enableNumpy python.pkgs.numpy; diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index 1ffb53599924..cd3fa3bb7fd2 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -18,7 +18,8 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "devdoc" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ autoreconfHook fixDarwinDylibNames pruneLibtoolFiles ]; + nativeBuildInputs = [ autoreconfHook pruneLibtoolFiles ] + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ openssl db gettext kerberos ] ++ lib.optional enableLdap openldap diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 08b8f70b2d9a..1c248d94fb6d 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -60,9 +60,7 @@ stdenv.mkDerivation rec { gobject-introspection makeWrapper glib - ] ++ stdenv.lib.optional stdenv.isDarwin [ - fixDarwinDylibNames - ]; + ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; propagatedBuildInputs = [ glib diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index 1b9fcb9586b3..fbc1cb818ca8 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -18,10 +18,11 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libGL ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] + ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ] - ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel fixDarwinDylibNames ]; + ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix index 81f75ad526a7..d8e9bd16ab89 100644 --- a/pkgs/development/libraries/icu/base.nix +++ b/pkgs/development/libraries/icu/base.nix @@ -57,7 +57,7 @@ let # FIXME: This fixes dylib references in the dylibs themselves, but # not in the programs in $out/bin. - buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; # remove dependency on bootstrap-tools in early stdenv build postInstall = stdenv.lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index 4ae4a71091e4..f89d4bc45341 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -14,8 +14,8 @@ in stdenv.mkDerivation rec { }; propagatedBuildInputs = [ glib ]; - nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]; - buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/leveldb/default.nix b/pkgs/development/libraries/leveldb/default.nix index 33eca603c267..14d426701ba3 100644 --- a/pkgs/development/libraries/leveldb/default.nix +++ b/pkgs/development/libraries/leveldb/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ snappy ]; nativeBuildInputs = [] - ++ stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ]; + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; buildPhase = '' make all diff --git a/pkgs/development/libraries/libLAS/default.nix b/pkgs/development/libraries/libLAS/default.nix index 95569c0a8132..27db14e71660 100644 --- a/pkgs/development/libraries/libLAS/default.nix +++ b/pkgs/development/libraries/libLAS/default.nix @@ -9,8 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws"; }; - buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ]; cmakeFlags = [ "-DGDAL_CONFIG=${gdal}/bin/gdal-config" diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index e23c7d55c5ed..cbde32067172 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -23,10 +23,13 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional sslSupport "openssl" ; + nativeBuildInputs = [] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames + ; + buildInputs = [] ++ stdenv.lib.optional sslSupport openssl ++ stdenv.lib.optional stdenv.isCygwin findutils - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames ; doCheck = false; # needs the net diff --git a/pkgs/development/libraries/nss/3.44.nix b/pkgs/development/libraries/nss/3.44.nix index ad58bfccaee6..1c89dd793316 100644 --- a/pkgs/development/libraries/nss/3.44.nix +++ b/pkgs/development/libraries/nss/3.44.nix @@ -19,10 +19,10 @@ in stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ perl ]; + nativeBuildInputs = [ perl ] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ zlib sqlite ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ zlib sqlite ]; propagatedBuildInputs = [ nspr ]; diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index e9ca475802d6..395617aa7bce 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -20,10 +20,9 @@ in stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ] - ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools; + ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ darwin.cctools fixDarwinDylibNames ]; - buildInputs = [ zlib sqlite ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ zlib sqlite ]; propagatedBuildInputs = [ nspr ]; diff --git a/pkgs/development/libraries/odpic/default.nix b/pkgs/development/libraries/odpic/default.nix index 6c3744493d21..7f27f7d1c179 100644 --- a/pkgs/development/libraries/odpic/default.nix +++ b/pkgs/development/libraries/odpic/default.nix @@ -16,7 +16,7 @@ in stdenv.mkDerivation { sha256 = "1g2wdchlwdihqj0ynx58nwyrpncxanghlnykgir97p0wimg3hnxl"; }; - nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ]; + nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; buildInputs = [ oracle-instantclient ] ++ stdenv.lib.optionals stdenv.isLinux [ libaio ]; diff --git a/pkgs/development/libraries/tiledb/default.nix b/pkgs/development/libraries/tiledb/default.nix index 2726ed7f237b..89318dd4e75b 100644 --- a/pkgs/development/libraries/tiledb/default.nix +++ b/pkgs/development/libraries/tiledb/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { cmake python doxygen - ]; + ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; checkInputs = [ gtest @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { openssl boost libpqxx - ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + ]; # emulate the process of pulling catch down postPatch = '' diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix index 02298d93b8af..4bbff3ca33f8 100644 --- a/pkgs/development/tools/misc/ycmd/default.nix +++ b/pkgs/development/tools/misc/ycmd/default.nix @@ -18,9 +18,10 @@ stdenv.mkDerivation { sha256 = "1c5axdngxaxj5vc6lr8sxb99mr5adsm1dnjckaxc23kq78pc8cn7"; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ boost llvmPackages.libclang ] - ++ stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames Cocoa ]; + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin Cocoa; buildPhase = '' export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped} diff --git a/pkgs/misc/sndio/default.nix b/pkgs/misc/sndio/default.nix index 46c505ed439c..34e60b8a4bb7 100644 --- a/pkgs/misc/sndio/default.nix +++ b/pkgs/misc/sndio/default.nix @@ -4,8 +4,8 @@ stdenv.mkDerivation rec { pname = "sndio"; version = "1.7.0"; enableParallelBuilding = true; - buildInputs = stdenv.lib.optionals stdenv.isLinux [ alsaLib ] - ++ stdenv.lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; + nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = stdenv.lib.optional stdenv.hostPlatform.isLinux alsaLib; src = fetchurl { url = "http://www.sndio.org/sndio-${version}.tar.gz"; diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 3ba4e367312c..96861ea898ce 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -34,12 +34,13 @@ common = rec { # attributes common to both builds name = "mariadb-${version}.tar.gz"; }; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig ] + ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ ncurses openssl zlib pcre libiconv curl ] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ] - ++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ] + ++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ] ++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ]; diff --git a/pkgs/tools/security/sudolikeaboss/default.nix b/pkgs/tools/security/sudolikeaboss/default.nix index 97db4a28c458..4c0b80d995a9 100644 --- a/pkgs/tools/security/sudolikeaboss/default.nix +++ b/pkgs/tools/security/sudolikeaboss/default.nix @@ -19,9 +19,11 @@ buildGoPackage rec { propagatedBuildInputs = with darwin.apple_sdk.frameworks; [ Cocoa - fixDarwinDylibNames ]; + propagatedNativeBuildInputs = + stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + meta = with stdenv.lib; { inherit version; inherit (src.meta) homepage;