python3Packages.pysodium: init at 0.7.18
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
parent
99c4eddd47
commit
a5bebf0fb7
47
pkgs/development/python-modules/pysodium/default.nix
Normal file
47
pkgs/development/python-modules/pysodium/default.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
libsodium,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pysodium";
|
||||
version = "0.7.18";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stef";
|
||||
repo = "pysodium";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-F2215AAI8UIvn6UbaJ/YxI4ZolCzlwY6nS5IafTs+i4=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
let
|
||||
soext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
in
|
||||
''
|
||||
substituteInPlace ./pysodium/__init__.py --replace-fail \
|
||||
"ctypes.util.find_library('sodium') or ctypes.util.find_library('libsodium')" "'${libsodium}/lib/libsodium${soext}'"
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [ libsodium ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "pysodium" ];
|
||||
|
||||
meta = {
|
||||
description = "Wrapper for libsodium providing high level crypto primitives";
|
||||
homepage = "https://github.com/stef/pysodium";
|
||||
changelog = "https://github.com/stef/pysodium/releases/tag/v${version}";
|
||||
maintainers = [ lib.maintainers.ethancedwards8 ];
|
||||
license = lib.licenses.bsd2;
|
||||
};
|
||||
}
|
@ -14066,6 +14066,8 @@ self: super: with self; {
|
||||
|
||||
pysocks = callPackage ../development/python-modules/pysocks { };
|
||||
|
||||
pysodium = callPackage ../development/python-modules/pysodium { };
|
||||
|
||||
pysol-cards = callPackage ../development/python-modules/pysol-cards { };
|
||||
|
||||
pysolarmanv5 = callPackage ../development/python-modules/pysolarmanv5 { };
|
||||
|
Loading…
x
Reference in New Issue
Block a user