From 6e9bd9385da811a79d0b711e14ee2e1ae02ca433 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sun, 28 Jul 2019 10:08:18 -0700 Subject: [PATCH] duc: optional x11/cairo Also enable darwin hydra builds. --- pkgs/tools/misc/duc/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/duc/default.nix b/pkgs/tools/misc/duc/default.nix index f5091ac9720a..82b29bb67f66 100644 --- a/pkgs/tools/misc/duc/default.nix +++ b/pkgs/tools/misc/duc/default.nix @@ -1,4 +1,10 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, tokyocabinet, cairo, pango, ncurses }: +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, tokyocabinet, ncurses +, cairo ? null, pango ? null +, enableCairo ? stdenv.isLinux +}: + +assert enableCairo -> cairo != null && pango != null; stdenv.mkDerivation rec { name = "duc-${version}"; @@ -12,14 +18,18 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; - buildInputs = [ tokyocabinet cairo pango ncurses ]; + buildInputs = [ tokyocabinet ncurses ] ++ + stdenv.lib.optionals enableCairo [ cairo pango ]; + + configureFlags = + stdenv.lib.optionals (!enableCairo) [ "--disable-x11" "--disable-cairo" ]; meta = with stdenv.lib; { homepage = http://duc.zevv.nl/; description = "Collection of tools for inspecting and visualizing disk usage"; license = licenses.gpl2; - platforms = platforms.linux; + platforms = platforms.all; maintainers = [ maintainers.lethalman ]; }; }