mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
Merge pull request #46126 from flokli/gmpy-phe
pythonPackages: cleanup gmpy[2], add phe
This commit is contained in:
24
pkgs/development/python-modules/gmpy/default.nix
Normal file
24
pkgs/development/python-modules/gmpy/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ buildPythonPackage, fetchurl, isPyPy, gmp } :
|
||||
|
||||
let
|
||||
pname = "gmpy";
|
||||
version = "1.17";
|
||||
in
|
||||
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
|
||||
disabled = isPyPy;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/g/gmpy/${pname}-${version}.zip";
|
||||
sha256 = "1a79118a5332b40aba6aa24b051ead3a31b9b3b9642288934da754515da8fa14";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
meta = {
|
||||
description = "GMP or MPIR interface to Python 2.4+ and 3.x";
|
||||
homepage = http://code.google.com/p/gmpy/;
|
||||
};
|
||||
}
|
||||
25
pkgs/development/python-modules/gmpy2/default.nix
Normal file
25
pkgs/development/python-modules/gmpy2/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ stdenv, buildPythonPackage, fetchurl, isPyPy, gmp, mpfr, libmpc } :
|
||||
|
||||
let
|
||||
pname = "gmpy2";
|
||||
version = "2.0.8";
|
||||
in
|
||||
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
|
||||
disabled = isPyPy;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/g/gmpy2/${pname}-${version}.zip";
|
||||
sha256 = "0grx6zmi99iaslm07w6c2aqpnmbkgrxcqjrqpfq223xri0r3w8yx";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp mpfr libmpc ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x";
|
||||
homepage = http://code.google.com/p/gmpy/;
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
29
pkgs/development/python-modules/phe/default.nix
Normal file
29
pkgs/development/python-modules/phe/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k, click, gmpy2, numpy } :
|
||||
|
||||
let
|
||||
pname = "phe";
|
||||
version = "1.4.0";
|
||||
in
|
||||
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
|
||||
# https://github.com/n1analytics/python-paillier/issues/51
|
||||
disabled = isPyPy || ! isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0wzlk7d24kp0f5kpm0kvvc88mm42144f5cg9pcpb1dsfha75qy5m";
|
||||
};
|
||||
|
||||
buildInputs = [ click gmpy2 numpy ];
|
||||
|
||||
# 29/233 tests fail
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A library for Partially Homomorphic Encryption in Python";
|
||||
homepage = https://github.com/n1analytics/python-paillier;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user