2023-07-05 03:57:51 +02:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2024-01-03 01:58:57 +01:00
|
|
|
, stdenv
|
|
|
|
, installShellFiles
|
2023-07-05 03:57:51 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "lutgen";
|
2023-10-13 05:41:34 +02:00
|
|
|
version = "0.9.0";
|
2023-07-05 03:57:51 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ozwaldorf";
|
|
|
|
repo = "lutgen-rs";
|
|
|
|
rev = "v${version}";
|
2023-10-13 05:41:34 +02:00
|
|
|
hash = "sha256-tKSPk0V11pnKFV4E08H4CUnjw9nAonTRI6W3mGipd9I=";
|
2023-07-05 03:57:51 +02:00
|
|
|
};
|
|
|
|
|
2023-10-13 05:41:34 +02:00
|
|
|
cargoHash = "sha256-DiorrgTH9lIdmaZL7451uCXj9X7M6eHf4MQc85MpU7s=";
|
2023-07-05 03:57:51 +02:00
|
|
|
|
2024-01-03 01:58:57 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
|
|
installShellCompletion --cmd lutgen \
|
|
|
|
--bash <($out/bin/lutgen completions bash) \
|
|
|
|
--fish <($out/bin/lutgen completions fish) \
|
|
|
|
--zsh <($out/bin/lutgen completions zsh)
|
|
|
|
'';
|
|
|
|
|
2023-07-05 03:57:51 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A blazingly fast interpolated LUT generator and applicator for arbitrary and popular color palettes";
|
|
|
|
homepage = "https://github.com/ozwaldorf/lutgen-rs";
|
2024-01-03 02:07:38 +01:00
|
|
|
maintainers = with maintainers; [ zzzsy donovanglover ];
|
2023-07-05 03:57:51 +02:00
|
|
|
mainProgram = "lutgen";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|