hyprpaper/nix/default.nix

99 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2022-08-23 19:58:33 +02:00
{
lib,
stdenv,
pkg-config,
cmake,
ninja,
cairo,
2024-01-02 22:19:42 +01:00
expat,
file,
2022-08-23 19:58:33 +02:00
fribidi,
2024-01-01 14:22:43 +01:00
hyprlang,
2022-08-23 19:58:33 +02:00
libdatrie,
2023-12-18 00:50:59 +01:00
libGL,
2022-08-23 19:58:33 +02:00
libjpeg,
libselinux,
libsepol,
libthai,
libwebp,
2022-08-23 19:58:33 +02:00
pango,
pcre,
2024-01-02 22:19:42 +01:00
pcre2,
util-linux,
2022-08-23 19:58:33 +02:00
wayland,
wayland-protocols,
wayland-scanner,
libXdmcp,
debug ? false,
version ? "git",
}:
stdenv.mkDerivation {
pname = "hyprpaper" + lib.optionalString debug "-debug";
inherit version;
src = ../.;
nativeBuildInputs = [
cmake
ninja
pkg-config
];
buildInputs = [
cairo
2024-01-02 22:19:42 +01:00
expat
file
2022-08-23 19:58:33 +02:00
fribidi
2024-01-01 14:22:43 +01:00
hyprlang
2022-08-23 19:58:33 +02:00
libdatrie
2023-12-18 00:50:59 +01:00
libGL
2022-08-23 19:58:33 +02:00
libjpeg
libselinux
libsepol
libthai
libwebp
2022-08-23 19:58:33 +02:00
pango
pcre
2024-01-02 22:19:42 +01:00
pcre2
2022-08-23 19:58:33 +02:00
wayland
wayland-protocols
wayland-scanner
libXdmcp
util-linux
2022-08-23 19:58:33 +02:00
];
configurePhase = ''
runHook preConfigure
make protocols
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
make release
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/licenses}
install -Dm755 build/hyprpaper -t $out/bin
install -Dm644 LICENSE -t $out/share/licenses/hyprpaper
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/hyprwm/hyprpaper";
description = "A blazing fast wayland wallpaper utility with IPC controls";
license = licenses.bsd3;
platforms = platforms.linux;
mainProgram = "hyprpaper";
};
}