mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 09:10:08 +00:00
Diff: https://github.com/lxml/lxml/compare/lxml-6.1.1...lxml-6.1.3-1 Changelog: https://github.com/lxml/lxml/blob/lxml-6.1.3-1/CHANGES.txt
73 lines
1.4 KiB
Nix
73 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
cython,
|
|
setuptools,
|
|
pkg-config,
|
|
|
|
# native dependencies
|
|
libxml2,
|
|
libxslt,
|
|
zlib,
|
|
xcodebuild,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "lxml";
|
|
version = "6.1.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lxml";
|
|
repo = "lxml";
|
|
tag = "lxml-${finalAttrs.version}-1";
|
|
hash = "sha256-n+MBUmoky6VTjU7H6+Gp0mxPeZIwK7uB6/RUOjvq0SU=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "Cython>=3.2.9,<3.3" "Cython>=3.2.9"
|
|
'';
|
|
|
|
build-system = [
|
|
cython
|
|
setuptools
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ];
|
|
|
|
# required for build time dependency check
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libxml2
|
|
libxslt
|
|
zlib
|
|
];
|
|
|
|
env = lib.optionalAttrs stdenv.cc.isClang {
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
|
|
};
|
|
|
|
# tests are meant to be ran "in-place" in the same directory as src
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"lxml"
|
|
"lxml.etree"
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/lxml/lxml/blob/${finalAttrs.src.tag}/CHANGES.txt";
|
|
description = "Pythonic binding for the libxml2 and libxslt libraries";
|
|
homepage = "https://lxml.de";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
})
|