Merge pull request #108522 from 0x4A6F/master-tumpa

This commit is contained in:
Sandro 2021-01-11 23:46:17 +01:00 committed by GitHub
commit f0a7fce6ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1328 additions and 0 deletions

File diff suppressed because it is too large Load Diff

@ -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 ];
};
}

@ -0,0 +1,36 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pyside2
, johnnycanencrypt
, pythonOlder
}:
buildPythonPackage rec {
pname = "tumpa";
version = "0.1.1";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "kushaldas";
repo = "tumpa";
rev = "v${version}";
sha256 = "1wvs64s0jxn4p8zr643d2hcczw3a175r6ib3481gdhjx38kgxjbq";
};
propagatedBuildInputs = [
setuptools
johnnycanencrypt
pyside2
];
doCheck = false;
meta = with stdenv.lib; {
description = "OpenPGP key creation and smartcard access";
homepage = "https://github.com/kushaldas/tumpa";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ _0x4A6F ];
};
}

@ -3233,6 +3233,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; };
@ -7663,6 +7667,8 @@ in {
tubeup = callPackage ../development/python-modules/tubeup { };
tumpa = callPackage ../development/python-modules/tumpa { };
tvdb_api = callPackage ../development/python-modules/tvdb_api { };
tvnamer = callPackage ../development/python-modules/tvnamer { };