about summary refs log tree commit diff
path: root/pkgs/applications/audio/ncmpc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/ncmpc/default.nix')
-rw-r--r--pkgs/applications/audio/ncmpc/default.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix
index 4fa9626332be..58eb5462ef84 100644
--- a/pkgs/applications/audio/ncmpc/default.nix
+++ b/pkgs/applications/audio/ncmpc/default.nix
@@ -1,25 +1,32 @@
 { 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";
-  version = "0.35";
+  version = "0.36";
 
   src = fetchFromGitHub {
     owner  = "MusicPlayerDaemon";
     repo   = "ncmpc";
     rev    = "v${version}";
-    sha256 = "0hhc5snxy5fbg47ynz4b7fkmzdy974zxqr0cqc6kh15yvbr25ikh";
+    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)";