about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/scripts/default.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-03-23 20:48:36 +0100
committerSoispha <soispha@vhack.eu>2024-03-23 20:48:36 +0100
commit73cb8c56c72de9dc4e3cc69ea82bde3964632564 (patch)
tree89bde6999b26afd4a4ae62bc4be2f3ac2f5a2c59 /sys/nixpkgs/pkgs/scripts/default.nix
parentfeat(pkgs/scripts/fupdate): Add support for updating without running the script (diff)
downloadnixos-config-73cb8c56c72de9dc4e3cc69ea82bde3964632564.tar.gz
nixos-config-73cb8c56c72de9dc4e3cc69ea82bde3964632564.zip
feat(pkgs/scripts/spodi): Rewrite to support artist `update`
Diffstat (limited to '')
-rw-r--r--sys/nixpkgs/pkgs/scripts/default.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/default.nix b/sys/nixpkgs/pkgs/scripts/default.nix
index 6ef59b0e..6353e690 100644
--- a/sys/nixpkgs/pkgs/scripts/default.nix
+++ b/sys/nixpkgs/pkgs/scripts/default.nix
@@ -306,10 +306,28 @@
         dependencies = builtins.attrValues {inherit (prev) mediainfo jq gawk;};
       };
 
-      spodi-scr = write_shell {
+      spodi-scr = sysLib.writeShellScriptMultiPart {
         name = "spodi";
-        path = "wrappers";
-        dependencies = builtins.attrValues {inherit (prev) gawk expect spotdl fd coreutils;};
+        keepPath = false;
+        src = ./source/specific/spodi;
+        baseName = "spodi.sh";
+        cmdPrefix = "sh";
+        cmdNames = [
+          "download.sh"
+          "update.sh"
+        ];
+        dependencies = with prev; [
+          gawk
+          expect
+          spotdl
+          fd
+          coreutils
+        ];
+        generateCompletions = true;
+        replacementStrings = {
+          XDG_CACHE_HOME = config.xdg.cacheHome;
+          XDG_MUSIC_DIR = config.xdg.userDirs.music;
+        };
       };
 
       update-sys-scr = write_shell {