From 2a52d32e0d998828e94c0137edb4500f6002da78 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Thu, 6 Jun 2024 12:26:58 +0200 Subject: Add bandcamp-dl --- Makefile | 2 +- default.nix | 2 ++ nix/bandcamp-dl.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 nix/bandcamp-dl.nix diff --git a/Makefile b/Makefile index 516229d..86db4d6 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ install-rm-keyfile: install-loadout: @if [ -z "$(HOSTNAME)" ]; then echo "USAGE: make HOSTNAME=... install-loadout"; exit 1; fi - nix-env -v -i loadout -f default.nix --arg hostConfig "import ./config/$(HOSTNAME).nix" + nix-env -v --show-trace -i loadout -f default.nix --arg hostConfig "import ./config/$(HOSTNAME).nix" install-fonts: @if [ -z "$(HOSTNAME)" ]; then echo "USAGE: make HOSTNAME=... install-loadout"; exit 1; fi diff --git a/default.nix b/default.nix index 5d8226c..19432d4 100644 --- a/default.nix +++ b/default.nix @@ -157,6 +157,8 @@ in rec { pkgs.wireshark pkgs.electrum + (pkgs2305.callPackage ./nix/bandcamp-dl.nix {}) + bin ((import ./nvim) {}).nvim zsh diff --git a/nix/bandcamp-dl.nix b/nix/bandcamp-dl.nix new file mode 100644 index 0000000..b55b539 --- /dev/null +++ b/nix/bandcamp-dl.nix @@ -0,0 +1,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}'" + ''; + } -- cgit v1.2.3