From 889dbe96d59700e96cecebd943a243889828baa2 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 24 Apr 2019 10:39:26 -0400 Subject: [PATCH 1/3] lollypop: 1.0.5 -> 1.0.7 https://gitlab.gnome.org/World/lollypop/tags/1.0.6 https://gitlab.gnome.org/World/lollypop/tags/1.0.7 --- pkgs/applications/audio/lollypop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix index 565c0b31522..d039f0a7a43 100644 --- a/pkgs/applications/audio/lollypop/default.nix +++ b/pkgs/applications/audio/lollypop/default.nix @@ -5,7 +5,7 @@ python3.pkgs.buildPythonApplication rec { pname = "lollypop"; - version = "1.0.5"; + version = "1.0.7"; format = "other"; doCheck = false; @@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec { url = "https://gitlab.gnome.org/World/lollypop"; rev = "refs/tags/${version}"; fetchSubmodules = true; - sha256 = "1p6glzvbbha3cvq462ymbn1q58skclfk469kk28cr1hlsf5x2pry"; + sha256 = "0gdds4qssn32axsa5janqny5i4426azj5wyj6bzn026zs3z38svn"; }; nativeBuildInputs = [ From ce50875fd4a261f744b9c1edec77350e3748ab97 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 24 Apr 2019 11:49:00 -0400 Subject: [PATCH 2/3] pythonPackages.wikipedia: init at 1.4.0 --- .../python-modules/wikipedia/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/wikipedia/default.nix diff --git a/pkgs/development/python-modules/wikipedia/default.nix b/pkgs/development/python-modules/wikipedia/default.nix new file mode 100644 index 00000000000..19b7c42558e --- /dev/null +++ b/pkgs/development/python-modules/wikipedia/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, beautifulsoup4 +, requests +, python +}: + +buildPythonPackage rec { + pname = "wikipedia"; + version = "1.4.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "db0fad1829fdd441b1852306e9856398204dc0786d2996dd2e0c8bb8e26133b2"; + }; + + propagatedBuildInputs = [ + beautifulsoup4 + requests + ]; + + checkPhase = '' + runHook preCheck + + ${python.interpreter} -m unittest discover tests/ '*test.py' + + runHook postCheck + ''; + + meta = with lib; { + description = "Wikipedia API for Python"; + homepage = https://github.com/goldsmith/Wikipedia; + license = licenses.mit; + maintainers = [ maintainers.worldofpeace ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c53f355c2b1..94f062a6dc1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4434,6 +4434,8 @@ in { wordfreq = callPackage ../development/python-modules/wordfreq { }; + wikipedia = callPackage ../development/python-modules/wikipedia { }; + magic-wormhole = callPackage ../development/python-modules/magic-wormhole { }; magic-wormhole-mailbox-server = callPackage ../development/python-modules/magic-wormhole-mailbox-server { }; From db9efc95b24b693aad2b9f8ecdf0864dd3e3e56f Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 24 Apr 2019 11:54:18 -0400 Subject: [PATCH 3/3] lollypop: add youtube and wikipedia support Plus option for lastfm --- pkgs/applications/audio/lollypop/default.nix | 36 +++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix index d039f0a7a43..2a790514447 100644 --- a/pkgs/applications/audio/lollypop/default.nix +++ b/pkgs/applications/audio/lollypop/default.nix @@ -1,7 +1,23 @@ -{ stdenv, fetchgit, meson, ninja, pkgconfig -, python3, gtk3, gst_all_1, libsecret, libsoup -, appstream-glib, desktop-file-utils, totem-pl-parser -, hicolor-icon-theme, gobject-introspection, wrapGAppsHook }: +{ lib +, fetchgit +, meson +, ninja +, pkgconfig +, python3 +, gtk3 +, gst_all_1 +, libsecret +, libsoup +, appstream-glib +, desktop-file-utils +, totem-pl-parser +, hicolor-icon-theme +, gobject-introspection +, wrapGAppsHook +, lastFMSupport ? true +, wikipediaSupport ? true +, youtubeSupport ? true, youtube-dl +}: python3.pkgs.buildPythonApplication rec { pname = "lollypop"; @@ -37,10 +53,9 @@ python3.pkgs.buildPythonApplication rec { gstreamer gtk3 hicolor-icon-theme - libsecret libsoup totem-pl-parser - ]; + ] ++ lib.optional lastFMSupport libsecret; propagatedBuildInputs = with python3.pkgs; [ beautifulsoup4 @@ -49,8 +64,11 @@ python3.pkgs.buildPythonApplication rec { pycairo pydbus pygobject3 - pylast - ]; + ] + ++ lib.optional lastFMSupport pylast + ++ lib.optional wikipediaSupport wikipedia + ++ lib.optional youtubeSupport youtube-dl + ; postPatch = '' chmod +x meson_post_install.py @@ -62,7 +80,7 @@ python3.pkgs.buildPythonApplication rec { patchPythonScript "$out/libexec/lollypop-sp" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A modern music player for GNOME"; homepage = https://wiki.gnome.org/Apps/Lollypop; license = licenses.gpl3Plus;