johnnycanencrypt: init at 0.5.0
This commit is contained in:
parent
e6f00abb56
commit
e149a5c90c
3 changed files with 1290 additions and 0 deletions
1194
pkgs/development/python-modules/johnnycanencrypt/Cargo.lock.patch
Normal file
1194
pkgs/development/python-modules/johnnycanencrypt/Cargo.lock.patch
Normal file
File diff suppressed because it is too large
Load diff
92
pkgs/development/python-modules/johnnycanencrypt/default.nix
Normal file
92
pkgs/development/python-modules/johnnycanencrypt/default.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{ stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pipInstallHook
|
||||
, llvmPackages
|
||||
, pkg-config
|
||||
, maturin
|
||||
, pcsclite
|
||||
, nettle
|
||||
, python
|
||||
, requests
|
||||
, vcrpy
|
||||
, numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, PCSC
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "johnnycanencrypt";
|
||||
version = "0.5.0";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kushaldas";
|
||||
repo = "johnnycanencrypt";
|
||||
rev = "v${version}";
|
||||
sha256 = "192wfrlyylrpzq70yki421mi1smk8q2cyki2a1d03q7h6apib3j4";
|
||||
};
|
||||
cargoPatches = [ ./Cargo.lock.patch ];
|
||||
|
||||
cargoSha256 = "0ifvpdizcdp2c5x2x2j1bhhy5a75q0pk7a63dmh52mlpmh45fy6r";
|
||||
|
||||
LIBCLANG_PATH = llvmPackages.libclang + "/lib";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
requests
|
||||
vcrpy
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
llvmPackages.clang
|
||||
pkg-config
|
||||
python
|
||||
maturin
|
||||
pipInstallHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pcsclite
|
||||
nettle
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [ PCSC ];
|
||||
|
||||
# Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
|
||||
doCheck = false;
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckInputs = [
|
||||
pytestCheckHook
|
||||
numpy
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
maturin build --release --manylinux off --strip --cargo-extra-args="-j $NIX_BUILD_CORES --frozen"
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm644 -t dist target/wheels/*.whl
|
||||
pipInstallPhase
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
export TESTDIR=$(mktemp -d)
|
||||
cp -r tests/ $TESTDIR
|
||||
pushd $TESTDIR
|
||||
'';
|
||||
|
||||
postCheck = ''
|
||||
popd
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "johnnycanencrypt" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/kushaldas/johnnycanencrypt";
|
||||
description = "Python module for OpenPGP written in Rust";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ _0x4A6F ];
|
||||
};
|
||||
}
|
|
@ -3180,6 +3180,10 @@ in {
|
|||
|
||||
joblib = callPackage ../development/python-modules/joblib { };
|
||||
|
||||
johnnycanencrypt = callPackage ../development/python-modules/johnnycanencrypt {
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) PCSC;
|
||||
};
|
||||
|
||||
josepy = callPackage ../development/python-modules/josepy { };
|
||||
|
||||
journalwatch = callPackage ../tools/system/journalwatch { inherit (self) systemd pytest; };
|
||||
|
|
Loading…
Reference in a new issue