1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 python,
6 meson,
7 ninja,
8 psutil,
9 pygobject3,
10 gtk3,
11 gobject-introspection,
12 xapp,
13 polkit,
14 gitUpdater,
15}:
16
17buildPythonPackage rec {
18 pname = "python-xapp";
19 version = "2.4.2";
20
21 format = "other";
22
23 src = fetchFromGitHub {
24 owner = "linuxmint";
25 repo = "python-xapp";
26 rev = version;
27 hash = "sha256-Gbm4YT9ZyrROOAbKz5xYd9J9YG9cUL2Oo6dDCPciaBs=";
28 };
29
30 nativeBuildInputs = [
31 meson
32 ninja
33 ];
34
35 propagatedBuildInputs = [
36 psutil
37 pygobject3
38 gtk3
39 gobject-introspection
40 xapp
41 polkit
42 ];
43
44 postPatch = ''
45 substituteInPlace "xapp/os.py" \
46 --replace-fail "/usr/bin/pkexec" "${polkit}/bin/pkexec"
47 '';
48
49 doCheck = false;
50 pythonImportsCheck = [ "xapp" ];
51
52 passthru = {
53 updateScript = gitUpdater { ignoredVersions = "^master.*"; };
54 skipBulkUpdate = true; # This should be bumped as part of Cinnamon update.
55 };
56
57 meta = with lib; {
58 homepage = "https://github.com/linuxmint/python-xapp";
59 description = "Cross-desktop libraries and common resources for python";
60 license = licenses.lgpl2Plus;
61 platforms = platforms.linux;
62 maintainers = teams.cinnamon.members;
63 };
64}