diff --git a/pkgs/tools/X11/xidlehook/default.nix b/pkgs/tools/X11/xidlehook/default.nix new file mode 100644 index 000000000000..a71531eebc5b --- /dev/null +++ b/pkgs/tools/X11/xidlehook/default.nix @@ -0,0 +1,32 @@ +{ lib, rustPlatform, fetchFromGitHub, x11, xorg, libpulseaudio, pkgconfig, patchelf }: + +rustPlatform.buildRustPackage rec { + name = "xidlehook-${version}"; + version = "0.4.6"; + + src = fetchFromGitHub { + owner = "jD91mZM2"; + repo = "xidlehook"; + rev = version; + + sha256 = "0h84ichm1v2wdmm4w1n7jr70yfb9hhi7kykvd99ppg00h1x9lr7w"; + }; + + cargoSha256 = "0a1bl6fnfw6xy71q3b5zij52p9skylj1ivqj8my44bfsid2qfn7d"; + + buildInputs = [ x11 xorg.libXScrnSaver libpulseaudio ]; + nativeBuildInputs = [ pkgconfig patchelf ]; + + postFixup = '' + RPATH="$(patchelf --print-rpath $out/bin/xidlehook)" + patchelf --set-rpath "$RPATH:${libpulseaudio}/lib" $out/bin/xidlehook + ''; + + meta = with lib; { + description = "xautolock rewrite in Rust, with a few extra features"; + homepage = https://github.com/jD91mZM2/xidlehook; + license = licenses.mit; + maintainers = with maintainers; [ jD91mZM2 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7fb532e14c47..69729734d7db 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5772,6 +5772,8 @@ with pkgs; xiccd = callPackage ../tools/misc/xiccd { }; + xidlehook = callPackage ../tools/X11/xidlehook {}; + xorriso = callPackage ../tools/cd-dvd/xorriso { }; xpf = callPackage ../tools/text/xml/xpf {