Merge pull request #240076 from doronbehar/pkg/sequoia-tools

sequoia-{sqv,sqop}: init at {1.1.0,0.28.0}
This commit is contained in:
Doron Behar 2023-06-28 06:43:51 +00:00 committed by GitHub
commit 3bcf6e7f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 123 additions and 0 deletions

View File

@ -0,0 +1,59 @@
{ stdenv
, fetchFromGitLab
, lib
, nettle
, nix-update-script
, installShellFiles
, rustPlatform
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "sequoia-sqop";
version = "0.28.0";
src = fetchFromGitLab {
owner = "sequoia-pgp";
# From some reason the repository is not sequoia-sqop - like the command
# generated etc
repo = "sequoia-sop";
rev = "v${version}";
hash = "sha256-4A0eZMXzFtojRD5cXQQUVoS32sQ2lWtFll+q6yhnwG4=";
};
cargoHash = "sha256-gH5WM+PmciViD+eFVlp8tzdc0KdYy1WZLQi92UEWVG4=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
installShellFiles
];
buildInputs = [
nettle
];
buildFeatures = [ "cli" ];
# Install manual pages
postInstall = ''
mkdir -p $out/share/man
cp -r man-sqop $out/share/man/man1
installShellCompletion --cmd sqop \
--bash target/*/release/build/sequoia-sop*/out/sqop.bash \
--fish target/*/release/build/sequoia-sop*/out/sqop.fish \
--zsh target/*/release/build/sequoia-sop*/out/_sqop
# Also elv and powershell are generated there
'';
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "An implementation of the Stateless OpenPGP Command Line Interface using Sequoia";
homepage = "https://docs.sequoia-pgp.org/sqop/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ doronbehar ];
mainProgram = "sqop";
};
}

View File

@ -0,0 +1,60 @@
{ stdenv
, fetchFromGitLab
, lib
, nettle
, nix-update-script
, rustPlatform
, pkg-config
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "sequoia-sqv";
version = "1.1.0";
src = fetchFromGitLab {
owner = "sequoia-pgp";
repo = "sequoia-sqv";
rev = "v${version}";
hash = "sha256-KoB9YnPNE2aB5MW5G9r6Bk+1QnANVSKA2dp3ufSJ44M=";
};
cargoHash = "sha256-uwOU/yyh3eoD10El7Oe9E97F3dvPuXMHQhpnWEJ1gnI=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
installShellFiles
];
buildInputs = [
nettle
];
# Otherwise, the shell completion files are not built
cargoBuildFlags = [
"--package" "sequoia-sqv"
];
# Use a predictable target directory, to access it when installing shell
# completion files.
preBuild = ''
export CARGO_TARGET_DIR="$(pwd)/target"
'';
postInstall = ''
installShellCompletion --cmd sqv \
--zsh target/_sqv \
--bash target/sqv.bash \
--fish target/sqv.fish
'';
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "A command-line OpenPGP signature verification tool";
homepage = "https://docs.sequoia-pgp.org/sqv/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ doronbehar ];
mainProgram = "sqv";
};
}

View File

@ -12449,6 +12449,10 @@ with pkgs;
sequoia-sq = callPackage ../tools/security/sequoia-sq { };
sequoia-sqv = callPackage ../tools/security/sequoia-sqv { };
sequoia-sqop = callPackage ../tools/security/sequoia-sqop { };
sequoia-chameleon-gnupg = callPackage ../tools/security/sequoia-chameleon-gnupg { };
sewer = callPackage ../tools/admin/sewer { };