6 , gobject-introspection
17 mkDesktopItem = name: desktopName: comment: terminal: makeDesktopItem {
18 inherit name desktopName comment terminal;
22 categories = [ "Network" ];
25 python3.pkgs.buildPythonApplication rec {
30 src = fetchFromGitHub {
34 sha256 = "qlkFQSJFjxkGd5WkNGfyAo64ys8VJLep/ZOL6icXQ4c=";
35 fetchSubmodules = true; # for anime-relations submodule
38 nativeBuildInputs = [ copyDesktopItems python3.pkgs.poetry-core ]
39 ++ lib.optionals withGTK [ wrapGAppsHook3 gobject-introspection ]
40 ++ lib.optionals withQT [ qt5.wrapQtAppsHook ];
42 buildInputs = lib.optionals withGTK [ glib gtk3 ];
44 propagatedBuildInputs = with python3.pkgs; ([ requests ]
45 ++ lib.optionals withQT [ pyqt5 ]
46 ++ lib.optionals withGTK [ pycairo pygobject3 ]
47 ++ lib.optionals withCurses [ urwid ]
48 ++ lib.optionals stdenv.hostPlatform.isLinux [ pydbus pyinotify ]
49 ++ lib.optionals (withGTK || withQT) [ pillow ]);
51 dontWrapQtApps = true;
54 preFixup = lib.optional withQT "wrapQtApp $out/bin/trackma-qt"
55 ++ lib.optional withGTK "wrapGApp $out/bin/trackma-gtk";
57 desktopItems = lib.optional withQT (mkDesktopItem "trackma-qt" "Trackma (Qt)" "Trackma Updater (Qt-frontend)" false)
58 ++ lib.optional withGTK (mkDesktopItem "trackma-gtk" "Trackma (GTK)" "Trackma Updater (Gtk-frontend)" false)
59 ++ lib.optional withCurses (mkDesktopItem "trackma-curses" "Trackma (ncurses)" "Trackma Updater (ncurses frontend)" true);
62 install -Dvm444 $src/trackma/data/icon.png $out/share/pixmaps/trackma.png
67 pythonImportsCheck = [ "trackma" ];
69 postDist = lib.optional (!withQT) "rm $out/bin/trackma-qt"
70 ++ lib.optional (!withGTK) "rm $out/bin/trackma-gtk"
71 ++ lib.optional (!withCurses) "rm $out/bin/trackma-curses";
73 passthru.updateScript = ./update.sh;
76 homepage = "https://github.com/z411/trackma";
77 description = "Open multi-site list manager for Unix-like systems (ex-wMAL)";
78 license = licenses.gpl3Plus;
79 platforms = platforms.linux;