Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 60 lines 1.4 kB view raw
1{ 2 lib, 3 beets, 4 fetchFromGitHub, 5 python3Packages, 6 writableTmpDirAsHomeHook, 7}: 8 9python3Packages.buildPythonApplication rec { 10 pname = "beets-copyartifacts"; 11 version = "0.1.5"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 repo = "beets-copyartifacts"; 16 owner = "adammillerio"; 17 tag = "v${version}"; 18 hash = "sha256-UTZh7T6Z288PjxFgyFxHnPt0xpAH3cnr8/jIrlJhtyU="; 19 }; 20 21 postPatch = '' 22 sed -i -e '/namespace_packages/d' setup.py 23 printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py 24 25 # beets v2.1.0 compat 26 # <https://github.com/beetbox/beets/commit/0e87389994a9969fa0930ffaa607609d02e286a8> 27 sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py 28 ''; 29 30 nativeBuildInputs = [ 31 beets 32 ]; 33 34 build-system = with python3Packages; [ 35 setuptools 36 ]; 37 38 dependencies = with python3Packages; [ 39 six 40 ]; 41 42 nativeCheckInputs = [ 43 python3Packages.pytestCheckHook 44 writableTmpDirAsHomeHook 45 ]; 46 47 pytestFlags = [ 48 # This is the same as: 49 # -r fEs 50 "-rfEs" 51 ]; 52 53 meta = { 54 description = "Beets plugin to move non-music files during the import process"; 55 homepage = "https://github.com/adammillerio/beets-copyartifacts"; 56 changelog = "https://github.com/adammillerio/beets-copyartifacts/releases/tag/${src.tag}"; 57 license = lib.licenses.mit; 58 inherit (beets.meta) platforms; 59 }; 60}