about summary refs log tree commit diff stats
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-17 10:30:03 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-17 10:33:00 +0100
commite79a9d45c4756ac6d0ad72dd623bd698fbebfb33 (patch)
treedfb29fd6df9a1a8ef0847b2caca8115765582c0c /pkgs/by-name
parentrefactor(legacy/conf/mpd): Move to a unified `mpd` by-name module (diff)
downloadnixos-config-e79a9d45c4756ac6d0ad72dd623bd698fbebfb33.tar.gz
nixos-config-e79a9d45c4756ac6d0ad72dd623bd698fbebfb33.zip
fix(pkgs/mpp): Include the `mpc` zsh completions
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/mp/mpp/package.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/by-name/mp/mpp/package.nix b/pkgs/by-name/mp/mpp/package.nix
index 29ec1c80..9c5315b0 100644
--- a/pkgs/by-name/mp/mpp/package.nix
+++ b/pkgs/by-name/mp/mpp/package.nix
@@ -4,6 +4,7 @@
   fd,
   symlinkJoin,
   stdenv,
+  zsh,
 }: let
   script = sysLib.writeShellScript {
     name = "mpp";
@@ -18,7 +19,7 @@
   };
 
   mpcShare = stdenv.mkDerivation {
-    name = "${mpc.name}-only-share";
+    name = "mpp-only-share";
     nativeBuildInputs = [fd];
     strictDeps = true;
 
@@ -37,6 +38,11 @@
         mv "$file_path" "$new_file_path"
       }
 
+      # Copy the zsh bundled `mpc` completions to `mpp`
+      # TODO: Also add completions for the new subcommands <2024-11-17>
+      mkdir --parents share/zsh/site-functions;
+      cp "${zsh}/share/zsh/${zsh.version}/functions/_mpc" "share/zsh/site-functions"
+
       # Replace all reverences to `mpc`. First all files
       fd "mpc" "." --hidden --type file | while read -r file_path; do
         fixMpc "$file_path"