A => default.nix +36 -0
@@ 1,36 @@
+{
+ fetchzip, stdenv, autoPatchelfHook,
+ gdk-pixbuf, libX11, cairo, atk, pango, gtk2-x11, hidapi
+}:
+
+stdenv.mkDerivation {
+ name = "keymouse";
+
+ src = fetchzip {
+ url = "https://www.keymouse.com/downloads/linux/keymouse-setup3.08.tar.gz";
+ hash = "sha256-+BI8b3b5iM5jYPh0o1GfTVTTiCR03HmHDjljCXp7dSY=";
+ stripRoot = false;
+ };
+
+ nativeBuildInputs = [
+ autoPatchelfHook
+ ];
+
+ buildInputs = [
+ gdk-pixbuf
+ libX11
+ cairo
+ atk
+ pango
+ gtk2-x11
+ hidapi
+ ];
+
+ installPhase = ''
+ install -m755 -D keymouse-linux $out/share/keymouse/keymouse
+ cp -r devices keysets layouts specialkeys $out/share/keymouse/
+
+ mkdir $out/bin
+ ln -s $out/share/keymouse/keymouse $out/bin/keymouse
+ '';
+}
A => flake.lock +25 -0
@@ 1,25 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1643472818,
+ "narHash": "sha256-qzVPxKDUubYIxKRSuDl/JgzXWSmGvUVYny9SxFMfPJM=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "7f65e4abd5ecaad12d2d26e4380d1a7d8edafea7",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
A => flake.nix +7 -0
@@ 1,7 @@
+{
+ outputs = { nixpkgs, ... }: rec {
+ packages.x86_64-linux.keymouse = nixpkgs.legacyPackages.x86_64-linux.callPackage ./. {};
+
+ defaultPackage.x86_64-linux = packages.x86_64-linux.keymouse;
+ };
+}