ncmpc: optionally use pcre

This commit is contained in:
Philipp Gesang 2019-11-09 09:43:57 +01:00
parent 364ae632c6
commit b7346c2109
No known key found for this signature in database
GPG Key ID: 1360EC0B3CC3D66D

View File

@ -1,5 +1,12 @@
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, glib, ncurses
, mpd_clientlib, gettext, boost }:
, mpd_clientlib, gettext, boost
, pcreSupport ? false
, pcre ? null
}:
with stdenv.lib;
assert pcreSupport -> pcre != null;
stdenv.mkDerivation rec {
pname = "ncmpc";
@ -12,14 +19,14 @@ stdenv.mkDerivation rec {
sha256 = "1ssmk1p43gjhcqi86sh6b7csqpwwpf3hs32cmnylv6pmbcwbs69h";
};
buildInputs = [ glib ncurses mpd_clientlib boost ];
buildInputs = [ glib ncurses mpd_clientlib boost ]
++ optional pcreSupport pcre;
nativeBuildInputs = [ meson ninja pkgconfig gettext ];
mesonFlags = [
"-Dlirc=disabled"
"-Dregex=disabled"
"-Ddocumentation=disabled"
];
] ++ optional (!pcreSupport) "-Dregex=disabled";
meta = with stdenv.lib; {
description = "Curses-based interface for MPD (music player daemon)";