2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
stdenv,
|
|
|
|
installShellFiles,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "lutgen";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.11.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ozwaldorf";
|
|
|
|
repo = "lutgen-rs";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-ybaapL9OUUQ+sO8P0JH1MuxCFmTihKp9gXJpM7KLY7U=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-Fxecnq7QKcDe6aAsKj9uye3sFdfkgFEKYmdqnvQDiAQ=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
|
|
installShellCompletion --cmd lutgen \
|
2024-09-19 14:19:46 +00:00
|
|
|
--bash <($out/bin/lutgen --bpaf-complete-style-bash) \
|
|
|
|
--fish <($out/bin/lutgen --bpaf-complete-style-fish) \
|
|
|
|
--zsh <($out/bin/lutgen --bpaf-complete-style-zsh)
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Blazingly fast interpolated LUT generator and applicator for arbitrary and popular color palettes";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/ozwaldorf/lutgen-rs";
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
ozwaldorf
|
|
|
|
zzzsy
|
|
|
|
donovanglover
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "lutgen";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|