2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-11-16 04:20:00 +00:00
|
|
|
, fetchPypi
|
2023-07-15 17:15:38 +00:00
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, cargo
|
|
|
|
, rustc
|
|
|
|
, bzip2
|
|
|
|
, nettle
|
|
|
|
, openssl
|
|
|
|
, pcsclite
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-11-16 04:20:00 +00:00
|
|
|
, libiconv
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysequoia";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.1.20";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-KavsLp17e4ckX11B0pefiQ1Hma/O9x0VY/uVPiJm4Fs=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-7Lw6gR6o2HJ/zyG4b0wz4nmU2AIIAhyK9zaQ6w+/RgE=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustPlatform.maturinBuildHook
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
|
|
|
nettle
|
|
|
|
openssl
|
|
|
|
pcsclite
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
2023-11-16 04:20:00 +00:00
|
|
|
libiconv
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pysequoia" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "This library provides OpenPGP facilities in Python through the Sequoia PGP library";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://codeberg.org/wiktor/pysequoia";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://sequoia-pgp.gitlab.io/pysequoia";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
2023-11-16 04:20:00 +00:00
|
|
|
# Broken since the 0.1.20 update according to ofborg. The errors are not clear...
|
|
|
|
broken = stdenv.isDarwin;
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|