Skip to content

Commit

Permalink
quodlibet: 2.6.3 -> 3.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sauyon authored and rycee committed Nov 5, 2017
1 parent a5f5bee commit 7486ae8
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 73 deletions.
82 changes: 31 additions & 51 deletions pkgs/applications/audio/quodlibet/default.nix
Original file line number Diff line number Diff line change
@@ -1,64 +1,44 @@
{ stdenv, fetchurl, python2Packages, intltool
, gst-python, withGstPlugins ? false, gst-plugins-base ? null
, gst-plugins-good ? null, gst-plugins-ugly ? null, gst-plugins-bad ? null }:

assert withGstPlugins -> gst-plugins-base != null
|| gst-plugins-good != null
|| gst-plugins-ugly != null
|| gst-plugins-bad != null;

let
version = "2.6.3";
inherit (python2Packages) buildPythonApplication python mutagen pygtk pygobject2 dbus-python;
in buildPythonApplication {
# call the package quodlibet and just quodlibet
name = "quodlibet${stdenv.lib.optionalString (!withGstPlugins) "-without-gst-plugins"}-${version}";
{ stdenv, fetchurl, python2Packages, wrapGAppsHook, gettext, intltool, libsoup, gnome3,
tag ? "",
gst_all_1, withGstPlugins ? true,
xineBackend ? false, xineLib,
withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
webkitgtk ? null,
keybinder3 ? null, gtksourceview ? null, libmodplug ? null, kakasi ? null, libappindicator-gtk3 ? null }:

let optionals = stdenv.lib.optionals; in
python2Packages.buildPythonApplication rec {
name = "quodlibet${tag}-${version}";
version = "3.9.1";

# XXX, tests fail
doCheck = false;

srcs = [
(fetchurl {
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz";
sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z";
})
(fetchurl {
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz";
sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc";
})
];

preConfigure = ''
# TODO: for now don't a apply gdist overrides, will be needed for shipping icons, gtk, etc
sed -i /distclass/d setup.py
'';

sourceRoot = "quodlibet-${version}";

postUnpack = ''
# the patch searches for plugins in directory ../plugins
# so link the appropriate directory there
ln -sf quodlibet-plugins-${version} plugins
'';
src = fetchurl {
url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
sha256 = "d2b42df5d439213973dc97149fddc779a6c90cec389c24baf1c0bdcc39ffe591";
};

patches = [ ./quodlibet-package-plugins.patch ];
nativeBuildInputs = [ wrapGAppsHook gettext intltool ];
# ++ (with python2Packages; [ pytest pyflakes pycodestyle polib ]); # test deps

buildInputs = stdenv.lib.optionals withGstPlugins [
gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad
];
buildInputs = [ gnome3.defaultIconTheme libsoup webkitgtk keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi ]
++ (if xineBackend then [ xineLib ] else with gst_all_1;
[ gstreamer gst-plugins-base ] ++ optionals withGstPlugins [ gst-plugins-good gst-plugins-ugly gst-plugins-bad ]);

propagatedBuildInputs = [
mutagen pygtk pygobject2 dbus-python gst-python intltool
];
propagatedBuildInputs = with python2Packages;
[ pygobject3 pycairo mutagen pygtk gst-python feedparser faulthandler futures ]
++ optionals withDbusPython [ dbus-python ]
++ optionals withPyInotify [ pyinotify ]
++ optionals withMusicBrainzNgs [ musicbrainzngs ]
++ optionals stdenv.isDarwin [ pyobjc ]
++ optionals withPahoMqtt [ paho-mqtt ];

postInstall = stdenv.lib.optionalString withGstPlugins ''
# Wrap quodlibet so it finds the GStreamer plug-ins
wrapProgram "$out/bin/quodlibet" --prefix \
GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH" \
'';
makeWrapperArgs = optionals (kakasi != null) [ "--prefix PATH : ${kakasi}/bin" ];

meta = {
description = "GTK+-based audio player written in Python, using the Mutagen tagging library";
license = stdenv.lib.licenses.gpl2;

longDescription = ''
Quod Libet is a GTK+-based audio player written in Python, using
Expand All @@ -74,7 +54,7 @@ in buildPythonApplication {
& internet radio, and all major audio formats.
'';

maintainers = [ stdenv.lib.maintainers.coroa ];
maintainers = with stdenv.lib.maintainers; [ coroa sauyon ];
homepage = https://quodlibet.readthedocs.io/en/latest/;
};
}
18 changes: 0 additions & 18 deletions pkgs/applications/audio/quodlibet/quodlibet-package-plugins.patch

This file was deleted.

31 changes: 27 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16272,14 +16272,37 @@ with pkgs;

quiterss = libsForQt5.callPackage ../applications/networking/newsreaders/quiterss {};

quodlibet-without-gst-plugins = callPackage ../applications/audio/quodlibet { };
falkon = libsForQt5.callPackage ../applications/networking/browsers/falkon { };

quodlibet = callPackage ../applications/audio/quodlibet {
withGstPlugins = true;
gst-plugins-bad = null;
keybinder3 = null;
libmodplug = null;
kakasi = null;
libappindicator-gtk3 = null;
};

falkon = libsForQt5.callPackage ../applications/networking/browsers/falkon { };
quodlibet-without-gst-plugins = quodlibet.override {
withGstPlugins = false;
tag = "-without-gst-plugins";
};

quodlibet-xine = quodlibet.override { xineBackend = true; tag = "-xine"; };

quodlibet-full = callPackage ../applications/audio/quodlibet {
inherit (gnome2) gtksourceview;
withDbusPython = true;
withPyInotify = true;
withMusicBrainzNgs = true;
withPahoMqtt = true;
keybinder3 = keybinder3;
libmodplug = libmodplug;
kakasi = kakasi;
webkitgtk = webkitgtk24x-gtk3;
libappindicator-gtk3 = libappindicator-gtk3;
tag = "-full";
};

quodlibet-xine-full = quodlibet-full.override { xineBackend = true; tag = "-xine-full"; };

qutebrowser = libsForQt5.callPackage ../applications/networking/browsers/qutebrowser {
inherit (python3Packages) buildPythonApplication pyqt5 jinja2 pygments pyyaml pypeg2 cssutils pyopengl attrs;
Expand Down

0 comments on commit 7486ae8

Please sign in to comment.