From a05f04fd145d01b21db3ac8b020fe8de46997b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Thu, 5 Dec 2019 00:47:57 -0300 Subject: [PATCH] xdgmenumaker: use python3 for NixOS#74295 --- .../misc/xdgmenumaker/default.nix | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/misc/xdgmenumaker/default.nix b/pkgs/applications/misc/xdgmenumaker/default.nix index b7f8cfce2fb6..bd767b6c1317 100644 --- a/pkgs/applications/misc/xdgmenumaker/default.nix +++ b/pkgs/applications/misc/xdgmenumaker/default.nix @@ -1,31 +1,37 @@ -{ stdenv, fetchFromGitHub, txt2tags, python2Packages }: +{ stdenv, fetchFromGitHub, txt2tags, python3Packages, glib, gobject-introspection, wrapGAppsHook }: -stdenv.mkDerivation rec { +python3Packages.buildPythonApplication rec { pname = "xdgmenumaker"; version = "1.5"; src = fetchFromGitHub { owner = "gapan"; - repo = "xdgmenumaker"; + repo = pname; rev = version; sha256 = "1vrsp5c1ah7p4dpwd6aqvinpwzd8crdimvyyr3lbm3c6cwpyjmif"; }; + format = "other"; + + strictDeps = false; + nativeBuildInputs = [ + gobject-introspection txt2tags - python2Packages.wrapPython + wrapGAppsHook ]; - pythonPath = [ - python2Packages.pyxdg - python2Packages.pygtk + buildInputs = [ + glib + ]; + + pythonPath = with python3Packages; [ + pyxdg + pygobject3 ]; installPhase = '' make install PREFIX=$out DESTDIR= - wrapProgram "$out/bin/xdgmenumaker" \ - --prefix XDG_DATA_DIRS : "$out/share" - wrapPythonPrograms ''; meta = with stdenv.lib; {