diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix new file mode 100644 index 00000000000..55bd8deef9a --- /dev/null +++ b/pkgs/development/python-modules/cffi/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: + +if isPyPy then null else buildPythonPackage rec { + pname = "cffi"; + version = "1.10.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"; + }; + + propagatedBuildInputs = [ libffi pycparser ]; + buildInputs = [ pytest ]; + + patchPhase = '' + substituteInPlace testing/cffi0/test_ownlib.py --replace "gcc" "cc" + ''; + + checkPhase = '' + py.test + ''; + + meta = with lib; { + maintainers = with maintainers; [ domenkozar ]; + homepage = https://cffi.readthedocs.org/; + license = with licenses; [ mit ]; + description = "Foreign Function Interface for Python calling C code"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5d49ba7b700..3c23c911c70 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5035,32 +5035,7 @@ in { bcrypt = callPackage ../development/python-modules/bcrypt.nix { }; - cffi = if isPyPy then null else buildPythonPackage rec { - name = "cffi-1.9.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/c/cffi/${name}.tar.gz"; - sha256 = "563e0bd53fda03c151573217b3a49b3abad8813de9dd0632e10090f6190fdaf8"; - }; - - propagatedBuildInputs = with self; [ pkgs.libffi pycparser ]; - buildInputs = with self; [ pytest ]; - - patchPhase = '' - substituteInPlace testing/cffi0/test_ownlib.py --replace "gcc" "cc" - ''; - - checkPhase = '' - py.test - ''; - - meta = { - maintainers = with maintainers; [ domenkozar ]; - homepage = https://cffi.readthedocs.org/; - license = with licenses; [ mit ]; - description = "Foreign Function Interface for Python calling C code"; - }; - }; + cffi = callPackage ../development/python-modules/cffi { }; pycollada = buildPythonPackage rec { name = "pycollada-0.4.1"; @@ -6959,7 +6934,7 @@ in { }; ezdxf = callPackage ../development/python-modules/ezdxf {}; - + facebook-sdk = buildPythonPackage rec { name = "facebook-sdk-0.4.0";