From 795753bbc6ceece3fabcdcaca24010f62538b77c Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Tue, 29 Oct 2013 11:33:46 +0100 Subject: [PATCH] quodlibet: update to version 2.6.3 also provides two distinctive flavours, which either wrap the program to pull in the gstreamer plugins or not. --- pkgs/applications/audio/quodlibet/default.nix | 34 +++++++++++++------ pkgs/top-level/all-packages.nix | 6 ++++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index 9f4859d6e070..c865314cb175 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -1,11 +1,18 @@ { stdenv, fetchurl, python, buildPythonPackage, mutagen, pygtk, pygobject -, pythonDBus, gst_python, gst_plugins_base, gst_plugins_good, gst_plugins_ugly }: +, pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null +, gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }: -let version = "2.5"; in +assert withGstPlugins -> gst_plugins_base != null + || gst_plugins_good != null + || gst_plugins_ugly != null + || gst_plugins_bad != null; + +let version = "2.6.3"; in buildPythonPackage { # call the package quodlibet and just quodlibet - name = "quodlibet-${version}"; + name = "quodlibet-${version}" + + stdenv.lib.optionalString withGstPlugins "-with-gst-plugins"; namePrefix = ""; # XXX, tests fail @@ -13,12 +20,12 @@ buildPythonPackage { src = [ (fetchurl { - url = "https://quodlibet.googlecode.com/files/quodlibet-${version}.tar.gz"; - sha256 = "0qrmlz7m1jpmriy8bgycjiwzbf3annznkn4x5k32yy9bylxa7lwb"; + url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz"; + sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z"; }) (fetchurl { - url = "https://quodlibet.googlecode.com/files/quodlibet-plugins-${version}.tar.gz"; - sha256 = "0kf2mkq2zk38626bn48gscvy6ir04f5b2z57ahlxlqy8imv2cjff"; + url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz"; + sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc"; }) ]; @@ -30,19 +37,23 @@ buildPythonPackage { ''; patches = [ ./quodlibet-package-plugins.patch ]; - buildInputs = [ - gst_plugins_base gst_plugins_good gst_plugins_ugly + buildInputs = stdenv.lib.optionals withGstPlugins [ + gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad ]; propagatedBuildInputs = [ mutagen pygtk pygobject pythonDBus gst_python ]; - postInstall = '' + postInstall = stdenv.lib.optionalString withGstPlugins '' # Wrap quodlibet so it finds the GStreamer plug-ins wrapProgram "$out/bin/quodlibet" --prefix \ GST_PLUGIN_PATH ":" \ - "${gst_plugins_base}/lib/gstreamer-0.10:${gst_plugins_good}/lib/gstreamer-0.10:${gst_plugins_ugly}/lib/gstreamer-0.10" + ${ stdenv.lib.concatStringsSep ":" + (map (s: s+"/lib/gstreamer-0.10") + (stdenv.lib.filter (s: s != null) [ + gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad + ])) } ''; meta = { @@ -62,6 +73,7 @@ buildPythonPackage { & internet radio, and all major audio formats. ''; + maintainer = [ stdenv.lib.maintainers.coroa ]; homepage = http://code.google.com/p/quodlibet/; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2be392278df6..8ed314daf40d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8561,6 +8561,12 @@ let inherit (pythonPackages) mutagen; }; + quodlibet-with-gst-plugins = callPackage ../applications/audio/quodlibet { + inherit (pythonPackages) mutagen; + withGstPlugins = true; + gst_plugins_bad = null; + }; + rakarrack = callPackage ../applications/audio/rakarrack { inherit (xorg) libXpm libXft; fltk = fltk13;