Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 39 lines 861 B view raw
1{ lib, stdenv, fetchFromGitHub, python311 }: 2 3stdenv.mkDerivation rec { 4 pname = "py3c"; 5 version = "1.4"; 6 7 src = fetchFromGitHub { 8 owner = "encukou"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-v8+0J56sZVbGdBlOotObUa10/zFMTvfXdMYRsKhyZaY="; 12 }; 13 14 postPatch = '' 15 # clang and gcc-11 complain about 'register' keywords used by 16 # python-2.7. Let's avoid blanket -Werror. 17 substituteInPlace test/setup.py \ 18 --replace "'-Werror', " "" 19 ''; 20 21 makeFlags = [ 22 "prefix=${placeholder "out"}" 23 ]; 24 25 doCheck = true; 26 27 nativeCheckInputs = [ 28 python311 29 ]; 30 31 checkTarget = "test-python"; 32 33 meta = with lib; { 34 homepage = "https://github.com/encukou/py3c"; 35 description = "Python 2/3 compatibility layer for C extensions"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ dotlambda ]; 38 }; 39}