mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
40 lines
864 B
Nix
40 lines
864 B
Nix
{ 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 ];
|
|
};
|
|
}
|