Merge pull request #100388 from thefloweringash/darwin-dylib-names-hook

treewide: move fixDarwinDylibNames to nativeBuildInputs
This commit is contained in:
Daiderd Jordan 2020-10-21 19:25:48 +02:00 committed by GitHub
commit bb0b872b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 91 additions and 76 deletions

View File

@ -24,10 +24,10 @@ stdenv.mkDerivation rec {
buildInputs = buildInputs =
[ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2 [ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2
zlib libtool libwebp zlib libtool libwebp
] ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
nativeBuildInputs = [ xz ]; nativeBuildInputs = [ xz ]
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
postInstall = '' postInstall = ''
sed -i 's/-ltiff.*'\'/\'/ $out/bin/* sed -i 's/-ltiff.*'\'/\'/ $out/bin/*

View File

@ -1,6 +1,6 @@
{ lib, mkDerivation, fetchFromGitHub, fetchpatch { lib, mkDerivation, fetchFromGitHub, fetchpatch
, python, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns , python, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns
, which, perl, makeWrapper, fixDarwinDylibNames , which, perl, makeWrapper
}: }:
mkDerivation rec { mkDerivation rec {

View File

@ -22,7 +22,8 @@ stdenv.mkDerivation rec {
sha256 = "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx"; sha256 = "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx";
}; };
buildInputs = [ python fixDarwinDylibNames ] nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ python ]
++ optional javaBindings jdk ++ optional javaBindings jdk
++ optionals ocamlBindings [ ocaml findlib zarith ] ++ optionals ocamlBindings [ ocaml findlib zarith ]
; ;

View File

@ -17,7 +17,8 @@ in mkDerivation {
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;
nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; nativeBuildInputs = [ autoPatchelfHook ]
++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
propagatedBuildInputs = [ curl tzdata ] ++ lib.optional hostPlatform.isLinux glibc; propagatedBuildInputs = [ curl tzdata ] ++ lib.optional hostPlatform.isLinux glibc;
installPhase = '' installPhase = ''

View File

@ -17,7 +17,8 @@ in mkDerivation {
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;
nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; nativeBuildInputs = [ autoPatchelfHook ]
++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ];

View File

@ -19,10 +19,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 lld ] 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 ] buildInputs = [ libxml2 llvm ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14" "-DCMAKE_CXX_FLAGS=-std=c++14"

View File

@ -21,9 +21,10 @@ stdenv.mkDerivation {
patchShebangs utils/cat_files.py patchShebangs utils/cat_files.py
''; '';
nativeBuildInputs = [ cmake ] 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 = [ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"

View File

@ -20,10 +20,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 lld ] 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 ] buildInputs = [ libxml2 llvm ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14" "-DCMAKE_CXX_FLAGS=-std=c++14"

View File

@ -19,10 +19,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 ] 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 ] buildInputs = [ libxml2 llvm ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"

View File

@ -25,9 +25,11 @@ stdenv.mkDerivation {
'' + lib.optionalString stdenv.hostPlatform.isMusl '' '' + lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py 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 = [ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"

View File

@ -19,10 +19,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 ] 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 ] buildInputs = [ libxml2 llvm ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"

View File

@ -25,9 +25,11 @@ stdenv.mkDerivation {
'' + lib.optionalString stdenv.hostPlatform.isMusl '' '' + lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py 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 = [ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"

View File

@ -20,10 +20,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 ] 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 ] buildInputs = [ libxml2 llvm lld ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"

View File

@ -24,9 +24,12 @@ stdenv.mkDerivation {
'' + lib.optionalString stdenv.hostPlatform.isMusl '' '' + lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py 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 = [ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"

View File

@ -20,10 +20,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 ] 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 ] buildInputs = [ libxml2 llvm lld ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"

View File

@ -25,9 +25,10 @@ stdenv.mkDerivation {
patchShebangs utils/cat_files.py patchShebangs utils/cat_files.py
''; '';
nativeBuildInputs = [ cmake ] 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 = [ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"

View File

@ -20,10 +20,10 @@ let
''; '';
nativeBuildInputs = [ cmake python3 ] 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 ] buildInputs = [ libxml2 llvm lld ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"

View File

@ -21,9 +21,10 @@ stdenv.mkDerivation {
patchShebangs utils/cat_files.py patchShebangs utils/cat_files.py
''; '';
nativeBuildInputs = [ cmake ] 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 = [ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"

View File

@ -17,9 +17,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ];
propagatedBuildInputs = [ propagatedBuildInputs = [
# Required by atk.pc # Required by atk.pc

View File

@ -146,11 +146,11 @@ stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ which ]; nativeBuildInputs = [ which ]
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
buildInputs = [ expat zlib bzip2 libiconv ] buildInputs = [ expat zlib bzip2 libiconv ]
++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu
++ optional stdenv.isDarwin fixDarwinDylibNames
++ optional enablePython python ++ optional enablePython python
++ optional enableNumpy python.pkgs.numpy; ++ optional enableNumpy python.pkgs.numpy;

View File

@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "man" "devdoc" ]; outputs = [ "bin" "dev" "out" "man" "devdoc" ];
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ autoreconfHook fixDarwinDylibNames pruneLibtoolFiles ]; nativeBuildInputs = [ autoreconfHook pruneLibtoolFiles ]
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = buildInputs =
[ openssl db gettext kerberos ] [ openssl db gettext kerberos ]
++ lib.optional enableLdap openldap ++ lib.optional enableLdap openldap

View File

@ -60,9 +60,7 @@ stdenv.mkDerivation rec {
gobject-introspection gobject-introspection
makeWrapper makeWrapper
glib glib
] ++ stdenv.lib.optional stdenv.isDarwin [ ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
fixDarwinDylibNames
];
propagatedBuildInputs = [ propagatedBuildInputs = [
glib glib

View File

@ -18,10 +18,11 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ libGL ]; propagatedBuildInputs = [ libGL ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ]
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ] 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" ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];

View File

@ -57,7 +57,7 @@ let
# FIXME: This fixes dylib references in the dylibs themselves, but # FIXME: This fixes dylib references in the dylibs themselves, but
# not in the programs in $out/bin. # 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 # remove dependency on bootstrap-tools in early stdenv build
postInstall = stdenv.lib.optionalString stdenv.isDarwin '' postInstall = stdenv.lib.optionalString stdenv.isDarwin ''

View File

@ -14,8 +14,8 @@ in stdenv.mkDerivation rec {
}; };
propagatedBuildInputs = [ glib ]; propagatedBuildInputs = [ glib ];
nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]; nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]
buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ snappy ]; buildInputs = [ snappy ];
nativeBuildInputs = [] nativeBuildInputs = []
++ stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ]; ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildPhase = '' buildPhase = ''
make all make all

View File

@ -9,8 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws"; sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws";
}; };
buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ] nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ];
cmakeFlags = [ cmakeFlags = [
"-DGDAL_CONFIG=${gdal}/bin/gdal-config" "-DGDAL_CONFIG=${gdal}/bin/gdal-config"

View File

@ -23,10 +23,13 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional sslSupport "openssl" ++ stdenv.lib.optional sslSupport "openssl"
; ;
nativeBuildInputs = []
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames
;
buildInputs = [] buildInputs = []
++ stdenv.lib.optional sslSupport openssl ++ stdenv.lib.optional sslSupport openssl
++ stdenv.lib.optional stdenv.isCygwin findutils ++ stdenv.lib.optional stdenv.isCygwin findutils
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames
; ;
doCheck = false; # needs the net doCheck = false; # needs the net

View File

@ -19,10 +19,10 @@ in stdenv.mkDerivation rec {
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ]; nativeBuildInputs = [ perl ]
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ zlib sqlite ] buildInputs = [ zlib sqlite ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
propagatedBuildInputs = [ nspr ]; propagatedBuildInputs = [ nspr ];

View File

@ -20,10 +20,9 @@ in stdenv.mkDerivation rec {
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ] 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 ] buildInputs = [ zlib sqlite ];
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
propagatedBuildInputs = [ nspr ]; propagatedBuildInputs = [ nspr ];

View File

@ -16,7 +16,7 @@ in stdenv.mkDerivation {
sha256 = "1g2wdchlwdihqj0ynx58nwyrpncxanghlnykgir97p0wimg3hnxl"; sha256 = "1g2wdchlwdihqj0ynx58nwyrpncxanghlnykgir97p0wimg3hnxl";
}; };
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ]; nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ oracle-instantclient ] buildInputs = [ oracle-instantclient ]
++ stdenv.lib.optionals stdenv.isLinux [ libaio ]; ++ stdenv.lib.optionals stdenv.isLinux [ libaio ];

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
cmake cmake
python python
doxygen doxygen
]; ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
checkInputs = [ checkInputs = [
gtest gtest
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
openssl openssl
boost boost
libpqxx libpqxx
] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; ];
# emulate the process of pulling catch down # emulate the process of pulling catch down
postPatch = '' postPatch = ''

