diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/fetchzip/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/configuration-nix.nix | 6 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 1 | ||||
-rw-r--r-- | pkgs/development/libraries/libusb1/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 10 |
5 files changed, 17 insertions, 13 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix index 4a5381d71f20..f1b9b9290d4c 100644 --- a/pkgs/build-support/fetchzip/default.nix +++ b/pkgs/build-support/fetchzip/default.nix @@ -14,7 +14,7 @@ , name ? "source" , ... } @ args: -lib.overrideDerivation (fetchurl ({ +(fetchurl ({ inherit name; recursiveHash = true; @@ -23,8 +23,6 @@ lib.overrideDerivation (fetchurl ({ postFetch = '' - export PATH=${unzip}/bin:$PATH - unpackDir="$TMPDIR/unpack" mkdir "$unpackDir" cd "$unpackDir" @@ -48,6 +46,7 @@ lib.overrideDerivation (fetchurl ({ mv "$unpackDir" "$out" '') #*/ + extraPostFetch; -} // removeAttrs args [ "stripRoot" "extraPostFetch" ])) -# Hackety-hack: we actually need unzip hooks, too -(x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];}) +} // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: { + # Hackety-hack: we actually need unzip hooks, too + nativeBuildInputs = x.nativeBuildInputs ++ [ unzip ]; +}) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index d363d2e87b69..cf53f9e2b510 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -126,9 +126,9 @@ self: super: builtins.intersectAttrs super { # the system-fileio tests use canonicalizePath, which fails in the sandbox system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio; - # Prevents needing to add security_tool as a build tool to all of x509-system's - # dependencies. - x509-system = if pkgs.stdenv.targetPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc + # Prevents needing to add `security_tool` as a run-time dependency for + # everything using x509-system to give access to the `security` executable. + x509-system = if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc then let inherit (pkgs.darwin) security_tool; in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: { postPatch = (drv.postPatch or "") + '' diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 1b33954662db..be104a82fd77 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -120,6 +120,7 @@ let "--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg" "--with-gcc=${stdenv.cc.targetPrefix}cc" "--with-ld=${stdenv.cc.bintools.targetPrefix}ld" + "--with-ar=${stdenv.cc.bintools.targetPrefix}ar" # use the one that comes with the cross compiler. "--with-hsc2hs=${ghc.targetPrefix}hsc2hs" "--with-strip=${stdenv.cc.bintools.targetPrefix}strip" diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 69afd9d4c691..7ec714f02237 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { meta = { homepage = http://www.libusb.info; description = "User-space USB library"; - platforms = stdenv.lib.platforms.unix; + platforms = stdenv.lib.platforms.all; maintainers = [ ]; }; } diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index d3fb0970cd00..d348f877f722 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -3,7 +3,7 @@ , static ? false }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "zlib-${version}"; version = "1.2.11"; @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { # what causes this difference. + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/lib/*.so* $out/lib/*.dylib* ; do - install_name_tool -id "$file" $file + ${stdenv.cc.bintools.targetPrefix}install_name_tool -id "$file" $file done '' # Non-typical naming confuses libtool which then refuses to use zlib's DLL @@ -78,4 +78,8 @@ stdenv.mkDerivation rec { license = licenses.zlib; platforms = platforms.all; }; -} +} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { + preConfigure = '' + export CHOST=${stdenv.hostPlatform.config} + ''; +}) |