2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2023-08-22 20:05:09 +00:00
|
|
|
, file
|
2024-01-25 14:12:00 +00:00
|
|
|
, hyprlang
|
2023-11-16 04:20:00 +00:00
|
|
|
, libGL
|
2022-07-14 12:49:19 +00:00
|
|
|
, libjpeg
|
2024-01-25 14:12:00 +00:00
|
|
|
, libwebp
|
2022-07-14 12:49:19 +00:00
|
|
|
, 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";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.7.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}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-l13c8ALA7ZKDgluYA1C1OfkDGYD6e1/GR6LJnxCLRhA=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
wayland-scanner
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
file
|
2024-01-25 14:12:00 +00:00
|
|
|
hyprlang
|
2023-11-16 04:20:00 +00:00
|
|
|
libGL
|
2022-07-14 12:49:19 +00:00
|
|
|
libjpeg
|
2024-01-25 14:12:00 +00:00
|
|
|
libwebp
|
2022-07-14 12:49:19 +00:00
|
|
|
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;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "hyprpaper";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
})
|