beets: add extrafiles plugin

This commit is contained in:
Austin Butler 2020-08-07 14:05:13 -07:00 committed by Doron Behar
parent f3893d8b53
commit 5d365404ac
2 changed files with 36 additions and 1 deletions

View File

@ -31,6 +31,7 @@
, enableAlternatives ? false
, enableCheck ? false, liboggz ? null
, enableCopyArtifacts ? false
, enableExtraFiles ? false
, bashInteractive, bash-completion
}:
@ -100,6 +101,7 @@ let
externalTestArgs.beets = (beets.override {
enableAlternatives = false;
enableCopyArtifacts = false;
enableExtraFiles = false;
}).overrideAttrs (stdenv.lib.const {
doInstallCheck = false;
});
@ -110,6 +112,7 @@ let
alternatives = callPackage ./alternatives-plugin.nix pluginArgs;
check = callPackage ./check-plugin.nix pluginArgs;
copyartifacts = callPackage ./copyartifacts-plugin.nix pluginArgs;
extrafiles = callPackage ./extrafiles-plugin.nix pluginArgs;
};
in pythonPackages.buildPythonApplication rec {
@ -156,7 +159,9 @@ in pythonPackages.buildPythonApplication rec {
++ optional enableThumbnails pythonPackages.pyxdg
++ optional enableWeb pythonPackages.flask
++ optional enableAlternatives plugins.alternatives
++ optional enableCopyArtifacts plugins.copyartifacts;
++ optional enableCopyArtifacts plugins.copyartifacts
++ optional enableExtraFiles plugins.extrafiles
;
buildInputs = [
imagemagick

View File

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, beets, pythonPackages }:
pythonPackages.buildPythonApplication rec {
pname = "beets-extrafiles";
version = "0.0.7";
src = fetchFromGitHub {
repo = "beets-extrafiles";
owner = "Holzhaus";
rev = "v${version}";
sha256 = "0ah7mgax9zrhvvd5scf2z0v0bhd6xmmv5sdb6av840ixpl6vlvm6";
};
postPatch = ''
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
sed -i -e '/namespace_packages/d' setup.py
'';
nativeBuildInputs = [ beets ];
preCheck = ''
HOME=$TEMPDIR
'';
meta = {
homepage = "https://github.com/Holzhaus/beets-extrafiles";
description = "A plugin for beets that copies additional files and directories during the import process";
license = stdenv.lib.licenses.mit;
};
}