nixpkgs/pkgs/development/libraries/py3c/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
847 B
Nix
Raw Normal View History

2021-04-29 15:49:33 +00:00
{ lib, stdenv, fetchFromGitHub, python2, python3 }:
stdenv.mkDerivation rec {
pname = "py3c";
2021-11-03 22:33:04 +00:00
version = "1.4";
2021-04-29 15:49:33 +00:00
src = fetchFromGitHub {
owner = "encukou";
repo = pname;
rev = "v${version}";
2021-11-03 22:33:04 +00:00
sha256 = "sha256-v8+0J56sZVbGdBlOotObUa10/zFMTvfXdMYRsKhyZaY=";
2021-04-29 15:49:33 +00:00
};
postPatch = ''
# clang and gcc-11 complain about 'register' keywords used by
# python-2.7. Let's avoid blanket -Werror.
2021-05-03 00:04:29 +00:00
substituteInPlace test/setup.py \
--replace "'-Werror', " ""
'';
2021-04-29 15:49:33 +00:00
makeFlags = [
"prefix=${placeholder "out"}"
];
doCheck = true;
checkInputs = [
python2
python3
];
meta = with lib; {
homepage = "https://github.com/encukou/py3c";
description = "Python 2/3 compatibility layer for C extensions";
license = licenses.mit;
2021-05-03 00:04:29 +00:00
maintainers = with maintainers; [ ajs124 dotlambda ];
2021-04-29 15:49:33 +00:00
};
}