{ lib , stdenv , fetchFromGitHub , cmake , libjpeg , mesa , pango , pkg-config , wayland , wayland-protocols , wayland-scanner }: stdenv.mkDerivation (finalAttrs: { pname = "hyprpaper"; version = "unstable-2023-04-05"; src = fetchFromGitHub { owner = "hyprwm"; repo = "hyprpaper"; rev = "9182de9ffc8c76fbf24d16dec0ea7a9430597a06"; hash = "sha256-LqvhYx1Gu+rlkF4pA1NYZzwRQwz3FeWBqXqmQq86m8o="; }; nativeBuildInputs = [ cmake pkg-config wayland-scanner ]; buildInputs = [ libjpeg mesa pango wayland wayland-protocols ]; prePatch = '' substituteInPlace src/main.cpp \ --replace GIT_COMMIT_HASH '"${finalAttrs.src.rev}"' ''; preConfigure = '' make protocols ''; installPhase = '' runHook preInstall install -Dm755 ./hyprpaper -t $out/bin runHook postInstall ''; meta = with lib; { inherit (finalAttrs.src.meta) homepage; description = "A blazing fast wayland wallpaper utility"; license = licenses.bsd3; maintainers = with maintainers; [ wozeparrot fufexan ]; inherit (wayland.meta) platforms; }; })