diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-10-29 01:47:46 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-10-29 01:47:46 +0200 |
commit | 7efd5abe4888d6270acd4b2cf6b736d24438cd0f (patch) | |
tree | b5e58e3e4d2c36653bca7b187cda64849a654ef6 /pkgs/development/python-modules/cffi/default.nix | |
parent | c9ac187c3c2c6da622578d9168ab9152c7d457c9 (diff) | |
download | nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.tar nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.tar.gz nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.tar.bz2 nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.tar.lz nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.tar.xz nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.tar.zst nixlib-7efd5abe4888d6270acd4b2cf6b736d24438cd0f.zip |
python-cffi: fix clang build
Diffstat (limited to 'pkgs/development/python-modules/cffi/default.nix')
-rw-r--r-- | pkgs/development/python-modules/cffi/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 5c99e77af56b..3389a6fd7054 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: +{ stdenv, buildPythonPackage, isPy27, isPyPy, fetchPypi, libffi, pycparser, pytest }: if isPyPy then null else buildPythonPackage rec { pname = "cffi"; @@ -10,13 +10,15 @@ if isPyPy then null else buildPythonPackage rec { sha256 = "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6"; }; + patches = stdenv.lib.optional isPy27 ./clang.patch; + outputs = [ "out" "dev" ]; propagatedBuildInputs = [ libffi pycparser ]; buildInputs = [ pytest ]; # The tests use -Werror but with python3.6 clang detects some unreachable code. - NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unreachable-code"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ]; checkPhase = '' py.test |