Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 meson, 6 ninja, 7 pkg-config, 8 vala, 9 glib, 10 libevdev, 11 libgee, 12 udev, 13 testers, 14 nix-update-script, 15}: 16 17let 18 # https://github.com/v1993/evdevhook2/blob/main/subprojects/gcemuhook.wrap 19 gcemuhook = fetchFromGitHub { 20 name = "gcemuhook"; 21 owner = "v1993"; 22 repo = "gcemuhook"; 23 rev = "91ef61cca809f5f3b9fa6e5304aba284a56c06dc"; 24 hash = "sha256-CPjSuKtoqSDKd+vEBgFy3qh33TkCVbxBEnwiBAkaADs="; 25 }; 26in 27 28stdenv.mkDerivation (finalAttrs: { 29 pname = "evdevhook2"; 30 version = "1.0.2"; 31 32 src = fetchFromGitHub { 33 owner = "v1993"; 34 repo = "evdevhook2"; 35 rev = "v${finalAttrs.version}"; 36 hash = "sha256-6CnUYLgrGUM1ndGpbn/T7wkREUzQ1LsLMpkRRxyUZ50="; 37 }; 38 39 nativeBuildInputs = [ 40 meson 41 ninja 42 pkg-config 43 vala 44 ]; 45 46 buildInputs = [ 47 glib 48 libevdev 49 libgee 50 udev 51 ]; 52 53 postUnpack = '' 54 ln -sf ${gcemuhook} source/subprojects/gcemuhook 55 ''; 56 57 mesonBuildType = "release"; 58 59 passthru = { 60 tests.version = testers.testVersion { 61 package = finalAttrs.finalPackage; 62 version = "Evdevhook ${finalAttrs.version}"; 63 }; 64 65 updateScript = nix-update-script { }; 66 }; 67 68 meta = { 69 changelog = "https://github.com/v1993/evdevhook2/releases/tag/v${finalAttrs.version}"; 70 description = "Cemuhook UDP server for devices with modern Linux drivers"; 71 homepage = "https://github.com/v1993/evdevhook2"; 72 license = lib.licenses.gpl3Only; 73 mainProgram = "evdevhook2"; 74 maintainers = with lib.maintainers; [ azuwis ]; 75 platforms = lib.platforms.linux; 76 }; 77})