From 26f0f8635928615187fbe6f999d669172a3a5c38 Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 22 Apr 2015 03:15:13 +0100 Subject: [PATCH] add pithos 1.0.1 --- pkgs/applications/audio/pithos/default.nix | 45 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/audio/pithos/default.nix diff --git a/pkgs/applications/audio/pithos/default.nix b/pkgs/applications/audio/pithos/default.nix new file mode 100644 index 00000000000000..bf7b30d05ba0e9 --- /dev/null +++ b/pkgs/applications/audio/pithos/default.nix @@ -0,0 +1,45 @@ +# Based on Richard Wallace's post here: http://comments.gmane.org/gmane.linux.distributions.nixos/14734 + +# Builds but crashes on startup with error: +# File "/nix/store/ggnvbxyi2pcsyn11bss7pn66bcyb9758-python3.4-pithos-1.0.1/lib/python3.4/site-packages/pithos/pithos.py", line 198, in init_core +# self.player.props.flags |= (1 << 7) # enable progressive download (GST_PLAY_FLAG_DOWNLOAD) +# AttributeError: 'NoneType' object has no attribute 'props' + +{ fetchurl, stdenv, pythonPackages, gtk3, libnotify, gst_all_1 }: +pythonPackages.buildPythonPackage rec { + name = "pithos-${version}"; + version = "1.0.1"; + + src = fetchurl { + url = "https://github.com/pithos/pithos/archive/${version}.tar.gz"; + sha256 = "67b83927d5111067aefbf034d23880f96b1a2d300464e8491efa80e97e67f50f"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "/usr/share" "$out/share" + ''; + + buildInputs = with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad libnotify ]; + + pythonPath = with pythonPackages; [ pygobject3 dbus pylast ]; + + propogatedBuildInputs = pythonPath; + + postInstall = '' + wrapProgram "$out/bin/pithos" --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0" + ''; + + meta = with stdenv.lib; { + description = "Pandora player"; + + longDescription = '' + Pandora Internet Radio player for GNOME + ''; + + homepage = http://pithos.github.io/ ; + + license = licenses.gpl3; + + maintainers = with maintainers; [ obadz ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e86ed832d94a7..0ed3921ffd4934 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11567,6 +11567,10 @@ let toxprpl = callPackage ../applications/networking/instant-messengers/pidgin-plugins/tox-prpl { }; + pithos = callPackage ../applications/audio/pithos { + pythonPackages = python34Packages; + }; + pinfo = callPackage ../applications/misc/pinfo { }; pinpoint = callPackage ../applications/office/pinpoint {};