@@ -0,0 +1,63 @@
1+{ lib
2+, pkg-config
3+, python3Packages
4+, meson
5+, ninja
6+, appstream-glib
7+, desktop-file-utils
8+, glib
9+, gtk3
10+, gobject-introspection
11+, wrapGAppsHook
12+, fetchFromGitHub
13+}:
14+
15+python3Packages.buildPythonApplication rec {
16+ name = "tuhi";
17+ version = "0.5";
18+
19+ format = "other";
20+
21+ src = fetchFromGitHub {
22+ owner = "tuhiproject";
23+ repo = name;
24+ rev = "${version}";
25+ sha256 = "17kggm9c423vj7irxx248fjc8sxvkp9w1mgawlx1snrii817p3db";
26+ };
27+
28+ dontWrapGApps = true;
29+ preFixup = ''
30+ makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
31+ '';
32+
33+ nativeBuildInputs = [
34+ pkg-config meson ninja
35+ appstream-glib desktop-file-utils
36+ wrapGAppsHook
37+ ];
38+ buildInputs = [
39+ gtk3 gobject-introspection
40+ glib
41+ ];
42+ checkInputs = with python3Packages; [ flake8 pytest ];
43+ propagatedBuildInputs = with python3Packages; [
44+ svgwrite pyxdg pycairo pygobject3 setuptools-scm
45+ ];
46+
47+ strictDeps = false;
48+ preConfigure = ''
49+ substituteInPlace meson_install.sh \
50+ --replace "/usr/bin/env sh" "sh"
51+ '';
52+ postFixup = ''
53+ wrapPythonProgramsIn $out/libexec "$out $pythonPath"
54+ '';
55+
56+ meta = with lib; {
57+ description = "DBus daemon to access Wacom SmartPad devices";
58+ homepage = "https://github.com/tuhiproject/tuhi";
59+ license = licenses.gpl2;
60+ platforms = platforms.linux;
61+ maintainers = with maintainers; [ lammermann ];
62+ };
63+}