summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/mp/mpp
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/mp/mpp')
-rwxr-xr-xpkgs/by-name/mp/mpp/mpp.sh17
-rw-r--r--pkgs/by-name/mp/mpp/package.unstable.nix (renamed from pkgs/by-name/mp/mpp/package.nix)43
2 files changed, 46 insertions, 14 deletions
diff --git a/pkgs/by-name/mp/mpp/mpp.sh b/pkgs/by-name/mp/mpp/mpp.sh
index 538a56ee..e52bfcdc 100755
--- a/pkgs/by-name/mp/mpp/mpp.sh
+++ b/pkgs/by-name/mp/mpp/mpp.sh
@@ -1,9 +1,16 @@
#!/usr/bin/env dash
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
-case "$1" in
+case "${1-}" in
"searchadd")
shift 1
mpp-searchadd "$@"
@@ -16,6 +23,10 @@ case "$1" in
shift 1
mpp-beetrm "$@"
;;
+"popm")
+ shift 1
+ mpdpopm "$@"
+ ;;
*)
mpc "$@"
;;
diff --git a/pkgs/by-name/mp/mpp/package.nix b/pkgs/by-name/mp/mpp/package.unstable.nix
index 9c5315b0..fe08ba46 100644
--- a/pkgs/by-name/mp/mpp/package.nix
+++ b/pkgs/by-name/mp/mpp/package.unstable.nix
@@ -1,20 +1,37 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
- sysLib,
- mpc,
- fd,
+ writeShellApplication,
symlinkJoin,
stdenv,
+ # Dependencies
+ mpc,
+ mpp-searchadd,
+ mpp-lyrics,
+ mpp-beetrm,
+ mpdpopm,
+ # Build dependencies
+ fd,
zsh,
}: let
- script = sysLib.writeShellScript {
+ script = writeShellApplication {
name = "mpp";
- src = ./mpp.sh;
- generateCompletions = false;
- # We source the wrappers from the environment, to ensure that they have the same
- # configurations (e.g. MPD_MUSIC_DIR in `mpc-lyrics`)
- keepPath = true;
- dependencies = [
+ text = builtins.readFile ./mpp.sh;
+ inheritPath = false;
+
+ runtimeInputs = [
mpc
+ mpp-searchadd
+ mpp-lyrics
+ mpp-beetrm
+ mpdpopm
];
};
@@ -55,6 +72,8 @@
fd "." --hidden --type file | while read -r file_path; do
sed --in-place 's/mpc/mpp/g' "$file_path"
done
+
+ # TODO(@bpeetz): Also change this in man-pages. <2025-05-20>
'';
installPhase = ''
@@ -64,6 +83,8 @@
};
in
symlinkJoin {
- name = "mpp-merged";
+ name = "mpp";
paths = [script mpcShare];
+
+ inherit (script) meta;
}