Created
December 7, 2019 05:45
-
-
Save lovesegfault/f3d086e8166d6f6a779b57ec3b2ea916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkgs/tools/audio/beets/check-plugin.nix b/pkgs/tools/audio/beets/check-plugin.nix | |
new file mode 100644 | |
index 00000000000..5bed47255c6 | |
--- /dev/null | |
+++ b/pkgs/tools/audio/beets/check-plugin.nix | |
@@ -0,0 +1,31 @@ | |
+{ stdenv, fetchFromGitHub, beets, pythonPackages, flac, liboggz, mp3val }: | |
+ | |
+pythonPackages.buildPythonApplication rec { | |
+ name = "beets-check"; | |
+ version = "0.12.0"; | |
+ | |
+ src = fetchFromGitHub { | |
+ repo = "beets-check"; | |
+ owner = "geigerzaehler"; | |
+ rev = "v${version}"; | |
+ sha256 = "0b2ijjf0gycs6b40sm33ida3sjygjiv4spb5mba52vysc7iwmnjn"; | |
+ }; | |
+ | |
+ nativeBuildInputs = [ beets ]; | |
+ checkInputs = [ pythonPackages.nose ]; | |
+ propagatedBuildInputs = [ flac liboggz mp3val ]; | |
+ | |
+ patchPhase = '' | |
+ sed -i "/futures/d" setup.py | |
+ sed -i "s/\/bin\/echo/echo/g" test/cli_test.py | |
+ ''; | |
+ | |
+ doCheck = false; | |
+ checkPhase = "nosetests"; | |
+ | |
+ meta = { | |
+ description = "Beets plugin to Verify and store checksums in your library"; | |
+ homepage = https://github.com/geigerzaehler/beets-check; | |
+ license = stdenv.lib.licenses.mit; | |
+ }; | |
+} | |
diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix | |
index 9509eccabdc..741312f9afe 100644 | |
--- a/pkgs/tools/audio/beets/default.nix | |
+++ b/pkgs/tools/audio/beets/default.nix | |
@@ -29,6 +29,7 @@ | |
# External plugins | |
, enableAlternatives ? false | |
+, enableCheck ? false, liboggz ? null | |
, enableCopyArtifacts ? false | |
, bashInteractive, bash-completion | |
@@ -37,6 +38,7 @@ | |
assert enableAbsubmit -> essentia-extractor != null; | |
assert enableAcoustid -> pythonPackages.pyacoustid != null; | |
assert enableBadfiles -> flac != null && mp3val != null; | |
+assert enableCheck -> flac != null && mp3val != null && liboggz != null; | |
assert enableConvert -> ffmpeg != null; | |
assert enableDiscogs -> pythonPackages.discogs_client != null; | |
assert enableFetchart -> pythonPackages.responses != null; | |
@@ -106,6 +108,7 @@ let | |
plugins = { | |
alternatives = callPackage ./alternatives-plugin.nix pluginArgs; | |
+ check = callPackage ./check-plugin.nix pluginArgs; | |
copyartifacts = callPackage ./copyartifacts-plugin.nix pluginArgs; | |
}; | |
@@ -142,6 +145,7 @@ in pythonPackages.buildPythonApplication rec { | |
|| enableSubsonicupdate | |
|| enableAcousticbrainz) | |
pythonPackages.requests | |
+ ++ optional enableCheck [ plugins.check flac mp3val liboggz ] | |
++ optional enableConvert ffmpeg | |
++ optional enableDiscogs pythonPackages.discogs_client | |
++ optional enableGmusic pythonPackages.gmusicapi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment