about summary refs log tree commit diff
path: root/pkgs/tools/misc/antimicrox
diff options
context:
space:
mode:
authorSimon Bruder <simon@sbruder.de>2021-10-31 15:45:40 +0100
committerSimon Bruder <simon@sbruder.de>2021-10-31 15:45:40 +0100
commit55c4c014e77c72cb522d84934f3b5abb23458ff8 (patch)
tree2ce982ee3e295a90380a8db72a48a7b5a8a9e16f /pkgs/tools/misc/antimicrox
parente6351a0f88f8945b00fa3f593858e901e956ceaf (diff)
antimicrox: 3.0.1 -> 3.2.0
This changes the source from the (now archived) original antimicroX to a
fork that is actively maintained and includes new features like uinput
support for wayland.

Since upstream changed the executable name from antimicroX to
antimicrox, this also changes the name of the derivation and the file
names to work with Nix 2.4’s nix run and to be consistent. An alias for
antimicroX is added to ensure existing configurations will continue
working.
Diffstat (limited to 'pkgs/tools/misc/antimicrox')
-rw-r--r--pkgs/tools/misc/antimicrox/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/tools/misc/antimicrox/default.nix b/pkgs/tools/misc/antimicrox/default.nix
new file mode 100644
index 0000000000000..e248ac4a0c787
--- /dev/null
+++ b/pkgs/tools/misc/antimicrox/default.nix
@@ -0,0 +1,43 @@
+{ mkDerivation
+, lib
+, cmake
+, extra-cmake-modules
+, pkg-config
+, SDL2
+, qttools
+, xorg
+, fetchFromGitHub
+, itstool
+}:
+
+mkDerivation rec {
+  pname = "antimicrox";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner = "AntiMicroX";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-brG3DTpWRYmDemTeteuuNbF0JoDAXdcFwO12JC6/0/Q=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules pkg-config itstool ];
+  buildInputs = [
+    SDL2
+    qttools
+    xorg.libXtst
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+        --replace "/usr/lib/udev/rules.d/" "$out/lib/udev/rules.d/"
+  '';
+
+  meta = with lib; {
+    description = "GUI for mapping keyboard and mouse controls to a gamepad";
+    inherit (src.meta) homepage;
+    maintainers = with maintainers; [ jb55 sbruder ];
+    license = licenses.gpl3Plus;
+    platforms = with platforms; linux;
+  };
+}