aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/security/sequoia/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security/sequoia/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/security/sequoia/default.nix52
1 files changed, 33 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/tools/security/sequoia/default.nix b/nixpkgs/pkgs/tools/security/sequoia/default.nix
index e6081fbf472..a54433b92c9 100644
--- a/nixpkgs/pkgs/tools/security/sequoia/default.nix
+++ b/nixpkgs/pkgs/tools/security/sequoia/default.nix
@@ -1,32 +1,46 @@
-{ stdenv, fetchFromGitLab, lib, darwin
-, git, nettle, llvmPackages, cargo, rustc
-, rustPlatform, pkgconfig, glib
-, openssl, sqlite, capnproto
-, ensureNewerSourcesForZipFilesHook, pythonSupport ? true, pythonPackages ? null
+{ stdenv
+, fetchFromGitLab
+, lib
+, darwin
+, git
+, nettle
+# Use the same llvmPackages version as Rust
+, llvmPackages_10
+, cargo
+, rustc
+, rustPlatform
+, pkg-config
+, glib
+, openssl
+, sqlite
+, capnproto
+, ensureNewerSourcesForZipFilesHook
+, pythonSupport ? true
+, pythonPackages ? null
}:
assert pythonSupport -> pythonPackages != null;
rustPlatform.buildRustPackage rec {
pname = "sequoia";
- version = "0.16.0";
+ version = "0.19.0";
src = fetchFromGitLab {
owner = "sequoia-pgp";
- repo = pname;
+ repo = "sequoia";
rev = "v${version}";
- sha256 = "0iwzi2ylrwz56s77cd4vcf89ig6ipy4w6kp2pfwqvd2d00x54dhk";
+ sha256 = "1870wd03c3x0da9p3jmkvfx8am87ak0dcsvp2qkjvglbl396kd8y";
};
- cargoSha256 = "0jsmvs6hr9mhapz3a74wpfgkjkq3w10014j3z30bm659mxqrknha";
+ cargoSha256 = "0bb51vdppdjhsxbfy3lyqvw5r5j58r3wi0qb68m2a45k3za7liss";
nativeBuildInputs = [
- pkgconfig
+ pkg-config
cargo
rustc
git
- llvmPackages.libclang
- llvmPackages.clang
+ llvmPackages_10.libclang
+ llvmPackages_10.clang
ensureNewerSourcesForZipFilesHook
capnproto
] ++
@@ -54,23 +68,24 @@ rustPlatform.buildRustPackage rec {
"build-release"
];
- LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
+ LIBCLANG_PATH = "${llvmPackages_10.libclang}/lib";
+ # Sometimes, tests fail on CI (ofborg) & hydra without this
+ CARGO_TEST_ARGS = "--workspace --exclude sequoia-store";
+
+ # Without this, the examples won't build
postPatch = ''
- # otherwise, the check fails because we delete the `.git` in the unpack phase
- substituteInPlace openpgp-ffi/Makefile \
- --replace 'git grep' 'grep -R'
- # Without this, the check fails
substituteInPlace openpgp-ffi/examples/Makefile \
--replace '-O0 -g -Wall -Werror' '-g'
substituteInPlace ffi/examples/Makefile \
--replace '-O0 -g -Wall -Werror' '-g'
'';
+
preInstall = lib.optionalString pythonSupport ''
export installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
'' + lib.optionalString (!pythonSupport) ''
- export installFlags="PYTHON=disable"
+ export makeFlags="PYTHON=disable"
'';
# Don't use buildRustPackage phases, only use it for rust deps setup
@@ -85,7 +100,6 @@ rustPlatform.buildRustPackage rec {
homepage = "https://sequoia-pgp.org/";
license = licenses.gpl3;
maintainers = with maintainers; [ minijackson doronbehar ];
- platforms = platforms.all;
broken = stdenv.targetPlatform.isDarwin;
};
}