From 2ac213c65cf4a06cfcfb6fc7c6e56da2ca098a6c Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 10 Nov 2020 13:30:06 +0100 Subject: Add custom music directory --- pkgs/larbs-music/default.nix | 6 ++++-- 1 file 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}" ''; -- cgit 1.4.1