about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2024-06-05 02:00:13 +0200
committerGitHub <noreply@github.com>2024-06-05 02:00:13 +0200
commit102c301d468c0a8a87e65ecac8113c6a01a37dd5 (patch)
treea13d9f0850f04e9488b3a07c9edfee4cf5da9877 /pkgs
parent1986e87530d4d6ac1410fe803d072052ec41d4ed (diff)
parent6031652ebf6c0eb0602d0edaf069bcec5f9b9ea1 (diff)
Merge pull request #316338 from vinnymeller/update-twm
twm: 0.9.1 -> 0.10.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/twm/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/tools/misc/twm/default.nix b/pkgs/tools/misc/twm/default.nix
index 02f1f011a99c7..213378e41f051 100644
--- a/pkgs/tools/misc/twm/default.nix
+++ b/pkgs/tools/misc/twm/default.nix
@@ -6,24 +6,35 @@
 , pkg-config
 , Security
 , nix-update-script
+, installShellFiles
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "twm";
-  version = "0.9.1";
+  version = "0.10.2";
 
   src = fetchFromGitHub {
     owner = "vinnymeller";
     repo = "twm";
-    rev = "v${version}";
-    hash = "sha256-1hRGcvUGHO5ENgI3tdT46736ODN8QZ6vg+Y1y2XeuAA=";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-qOOEeaxae7nYbvNzl3BEZkdjO69lgtGrrLS5Q7akN9U=";
   };
 
-  cargoHash = "sha256-iJB+7+1tFT/tKvXlxaaW3QJHjWNZmCVIEXwtrSei/Do=";
+  cargoHash = "sha256-gJ5go9V8c97pQZICUD1ksLJhOyJXyVXAWssH3fhrRVQ=";
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config installShellFiles ];
   buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
 
+  postInstall = ''
+    installShellCompletion --cmd twm \
+      --bash <($out/bin/twm --print-bash-completion) \
+      --zsh <($out/bin/twm --print-zsh-completion) \
+      --fish <($out/bin/twm --print-fish-completion)
+
+    $out/bin/twm --print-man > twm.1
+    installManPage twm.1
+  '';
+
   passthru.updateScript = nix-update-script { };
 
   meta = {