herbstluftwm: fix cross compilation
Doc generation is disabled by default when cross compiling because asciidoc does not cross compile for now
This commit is contained in:
parent
c1daf6eab8
commit
74274b4d7c
|
@ -1,4 +1,10 @@
|
||||||
{ stdenv, fetchurl, cmake, pkgconfig, glib, libX11, libXext, libXinerama, libXrandr, asciidoc }:
|
{ stdenv, fetchurl, cmake, pkgconfig, glib, libX11, libXext, libXinerama, libXrandr
|
||||||
|
, withDoc ? stdenv.buildPlatform == stdenv.targetPlatform, asciidoc ? null }:
|
||||||
|
|
||||||
|
# Doc generation is disabled by default when cross compiling because asciidoc
|
||||||
|
# does not cross compile for now
|
||||||
|
|
||||||
|
assert withDoc -> asciidoc != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "herbstluftwm";
|
pname = "herbstluftwm";
|
||||||
|
@ -11,19 +17,19 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
|
] ++ stdenv.lib.optionals withDoc [
|
||||||
"doc"
|
"doc"
|
||||||
"man"
|
"man"
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DCMAKE_INSTALL_SYSCONF_PREFIX=${placeholder "out"}/etc"
|
"-DCMAKE_INSTALL_SYSCONF_PREFIX=${placeholder "out"}/etc"
|
||||||
];
|
] ++ stdenv.lib.optional (!withDoc) "-DWITH_DOCUMENTATION=OFF";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkgconfig
|
pkgconfig
|
||||||
asciidoc
|
] ++ stdenv.lib.optional withDoc asciidoc;
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib
|
glib
|
||||||
|
|
Loading…
Reference in New Issue