2021-10-17 18:42:51 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, python3
|
|
|
|
, libGL
|
2022-10-13 22:16:16 +00:00
|
|
|
, xorg
|
2021-10-17 18:42:51 +00:00
|
|
|
, libxkbcommon
|
|
|
|
, AppKit
|
|
|
|
, IOKit
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "epick";
|
2022-09-05 12:09:29 +00:00
|
|
|
version = "0.8.2";
|
2021-10-17 18:42:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vv9k";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-09-05 12:09:29 +00:00
|
|
|
sha256 = "sha256-b4if2ggJY+8CsCX8jbnnWXy16k7sfB88CLlYYCrtltk=";
|
2021-10-17 18:42:51 +00:00
|
|
|
};
|
|
|
|
|
2022-09-05 12:09:29 +00:00
|
|
|
cargoSha256 = "sha256-HyGSmeLJ+2Twkg94p1QqXZDix0mU2jGFfEot6hgUg34=";
|
2021-10-17 18:42:51 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = lib.optional stdenv.isLinux python3;
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
libGL
|
2022-10-13 22:16:16 +00:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libxcb
|
2021-10-17 18:42:51 +00:00
|
|
|
libxkbcommon
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
AppKit
|
|
|
|
IOKit
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
|
|
patchelf --set-rpath ${lib.makeLibraryPath buildInputs} $out/bin/epick
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|