depot/third_party/nixpkgs/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

64 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, libjpeg
, mesa
, pango
, pkg-config
, wayland
, wayland-protocols
, wayland-scanner
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyprpaper";
version = "0.3.0";
src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-/ehJbAtSJS86NlqHVOeR2ViBKlImKH4guFVPacTmCr8=";
};
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;
broken = stdenv.isDarwin;
};
})