@@ -0,0 +1,33 @@
1+{ stdenv, meson, ninja, pkgconfig, gettext, fetchFromGitHub, python3
2+, wrapGAppsHook, gtk3, glib, desktop-file-utils, appstream-glib, gnome3 }:
3+
4+python3.pkgs.buildPythonApplication rec {
5+ pname = "piper-${version}";
6+ version = "0.2.902";
7+
8+ format = "other";
9+
10+ src = fetchFromGitHub {
11+ owner = "libratbag";
12+ repo = "piper";
13+ rev = version;
14+ sha256 = "1ny0vf8ym9v040cb5h084k5wwn929fnhq9infbdq8f8vvy61magb";
15+ };
16+
17+ nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook desktop-file-utils appstream-glib ];
18+ buildInputs = [ gtk3 glib gnome3.defaultIconTheme python3 ];
19+ propagatedBuildInputs = with python3.pkgs; [ lxml evdev pygobject3 ];
20+
21+ postPatch = ''
22+ chmod +x meson_install.sh # patchShebangs requires executable file
23+ patchShebangs meson_install.sh
24+ '';
25+
26+ meta = with stdenv.lib; {
27+ description = "GTK frontend for ratbagd mouse config daemon";
28+ homepage = https://github.com/libratbag/piper;
29+ license = licenses.gpl2;
30+ maintainers = with maintainers; [ mvnetbiz ];
31+ platforms = platforms.linux;
32+ };
33+}