2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
2022-10-21 18:38:19 +00:00
|
|
|
, pkg-config
|
|
|
|
, expat
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
2021-10-17 09:34:42 +00:00
|
|
|
, libGL
|
2022-10-21 18:38:19 +00:00
|
|
|
, xorg
|
|
|
|
, darwin
|
2021-10-17 09:34:42 +00:00
|
|
|
, AppKit
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "epick";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.9.0";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vv9k";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-k0WQu1n1sAHVor58jr060vD5/2rDrt1k5zzJlrK9WrU=";
|
2021-10-17 09:34:42 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cargoSha256 = "sha256-OQZPOiMTpoWabxHa3TJG8L3zq8WxMeFttw8xggSXsMA=";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
2022-10-21 18:38:19 +00:00
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
2021-10-17 09:34:42 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
AppKit
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
2022-10-21 18:38:19 +00:00
|
|
|
patchelf $out/bin/epick --add-rpath ${lib.makeLibraryPath [ libGL ]}
|
2021-10-17 09:34:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple color picker that lets the user create harmonic palettes with ease";
|
|
|
|
homepage = "https://github.com/vv9k/epick";
|
|
|
|
changelog = "https://github.com/vv9k/epick/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|