diff options
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/abcmidi/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/audio/beets/beet-check-tests.patch | 17 | ||||
-rw-r--r-- | pkgs/tools/audio/beets/check-plugin.nix | 35 | ||||
-rw-r--r-- | pkgs/tools/audio/beets/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/audio/mpdris2/default.nix | 48 |
5 files changed, 98 insertions, 14 deletions
diff --git a/pkgs/tools/audio/abcmidi/default.nix b/pkgs/tools/audio/abcmidi/default.nix index 8d990f3a3a8..804f9f3ed24 100644 --- a/pkgs/tools/audio/abcmidi/default.nix +++ b/pkgs/tools/audio/abcmidi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "abcMIDI"; - version = "2019.10.13"; + version = "2019.11.11"; src = fetchzip { url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip"; - sha256 = "1i2gpfrzi12smrlni25fcah6a8rb5l7p358r60jbysc2bpzxwd9l"; + sha256 = "0xid13jqhbknrs31j74iwgjm0h0c64w3kqk9g9am1pkjwxh8d460"; }; # There is also a file called "makefile" which seems to be preferred by the standard build phase diff --git a/pkgs/tools/audio/beets/beet-check-tests.patch b/pkgs/tools/audio/beets/beet-check-tests.patch new file mode 100644 index 00000000000..2de97b86c8b --- /dev/null +++ b/pkgs/tools/audio/beets/beet-check-tests.patch @@ -0,0 +1,17 @@ +diff --git a/test/cli_test.py b/test/cli_test.py +index 26df140..2eb913c 100644 +--- a/test/cli_test.py ++++ b/test/cli_test.py +@@ -372,12 +372,6 @@ class ToolListTest(TestHelper, TestCase): + self.assertIn('flac', stdout.getvalue()) + self.assertIn('oggz-validate', stdout.getvalue()) + +- def test_found_mp3val(self): +- shutil.copy('/bin/echo', os.path.join(self.temp_dir, 'mp3val')) +- with captureStdout() as stdout: +- beets.ui._raw_main(['check', '--list-tools']) +- self.assertRegexpMatches(stdout.getvalue(), r'mp3val *found') +- + def test_oggz_validate_not_found(self): + with captureStdout() as stdout: + beets.ui._raw_main(['check', '--list-tools']) diff --git a/pkgs/tools/audio/beets/check-plugin.nix b/pkgs/tools/audio/beets/check-plugin.nix new file mode 100644 index 00000000000..49ee97ead06 --- /dev/null +++ b/pkgs/tools/audio/beets/check-plugin.nix @@ -0,0 +1,35 @@ +{ 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 flac liboggz mp3val ]; + propagatedBuildInputs = [ flac liboggz mp3val ]; + + # patch out broken tests + patches = [ ./beet-check-tests.patch ]; + + # patch out futures dependency, it is only needed for Python2 which we don't + # support. + prePatch = '' + sed -i "/futures/d" setup.py + ''; + + checkPhase = "nosetests"; + + meta = with stdenv.lib; { + description = "Beets plugin to Verify and store checksums in your library"; + homepage = https://github.com/geigerzaehler/beets-check; + license = licenses.mit; + maintainers = with maintainers; [ lovesegfault ]; + }; +} diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index 9509eccabdc..b4dfa71ca96 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 ++ optional enableConvert ffmpeg ++ optional enableDiscogs pythonPackages.discogs_client ++ optional enableGmusic pythonPackages.gmusicapi @@ -246,6 +250,10 @@ in pythonPackages.buildPythonApplication rec { makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" "--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" ]; + passthru = { + externalPlugins = plugins; + }; + meta = { description = "Music tagger and library organizer"; homepage = http://beets.io; diff --git a/pkgs/tools/audio/mpdris2/default.nix b/pkgs/tools/audio/mpdris2/default.nix index d13dfbe8f43..0dbdcd7d25a 100644 --- a/pkgs/tools/audio/mpdris2/default.nix +++ b/pkgs/tools/audio/mpdris2/default.nix @@ -1,31 +1,55 @@ -{ stdenv, fetchurl, autoreconfHook, intltool -, pythonPackages +{ stdenv +, autoreconfHook +, fetchFromGitHub +, glib +, gobject-introspection +, intltool +, libnotify +, python3 +, wrapGAppsHook }: -stdenv.mkDerivation rec { +python3.pkgs.buildPythonApplication rec { pname = "mpDris2"; version = "0.8"; + format = "other"; + strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943 - src = fetchurl { - url = "https://github.com/eonpatapon/${pname}/archive/${version}.tar.gz"; - sha256 = "14a3va3929qaq1sp9hs9w4bs6lykdvshkbc58kbsc5nzvlgmrcdn"; + src = fetchFromGitHub { + owner = "eonpatapon"; + repo = pname; + rev = version; + sha256 = "048b8acsd1b8kcxzd9fsh5p9g2an9c4rznicfcpyrsjz5syv894h"; }; preConfigure = '' intltoolize -f ''; - nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ intltool pythonPackages.wrapPython ]; - propagatedBuildInputs = with pythonPackages; [ python pygtk dbus-python ]; - pythonPath = with pythonPackages; [ mpd pygtk dbus-python notify mutagen ]; - postInstall = "wrapPythonPrograms"; + nativeBuildInputs = [ + autoreconfHook + gobject-introspection + intltool + wrapGAppsHook + ]; + + buildInputs = [ + glib + libnotify + ]; + + propagatedBuildInputs = with python3.pkgs; [ + dbus-python + mpd2 + mutagen + pygobject3 + ]; meta = with stdenv.lib; { description = "MPRIS 2 support for mpd"; homepage = https://github.com/eonpatapon/mpDris2/; license = licenses.gpl3; + maintainers = with maintainers; []; platforms = platforms.unix; - maintainers = with maintainers; [ pjones ]; }; } |