View File

@ -18,9 +18,10 @@ stdenv.mkDerivation {
sha256 = "1c5axdngxaxj5vc6lr8sxb99mr5adsm1dnjckaxc23kq78pc8cn7"; sha256 = "1c5axdngxaxj5vc6lr8sxb99mr5adsm1dnjckaxc23kq78pc8cn7";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ]
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ boost llvmPackages.libclang ] buildInputs = [ boost llvmPackages.libclang ]
++ stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames Cocoa ]; ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin Cocoa;
buildPhase = '' buildPhase = ''
export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped} export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped}

View File

@ -4,8 +4,8 @@ stdenv.mkDerivation rec {
pname = "sndio"; pname = "sndio";
version = "1.7.0"; version = "1.7.0";
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = stdenv.lib.optionals stdenv.isLinux [ alsaLib ] nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
++ stdenv.lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isLinux alsaLib;
src = fetchurl { src = fetchurl {
url = "http://www.sndio.org/sndio-${version}.tar.gz"; url = "http://www.sndio.org/sndio-${version}.tar.gz";

View File

@ -34,12 +34,13 @@ common = rec { # attributes common to both builds
name = "mariadb-${version}.tar.gz"; name = "mariadb-${version}.tar.gz";
}; };
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ]
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ buildInputs = [
ncurses openssl zlib pcre libiconv curl ncurses openssl zlib pcre libiconv curl
] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ] ] ++ 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) [ jemalloc450 ]
++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ]; ++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ];

View File

@ -1,5 +1,5 @@
# This file was generated by go2nix, then modified by hand for Darwin support. # This file was generated by go2nix, then modified by hand for Darwin support.
{ stdenv, buildGoPackage, fetchFromGitHub, fixDarwinDylibNames, darwin }: { stdenv, buildGoPackage, fetchFromGitHub, darwin }:
buildGoPackage rec { buildGoPackage rec {
pname = "sudolikeaboss-unstable"; pname = "sudolikeaboss-unstable";
@ -17,9 +17,8 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
propagatedBuildInputs = with darwin.apple_sdk.frameworks; [ buildInputs = with darwin.apple_sdk.frameworks; [
Cocoa Cocoa
fixDarwinDylibNames
]; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {