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