poke: cross-compilation support
This commit is contained in:
parent
e2c8b46d0c
commit
594b214796
1 changed files with 8 additions and 5 deletions
|
@ -15,7 +15,9 @@
|
||||||
, dejagnu
|
, dejagnu
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "poke";
|
pname = "poke";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
|
|
||||||
|
@ -37,11 +39,12 @@ stdenv.mkDerivation rec {
|
||||||
texinfo
|
texinfo
|
||||||
] ++ lib.optional guiSupport makeWrapper;
|
] ++ lib.optional guiSupport makeWrapper;
|
||||||
|
|
||||||
buildInputs = [ boehmgc dejagnu readline ]
|
buildInputs = [ boehmgc readline ]
|
||||||
++ lib.optional guiSupport tk
|
++ lib.optional guiSupport tk
|
||||||
++ lib.optional miSupport json_c
|
++ lib.optional miSupport json_c
|
||||||
++ lib.optional nbdSupport libnbd
|
++ lib.optional nbdSupport libnbd
|
||||||
++ lib.optional textStylingSupport gettext;
|
++ lib.optional textStylingSupport gettext
|
||||||
|
++ lib.optional (!isCross) dejagnu;
|
||||||
|
|
||||||
configureFlags = lib.optionals guiSupport [
|
configureFlags = lib.optionals guiSupport [
|
||||||
"--with-tcl=${tcl}/lib"
|
"--with-tcl=${tcl}/lib"
|
||||||
|
@ -51,8 +54,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = !isCross;
|
||||||
checkInputs = [ dejagnu ];
|
checkInputs = lib.optionals (!isCross) [ dejagnu ];
|
||||||
|
|
||||||
postFixup = lib.optionalString guiSupport ''
|
postFixup = lib.optionalString guiSupport ''
|
||||||
wrapProgram "$out/bin/poke-gui" \
|
wrapProgram "$out/bin/poke-gui" \
|
||||||
|
|
Loading…
Reference in a new issue