about summary refs log tree commit diff stats
path: root/pkgs/by-name/ts/tskm/package.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/ts/tskm/package.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/by-name/ts/tskm/package.nix b/pkgs/by-name/ts/tskm/package.nix
new file mode 100644
index 00000000..a57dc4aa
--- /dev/null
+++ b/pkgs/by-name/ts/tskm/package.nix
@@ -0,0 +1,32 @@
+{
+  rustPlatform,
+  installShellFiles,
+}:
+rustPlatform.buildRustPackage {
+  pname = "tskm";
+  version = "0.1.0";
+
+  src = ./.;
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  };
+
+  env = {
+    SHELL_COMPLETION_DIR = "./shell";
+  };
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  postInstall = ''
+    installShellCompletion --cmd tskm \
+      --bash ./shell/tskm.bash \
+      --fish ./shell/tskm.fish \
+      --zsh ./shell/_tskm
+  '';
+
+  meta = {
+    mainProgram = "tskm";
+  };
+}