about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/larbs-music/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/larbs-music/default.nix b/pkgs/larbs-music/default.nix
index 1dde000..aec9e5f 100644
--- a/pkgs/larbs-music/default.nix
+++ b/pkgs/larbs-music/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildEnv, makeWrapper, makeDesktopItem, callPackage, ncmpcpp, libnotify }:
+{ stdenv, buildEnv, makeWrapper, makeDesktopItem, callPackage, ncmpcpp, libnotify, musicDir ? "~/Music" }:
 with stdenv.lib;
 
 let
@@ -18,8 +18,10 @@ let
     buildInputs = [ makeWrapper ];
 
     installPhase = ''
+      mkdir -p $out/share/ncmpcpp
+      sed 's:mpd_music_dir.*:mpd_music_dir = "${musicDir}":' ${config} > $out/share/ncmpcpp/config
       makeWrapper ${vizNcmpcpp}/bin/ncmpcpp $out/bin/ncmpcpp \
-      --add-flags "-c ${config}" \
+      --add-flags "-c $out/share/ncmpcpp/config" \
       --add-flags "-b ${bindings}"
     '';