summaryrefslogtreecommitdiff
path: root/nix/bandcamp-dl.nix
blob: b55b5398e3078fbf78842a90d24a477a270e468e (plain)
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
{
  python3Packages,
  makeWrapper,
}: let
  version = "v0.0.13";
  src = builtins.fetchGit {
    url = "https://github.com/iheanyi/bandcamp-dl.git";
    rev = "fe2eafae4bfc901d2760aef9d4cc6db60528b4b4";
  };
in
  python3Packages.buildPythonApplication {
    inherit version src;
    pname = "bandcamp-dl";
    propagatedBuildInputs = [
      python3Packages.beautifulsoup4
      python3Packages.demjson3
      python3Packages.mutagen
      python3Packages.requests
      python3Packages.unicode-slugify
      python3Packages.docopt
      python3Packages.lxml
      python3Packages.mock
    ];
    nativeBuildInputs = [ makeWrapper ];
    postInstall = ''
      wrapProgram "$out/bin/bandcamp-dl" \
        --add-flags "--base-dir=/home/mediocregopher/Downloads --template='%{artist}_%{album}/%{track}_%{title}'"
    '';
  }