ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / se / sequoia-sqv / package.nix
blob591a547425ba2b746a25ef334ab4196ec139f63b
1 { lib
2 , fetchFromGitLab
3 , nettle
4 , nix-update-script
5 , rustPlatform
6 , pkg-config
7 , installShellFiles
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "sequoia-sqv";
12   version = "1.2.1";
14   src = fetchFromGitLab {
15     owner = "sequoia-pgp";
16     repo = "sequoia-sqv";
17     rev = "v${version}";
18     hash = "sha256-frGukJDsxq+BWLPC/4imfc42lDKVF8BPIQQDazaLaQ0=";
19   };
21   cargoHash = "sha256-1h1nXtXMTwL8ICxWTV8My0IdE+6w0L7xXZD012Cv5U8=";
23   nativeBuildInputs = [
24     pkg-config
25     rustPlatform.bindgenHook
26     installShellFiles
27   ];
29   buildInputs = [
30     nettle
31   ];
32   # Install shell completion files and manual pages. Unfortunatly it is hard to
33   # predict the paths to all of these files generated during the build, and it
34   # is impossible to control these using `$OUT_DIR` or alike, as implied by
35   # upstream's `build.rs`. This is a general Rust issue also discussed in
36   # https://github.com/rust-lang/cargo/issues/9661, also discussed upstream at:
37   # https://gitlab.com/sequoia-pgp/sequoia-wot/-/issues/56
38   postInstall = ''
39     installManPage target/*/release/build/*/out/man-pages/sqv.1
40     installShellCompletion --cmd sqv \
41       --zsh target/*/release/build/*/out/shell-completions/_sqv \
42       --bash target/*/release/build/*/out/shell-completions/sqv.bash \
43       --fish target/*/release/build/*/out/shell-completions/sqv.fish
44   '';
46   doCheck = true;
48   passthru.updateScript = nix-update-script { };
50   meta = {
51     description = "Command-line OpenPGP signature verification tool";
52     homepage = "https://docs.sequoia-pgp.org/sqv/";
53     license = lib.licenses.gpl2Plus;
54     maintainers = with lib.maintainers; [ doronbehar ];
55     mainProgram = "sqv";
56   };