nixpkgs/pkgs/by-name/tw/twm/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.3 KiB
Nix
Raw Normal View History

2023-04-13 07:57:17 +00:00
{ lib
, darwin
2023-04-13 07:57:17 +00:00
, fetchFromGitHub
, stdenv
, rustPlatform
, openssl
, pkg-config
2024-05-16 21:05:41 +00:00
, nix-update-script
2024-06-01 06:20:22 +00:00
, installShellFiles
2023-04-13 07:57:17 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "twm";
version = "0.11.0";
2023-04-13 07:57:17 +00:00
src = fetchFromGitHub {
owner = "vinnymeller";
2024-05-16 21:05:41 +00:00
repo = "twm";
2024-06-01 06:20:22 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-SiwLqUq/gC8Tr31jjblLc9YP4yBi9HL38W83kgh7eJI=";
2023-04-13 07:57:17 +00:00
};
cargoHash = "sha256-BjQ7dDXHzX+O/V328TTwl9wGtpOq+NjOMRiZwb9O7ZU=";
2023-04-13 07:57:17 +00:00
2024-06-01 06:20:22 +00:00
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
2023-04-13 07:57:17 +00:00
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2024-06-01 06:20:22 +00:00
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
'';
2024-05-16 21:05:41 +00:00
passthru.updateScript = nix-update-script { };
meta = {
description = "Customizable workspace manager for tmux";
2023-04-13 07:57:17 +00:00
homepage = "https://github.com/vinnymeller/twm";
changelog = "https://github.com/vinnymeller/twm/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
2024-05-16 21:05:41 +00:00
license = lib.licenses.mit;
maintainers = [ lib.maintainers.vinnymeller ];
2023-11-27 01:17:53 +00:00
mainProgram = "twm";
2023-04-13 07:57:17 +00:00
};
}