Files
nixpkgs/pkgs/by-name/py/py3c/package.nix
quantenzitrone 6b61249106 various: switch to finalAttrs pattern
this shouldn't create any rebuilds
2026-01-30 02:36:22 +01:00

46 lines
913 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "py3c";
version = "1.4";
src = fetchFromGitHub {
owner = "encukou";
repo = "py3c";
rev = "v${finalAttrs.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
python3.pkgs.distutils
];
checkTarget = "test-python";
meta = {
homepage = "https://github.com/encukou/py3c";
description = "Python 2/3 compatibility layer for C extensions";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
})