depot/third_party/nixpkgs/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

73 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, file
, hyprlang
, libGL
, libjpeg
, libwebp
, mesa
, pango
, pkg-config
, wayland
, wayland-protocols
, wayland-scanner
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyprpaper";
version = "0.7.0";
src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-l13c8ALA7ZKDgluYA1C1OfkDGYD6e1/GR6LJnxCLRhA=";
};
nativeBuildInputs = [
cmake
pkg-config
wayland-scanner
];
buildInputs = [
file
hyprlang
libGL
libjpeg
libwebp
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;
broken = stdenv.isDarwin;
mainProgram = "hyprpaper";
};
})