about summary refs log tree commit diff stats
path: root/pkgs/by-name/sp/spodi/package.nix
blob: 83540a216bacf29fd00d637bf0af3000960a317f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
  sysLib,
  # dependencies
  gawk,
  expect,
  spotdl,
  fd,
  coreutils,
  # config
  xdgCacheHome ? builtins.getEnv "XDG_CACHE_HOME",
  xdgUserDirsMusic ? builtins.getEnv "XDG_MUSIC_HOME",
}:
sysLib.writeShellScriptMultiPart {
  name = "spodi";
  src = ./.;

  generateCompletions = true;
  keepPath = false;

  baseName = "spodi.sh";
  cmdPrefix = "sh";
  cmdNames = [
    "download.sh"
    "update.sh"
  ];

  dependencies = [
    gawk
    expect
    spotdl
    fd
    coreutils
  ];

  replacementStrings = {
    XDG_CACHE_HOME = xdgCacheHome;
    XDG_MUSIC_DIR = xdgUserDirsMusic;
  };
}