nixpkgs/pkgs/by-name/se/sequoia-sqv/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

58 lines
1.6 KiB
Nix

{ lib
, fetchFromGitLab
, nettle
, nix-update-script
, rustPlatform
, pkg-config
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "sequoia-sqv";
version = "1.2.1";
src = fetchFromGitLab {
owner = "sequoia-pgp";
repo = "sequoia-sqv";
rev = "v${version}";
hash = "sha256-frGukJDsxq+BWLPC/4imfc42lDKVF8BPIQQDazaLaQ0=";
};
cargoHash = "sha256-1h1nXtXMTwL8ICxWTV8My0IdE+6w0L7xXZD012Cv5U8=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
installShellFiles
];
buildInputs = [
nettle
];
# Install shell completion files and manual pages. Unfortunatly it is hard to
# predict the paths to all of these files generated during the build, and it
# is impossible to control these using `$OUT_DIR` or alike, as implied by
# upstream's `build.rs`. This is a general Rust issue also discussed in
# https://github.com/rust-lang/cargo/issues/9661, also discussed upstream at:
# https://gitlab.com/sequoia-pgp/sequoia-wot/-/issues/56
postInstall = ''
installManPage target/*/release/build/*/out/man-pages/sqv.1
installShellCompletion --cmd sqv \
--zsh target/*/release/build/*/out/shell-completions/_sqv \
--bash target/*/release/build/*/out/shell-completions/sqv.bash \
--fish target/*/release/build/*/out/shell-completions/sqv.fish
'';
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Command-line OpenPGP signature verification tool";
homepage = "https://docs.sequoia-pgp.org/sqv/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ doronbehar ];
mainProgram = "sqv";
};
}