2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
69 lines
1.2 KiB
Nix
69 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, file
|
|
, libGL
|
|
, libjpeg
|
|
, mesa
|
|
, pango
|
|
, pkg-config
|
|
, wayland
|
|
, wayland-protocols
|
|
, wayland-scanner
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "hyprpaper";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hyprwm";
|
|
repo = finalAttrs.pname;
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-V5ulB9CkGh1ghiC4BKvRdoYKZzpaiOKzAOUmJIFkgM0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
wayland-scanner
|
|
];
|
|
|
|
buildInputs = [
|
|
file
|
|
libGL
|
|
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;
|
|
mainProgram = "hyprpaper";
|
|
};
|
|
})
|