GNU Parted: Allow cross-GNU builds.
svn path=/nixpkgs/branches/stdenv-updates/; revision=25088
This commit is contained in:
parent
0847b74a2c
commit
ef8619b4b2
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline
|
{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline
|
||||||
, utillinuxng, xz }:
|
, utillinuxng, xz, enableStatic ? false, hurd ? null }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "parted-2.3";
|
name = "parted-2.3";
|
||||||
@ -9,14 +9,26 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0sabj81nawcjm8ww34lxg65ka8crv3w2ab4crh8ypw5agg681836";
|
sha256 = "0sabj81nawcjm8ww34lxg65ka8crv3w2ab4crh8ypw5agg681836";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ xz libuuid gettext readline libuuid devicemapper ];
|
buildNativeInputs = [ xz ];
|
||||||
|
buildInputs = [ libuuid ]
|
||||||
|
++ stdenv.lib.optional (readline != null) readline
|
||||||
|
++ stdenv.lib.optional (gettext != null) gettext
|
||||||
|
++ stdenv.lib.optional (devicemapper != null) devicemapper
|
||||||
|
++ stdenv.lib.optional (hurd != null) hurd;
|
||||||
|
|
||||||
configureFlags = "--with-readline";
|
configureFlags =
|
||||||
|
(if (readline != null)
|
||||||
|
then [ "--with-readline" ]
|
||||||
|
else [ "--without-readline" ])
|
||||||
|
++ stdenv.lib.optional (devicemapper == null) "--disable-device-mapper"
|
||||||
|
++ stdenv.lib.optional enableStatic "--enable-static";
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
# The `t0400-loop-clobber-infloop.sh' test wants `mkswap'.
|
preCheck =
|
||||||
preCheck = "export PATH=\"${utillinuxng}/sbin:$PATH\"";
|
stdenv.lib.optionalString doCheck
|
||||||
|
# The `t0400-loop-clobber-infloop.sh' test wants `mkswap'.
|
||||||
|
"export PATH=\"${utillinuxng}/sbin:$PATH\"";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "GNU Parted, a tool to create, destroy, resize, check, and copy partitions";
|
description = "GNU Parted, a tool to create, destroy, resize, check, and copy partitions";
|
||||||
|
@ -1014,6 +1014,18 @@ let
|
|||||||
|
|
||||||
parted = callPackage ../tools/misc/parted { };
|
parted = callPackage ../tools/misc/parted { };
|
||||||
|
|
||||||
|
hurdPartedCross = (callPackage ../tools/misc/parted {
|
||||||
|
# Needs the Hurd's libstore.
|
||||||
|
hurd = hurdCrossIntermediate;
|
||||||
|
|
||||||
|
# The Hurd wants a libparted.a.
|
||||||
|
enableStatic = true;
|
||||||
|
|
||||||
|
gettext = null;
|
||||||
|
readline = null;
|
||||||
|
devicemapper = null;
|
||||||
|
}).hostDrv;
|
||||||
|
|
||||||
patch = gnupatch;
|
patch = gnupatch;
|
||||||
|
|
||||||
pbzip2 = callPackage ../tools/compression/pbzip2 { };
|
pbzip2 = callPackage ../tools/compression/pbzip2 { };
|
||||||
@ -4588,10 +4600,11 @@ let
|
|||||||
# intermediate GCC.
|
# intermediate GCC.
|
||||||
gccCross = gccCrossStageStatic;
|
gccCross = gccCrossStageStatic;
|
||||||
|
|
||||||
# This intermediate Hurd is only needed to build libpthread, which really
|
# This intermediate Hurd is only needed to build libpthread, which needs
|
||||||
# only needs libihash.
|
# libihash, and to build Parted, which needs libstore and
|
||||||
buildTarget = "libihash";
|
# libshouldbeinlibc.
|
||||||
installTarget = "libihash-install";
|
buildTarget = "libihash libstore libshouldbeinlibc";
|
||||||
|
installTarget = "libihash-install libstore-install libshouldbeinlibc-install";
|
||||||
});
|
});
|
||||||
|
|
||||||
hurdHeaders = callPackage ../os-specific/gnu/hurd {
|
hurdHeaders = callPackage ../os-specific/gnu/hurd {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user