2023-03-24 00:07:29 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, cairo
|
|
|
|
, fribidi
|
|
|
|
, libdatrie
|
|
|
|
, libjpeg
|
|
|
|
, libselinux
|
|
|
|
, libsepol
|
|
|
|
, libthai
|
|
|
|
, pango
|
|
|
|
, pcre
|
|
|
|
, util-linux
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, wayland-scanner
|
|
|
|
, wlroots
|
|
|
|
, libXdmcp
|
|
|
|
, debug ? false
|
|
|
|
}:
|
2023-05-24 13:37:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-03-24 00:07:29 +00:00
|
|
|
pname = "hyprpicker" + lib.optionalString debug "-debug";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.1.1";
|
2023-03-24 00:07:29 +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-k+rG5AZjz47Q6bpVcTK7r4s7Avg3O+1iw+skK+cn0rk=";
|
2023-03-24 00:07:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
fribidi
|
|
|
|
libdatrie
|
|
|
|
libjpeg
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
libthai
|
|
|
|
pango
|
|
|
|
pcre
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
wayland-scanner
|
|
|
|
wlroots
|
|
|
|
libXdmcp
|
|
|
|
util-linux
|
|
|
|
];
|
|
|
|
|
|
|
|
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/hyprpicker -t $out/bin
|
|
|
|
install -Dm644 LICENSE -t $out/share/licenses/hyprpicker
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A wlroots-compatible Wayland color picker that does not suck";
|
|
|
|
homepage = "https://github.com/hyprwm/hyprpicker";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fufexan ];
|
|
|
|
platforms = wayland.meta.platforms;
|
|
|
|
};
|
2023-05-24 13:37:59 +00:00
|
|
|
})
|