16 stdenv.mkDerivation rec {
20 src = fetchFromGitHub {
24 sha256 = "1qlz55fp4i9dd8sdwmy1m8i4i1jy1s09cpmlxzrgf7v34w72ncm7";
27 nativeBuildInputs = [ cmake pkg-config ];
30 if stdenv.isDarwin then [ AppKit ApplicationServices Carbon ]
47 outputs = [ "out" "test" ];
49 # We build the tests, but they're only installed when using the "test" output.
50 # This will produce a "uiohook_tests" binary which can be run to test the
51 # functionality of the library on the current system.
52 # Running the test binary requires a running X11 session.
54 "-DENABLE_TEST:BOOL=ON"
59 cp ./uiohook_tests $test/share
63 description = "A C library to provide global keyboard and mouse hooks from userland";
64 homepage = "https://github.com/kwhat/libuiohook";
65 license = licenses.gpl3Only;
66 platforms = platforms.all;
67 maintainers = with maintainers; [ anoa ];
70 passthru.tests.libuiohook = nixosTests.libuiohook;