about summary refs log tree commit diff
path: root/pkgs/by-name/tu/tuxmux/package.nix
blob: 871a3b7c4bf2fce83b43629cf849186e66e31507 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, libiconv
, pkg-config
, installShellFiles
}:

rustPlatform.buildRustPackage rec {
  pname = "tuxmux";
  version = "0.1.1";

  src = fetchFromGitHub {
    owner = "edeneast";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-BZ1Vo1NIpzUBGyvd/UbxLaFbrLzoaP8kn/8GoAYBmlo=";
  };

  cargoHash = "sha256-HIYQPHLMhQtpCIkl5EzjJGHXzBtw7mY85l5bqapw3rg=";

  buildInputs = [ libiconv ];
  nativeBuildInputs = [ pkg-config installShellFiles ];

  postInstall = ''
    installShellCompletion $releaseDir/../completions/tm.{bash,fish}
    installShellCompletion --zsh $releaseDir/../completions/_tm

    installManPage $releaseDir/../man/*
  '';

  meta = with lib; {
    description = "Tmux session manager";
    homepage = "https://github.com/edeneast/tuxmux";
    license = licenses.asl20;
    maintainers = with maintainers; [ edeneast ];
    mainProgram = "tm";
  };
}