Merge pull request #331099 from doronbehar/pkg/sequoia-sq

sequoia-sq: 0.34.0 -> 0.37.0
This commit is contained in:
Doron Behar 2024-08-01 13:32:45 +00:00 committed by GitHub
commit 744ee783af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 47 deletions

View File

@ -1,6 +1,5 @@
{ stdenv
, fetchFromGitLab
, fetchpatch
, lib
, darwin
, nettle
@ -15,24 +14,16 @@
rustPlatform.buildRustPackage rec {
pname = "sequoia-sq";
version = "0.34.0";
version = "0.37.0";
src = fetchFromGitLab {
owner = "sequoia-pgp";
repo = "sequoia-sq";
rev = "v${version}";
hash = "sha256-voFektWZnkmIQzI7s5nKzVVWQtEhzk2GKtxX926RtxU=";
hash = "sha256-D22ECJvbGbnyvusWXfU5F1aLF/ETuMyhAStT5HPWR2U=";
};
patches = [
# Fixes test failing on Darwin, see:
# https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/211
(fetchpatch {
url = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/commit/21221a935e0d058ed269ae6c8f45c5fa7ea0d598.patch";
hash = "sha256-ZjTl3EumeFwMJUl+qMpX+P2maYz4Ow/Tn9KwYbHDbes=";
})
];
cargoHash = "sha256-3ncBpRi0v6g6wwPkSASDwt0d8cOOAUv9BwZaYvnif1U=";
cargoHash = "sha256-jFpqZKyRCMkMtOezsYJy3Fy1WXUPyn709wZxuwKlSYI=";
nativeBuildInputs = [
pkg-config
@ -47,13 +38,16 @@ rustPlatform.buildRustPackage rec {
nettle
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]);
# Sometimes, tests fail on CI (ofborg) & hydra without this
checkFlags = [
# doctest for sequoia-ipc fail for some reason
"--skip=macros::assert_send_and_sync"
"--skip=macros::time_it"
# https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/297
"--skip=sq_autocrypt_import"
];
# Needed for tests to be able to create a ~/.local/share/sequoia directory
preCheck = ''
export HOME=$(mktemp -d)
'';
env.ASSET_OUT_DIR = "/tmp/";
doCheck = true;
@ -69,12 +63,12 @@ rustPlatform.buildRustPackage rec {
passthru.updateScript = nix-update-script { };
meta = with lib; {
meta = {
description = "Cool new OpenPGP implementation";
homepage = "https://sequoia-pgp.org/";
changelog = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/blob/v${version}/NEWS";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ minijackson doronbehar ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ minijackson doronbehar ];
mainProgram = "sq";
};
}

View File

@ -13,16 +13,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "sequoia-wot";
version = "0.11.0";
version = "0.12.0";
src = fetchFromGitLab {
owner = "sequoia-pgp";
repo = "sequoia-wot";
rev = "v${version}";
hash = "sha256-qSf2uESsMGUEvAiRefpwxHKyizbq5Sst3SpjKaMIWTQ=";
hash = "sha256-Xbj1XLZQxyEYf/+R5e6EJMmL0C5ohfwZMZPVK5PwmUU=";
};
cargoHash = "sha256-vGseKdHqyncScS57UF3SR3EVdUGKVMue8fnRftefSY0=";
cargoHash = "sha256-BidSKnsIEEEU8UarbhqALcp44L0pes6O4m2mSEL1r4Q=";
nativeBuildInputs = [
pkg-config
@ -80,11 +80,11 @@ rustPlatform.buildRustPackage rec {
target/*/release/build/sequoia-wot-*/out/sq-wot-path.1
'';
meta = with lib; {
meta = {
description = "Rust CLI tool for authenticating bindings and exploring a web of trust";
homepage = "https://gitlab.com/sequoia-pgp/sequoia-wot";
license = licenses.gpl2Only;
maintainers = with maintainers; [ Cryolitia ];
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ doronbehar Cryolitia ];
mainProgram = "sq-wot";
};
}

View File

@ -48,11 +48,11 @@ rustPlatform.buildRustPackage rec {
passthru.updateScript = nix-update-script { };
meta = with lib; {
meta = {
description = "Implementation of the Stateless OpenPGP Command Line Interface using Sequoia";
homepage = "https://docs.sequoia-pgp.org/sqop/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ doronbehar ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ doronbehar ];
mainProgram = "sqop";
};
}

View File

@ -9,17 +9,16 @@
rustPlatform.buildRustPackage rec {
pname = "sequoia-sqv";
version = "1.1.0";
version = "1.2.1";
src = fetchFromGitLab {
owner = "sequoia-pgp";
repo = "sequoia-sqv";
rev = "v${version}";
hash = "sha256-KoB9YnPNE2aB5MW5G9r6Bk+1QnANVSKA2dp3ufSJ44M=";
hash = "sha256-frGukJDsxq+BWLPC/4imfc42lDKVF8BPIQQDazaLaQ0=";
};
cargoPatches = [ ./Cargo.lock.patch ];
cargoHash = "sha256-E6tNOc3omg6yLwCP+MdyBF/HmFTBFCiXd5r+jflfs4k=";
cargoHash = "sha256-1h1nXtXMTwL8ICxWTV8My0IdE+6w0L7xXZD012Cv5U8=";
nativeBuildInputs = [
pkg-config
@ -30,31 +29,29 @@ rustPlatform.buildRustPackage rec {
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"
'';
# 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/_sqv \
--bash target/sqv.bash \
--fish target/sqv.fish
--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 = with lib; {
meta = {
description = "Command-line OpenPGP signature verification tool";
homepage = "https://docs.sequoia-pgp.org/sqv/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ doronbehar ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ doronbehar ];
mainProgram = "sqv";
};
}