about summary refs log tree commit diff
path: root/pkgs/tools/misc/nux/default.nix
blob: d1d44a35c20c5130085c2fa6bc9792ee79d6b554 (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
{ lib
, fetchFromGitHub
, rustPlatform
, asciidoctor
, installShellFiles
}:

let
  pname = "nux";
  version = "0.1.4";
in
rustPlatform.buildRustPackage {
  inherit pname version;

  src = fetchFromGitHub {
    owner = "NuxPackage";
    repo = pname;
    rev = version;
    hash = "sha256-k3HRaWN8/MTZRGWBxI8RRK0tcSYBbSLs3vHkUdLGTc8";
  };

  cargoHash = "sha256-wfUr3dcdALMEgJ6CaXhK4Gqk6xflCnov9tELA63drV4=";

  nativeBuildInputs = [ asciidoctor installShellFiles ];

  postInstall = ''
    installManPage $releaseDir/build/nux-*/out/nux.1
    installShellCompletion $releaseDir/build/nux-*/out/nux.{bash,fish}
    installShellCompletion $releaseDir/build/nux-*/out/_nux
  '';

  meta = {
    homepage = "https://github.com/NuxPackage/nux";
    description = "Wrapper over the nix cli";
    license = with lib.licenses; [ gpl3Plus ];
    maintainers = with lib.maintainers; [ ];
    mainProgram = "nux";
  };
}