7e47f3658e
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, rustPlatform
|
|
, openssl
|
|
, pkg-config
|
|
, Security
|
|
, nix-update-script
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "twm";
|
|
version = "0.10.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vinnymeller";
|
|
repo = "twm";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-qOOEeaxae7nYbvNzl3BEZkdjO69lgtGrrLS5Q7akN9U=";
|
|
};
|
|
|
|
cargoHash = "sha256-gJ5go9V8c97pQZICUD1ksLJhOyJXyVXAWssH3fhrRVQ=";
|
|
|
|
nativeBuildInputs = [ pkg-config installShellFiles ];
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
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 = {
|
|
description = "Customizable workspace manager for tmux";
|
|
homepage = "https://github.com/vinnymeller/twm";
|
|
changelog = "https://github.com/vinnymeller/twm/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.vinnymeller ];
|
|
mainProgram = "twm";
|
|
};
|
|
}
|