2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, libjpeg
|
|
|
|
, mesa
|
|
|
|
, pango
|
2022-10-21 18:38:19 +00:00
|
|
|
, pkg-config
|
2022-07-14 12:49:19 +00:00
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, wayland-scanner
|
|
|
|
}:
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "hyprpaper";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.3.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hyprwm";
|
2023-05-24 13:37:59 +00:00
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = "v${finalAttrs.version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-/ehJbAtSJS86NlqHVOeR2ViBKlImKH4guFVPacTmCr8=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
wayland-scanner
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libjpeg
|
|
|
|
mesa
|
|
|
|
pango
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace src/main.cpp \
|
2022-10-21 18:38:19 +00:00
|
|
|
--replace GIT_COMMIT_HASH '"${finalAttrs.src.rev}"'
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
make protocols
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 ./hyprpaper -t $out/bin
|
|
|
|
|
|
|
|
runHook postInstall
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-10-21 18:38:19 +00:00
|
|
|
inherit (finalAttrs.src.meta) homepage;
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "A blazing fast wayland wallpaper utility";
|
|
|
|
license = licenses.bsd3;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ wozeparrot fufexan ];
|
2022-10-21 18:38:19 +00:00
|
|
|
inherit (wayland.meta) platforms;
|
2023-05-24 13:37:59 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
})
|