about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/by-name/lu/lutgen/package.nix (renamed from pkgs/applications/graphics/lutgen/default.nix)15
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/lutgen/default.nix b/pkgs/by-name/lu/lutgen/package.nix
index be93d964337a9..c74896b88ac82 100644
--- a/pkgs/applications/graphics/lutgen/default.nix
+++ b/pkgs/by-name/lu/lutgen/package.nix
@@ -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;
   };
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 939ef3b0819e3..9ea6b10849f3a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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 { };