about summary refs log tree commit diff stats
path: root/pkgs/by-name/fu/fupdate/package.nix
blob: d33138e319cb5337ff5fc9ac81b56706ad772255 (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
{
  rustPlatform,
  installShellFiles,
  makeWrapper,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "fupdate";
  version = "0.1.0";

  src = ./.;
  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  buildInputs = [];

  nativeBuildInputs = [
    installShellFiles
    makeWrapper
  ];

  postInstall = ''
    installShellCompletion --cmd fupdate \
      --bash <(COMPLETE=bash $out/bin/fupdate) \
      --fish <(COMPLETE=fish $out/bin/fupdate) \
      --zsh <(COMPLETE=zsh $out/bin/fupdate)
  '';

  meta = {
    mainProgram = "fupdate";
  };
})