Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
71 lines
1.2 KiB
Nix
71 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
isPyPy,
|
|
pythonAtLeast,
|
|
|
|
setuptools,
|
|
|
|
cmake,
|
|
ninja,
|
|
|
|
llvm_20,
|
|
libxml2,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
|
|
withStaticLLVM ? true,
|
|
}:
|
|
|
|
let
|
|
llvm = llvm_20;
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
pname = "llvmlite";
|
|
version = "0.45.0";
|
|
pyproject = true;
|
|
|
|
disabled = isPyPy || pythonAtLeast "3.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "numba";
|
|
repo = "llvmlite";
|
|
tag = "v${version}";
|
|
hash = "sha256-xONYpDGsx6lhbAjAqwFx5Vo3PxeFsblhZxkxTSjMWOE=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ninja
|
|
];
|
|
|
|
buildInputs = [ llvm ] ++ lib.optionals withStaticLLVM [ libxml2.dev ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/255262
|
|
preCheck = ''
|
|
cd $out
|
|
'';
|
|
|
|
env.LLVMLITE_SHARED = !withStaticLLVM;
|
|
|
|
passthru = lib.optionalAttrs (!withStaticLLVM) { inherit llvm; };
|
|
|
|
meta = {
|
|
changelog = "https://github.com/numba/llvmlite/blob/v${version}/CHANGE_LOG";
|
|
description = "Lightweight LLVM python binding for writing JIT compilers";
|
|
downloadPage = "https://github.com/numba/llvmlite";
|
|
homepage = "http://llvmlite.pydata.org/";
|
|
license = lib.licenses.bsd2;
|
|
};
|
|
}
|