summary refs log tree commit diff
path: root/pkgs/tools/audio
diff options
context:
space:
mode:
authorPeter Jones <pjones@devalot.com>2019-11-27 14:28:24 -0700
committerPeter Jones <pjones@devalot.com>2019-12-04 08:19:56 -0700
commitdb091af22841c0b686fd450810102829e808a2d4 (patch)
treefe5a57f628b98a8facd17c4f143d93980dd9757a /pkgs/tools/audio
parenta0c50768611327a4c6b4f94b3382327ddd18c826 (diff)
downloadnixpkgs-db091af22841c0b686fd450810102829e808a2d4.tar
nixpkgs-db091af22841c0b686fd450810102829e808a2d4.tar.gz
nixpkgs-db091af22841c0b686fd450810102829e808a2d4.tar.bz2
nixpkgs-db091af22841c0b686fd450810102829e808a2d4.tar.lz
nixpkgs-db091af22841c0b686fd450810102829e808a2d4.tar.xz
nixpkgs-db091af22841c0b686fd450810102829e808a2d4.tar.zst
nixpkgs-db091af22841c0b686fd450810102829e808a2d4.zip
mpdris2: use python3 for #74295
Also use fetchFromGitHub for hash stability.

Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r--pkgs/tools/audio/mpdris2/default.nix48
1 files changed, 36 insertions, 12 deletions
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 ];
   };
 }