1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

libcaca: make x11 optional, disabled on darwin

This commit is contained in:
Jorge Acereda 2019-03-15 10:41:00 +01:00
parent 66504c0671
commit 3152d499a9

View file

@ -1,4 +1,6 @@
{ stdenv, fetchurl, ncurses, zlib, imlib2, pkgconfig, libX11, libXext }:
{ stdenv, fetchurl, ncurses, zlib, pkgconfig, imlib2
, x11Support ? !stdenv.isDarwin, libX11, libXext
}:
stdenv.mkDerivation rec {
name = "libcaca-0.99.beta19";
@ -13,8 +15,16 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "man" ];
propagatedBuildInputs = [ ncurses zlib imlib2 pkgconfig libX11 ]
++ stdenv.lib.optional stdenv.isDarwin libXext;
configureFlags = [
(if x11Support then "--enable-x11" else "--disable-x11")
];
NIX_CFLAGS_COMPILE = stdenv.lib.optional (!x11Support) "-DX_DISPLAY_MISSING";
enableParallelBuilding = true;
propagatedBuildInputs = [ ncurses zlib pkgconfig (imlib2.override { inherit x11Support; }) ]
++ stdenv.lib.optionals x11Support [ libX11 libXext];
postInstall = ''
mkdir -p $dev/bin