Merge pull request #278390 from donovanglover/lutgen

lutgen: add shell completions
This commit is contained in:
Weijia Wang 2024-01-03 22:34:20 +01:00 committed by GitHub
commit 020146194a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,8 @@
{ lib
, fetchFromGitHub
, rustPlatform
, stdenv
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
@ -16,10 +18,21 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-DiorrgTH9lIdmaZL7451uCXj9X7M6eHf4MQc85MpU7s=";
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)
'';
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";
maintainers = with maintainers; [ zzzsy ];
maintainers = with maintainers; [ zzzsy donovanglover ];
mainProgram = "lutgen";
license = licenses.mit;
};

View File

@ -19582,8 +19582,6 @@ with pkgs;
lurk = callPackage ../development/tools/lurk { };
lutgen = callPackage ../applications/graphics/lutgen { };
maizzle = callPackage ../development/tools/maizzle { };
malt = callPackage ../development/tools/profiling/malt { };