diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/py3c')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/py3c/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/py3c/default.nix b/nixpkgs/pkgs/development/libraries/py3c/default.nix new file mode 100644 index 000000000000..f4d2aa95a2e8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/py3c/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, python3 }: + +stdenv.mkDerivation rec { + pname = "py3c"; + version = "1.4"; + + src = fetchFromGitHub { + owner = "encukou"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-v8+0J56sZVbGdBlOotObUa10/zFMTvfXdMYRsKhyZaY="; + }; + + postPatch = '' + # clang and gcc-11 complain about 'register' keywords used by + # python-2.7. Let's avoid blanket -Werror. + substituteInPlace test/setup.py \ + --replace "'-Werror', " "" + ''; + + makeFlags = [ + "prefix=${placeholder "out"}" + ]; + + doCheck = true; + + nativeCheckInputs = [ + python3 + ]; + + checkTarget = "test-python"; + + meta = with lib; { + homepage = "https://github.com/encukou/py3c"; + description = "Python 2/3 compatibility layer for C extensions"; + license = licenses.mit; + maintainers = with maintainers; [ ajs124 dotlambda ]; + }; +} |