2021-09-12 18:17:47 +08:00
|
|
|
{ python3Packages, llvm_11 }:
|
|
|
|
|
|
|
|
python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "llvmlite";
|
2021-11-08 12:40:03 +08:00
|
|
|
version = "0.37.0-artiq";
|
2021-09-12 18:17:47 +08:00
|
|
|
src = python3Packages.fetchPypi {
|
2021-11-08 12:40:03 +08:00
|
|
|
inherit pname;
|
|
|
|
version = "0.37.0";
|
|
|
|
sha256 = "sha256-Y5K4cM0BjsDGRda7uRjWqg7sqMYmdLqu4whi1raGWxU=";
|
2021-09-12 18:17:47 +08:00
|
|
|
};
|
2021-11-08 12:40:03 +08:00
|
|
|
# https://github.com/numba/llvmlite/pull/702
|
|
|
|
# https://github.com/numba/llvmlite/pull/775
|
|
|
|
patches = [ ./llvmlite-callsite.diff ./llvmlite-abiname.diff ];
|
2021-09-12 18:17:47 +08:00
|
|
|
nativeBuildInputs = [ llvm_11 ];
|
|
|
|
# Disable static linking
|
|
|
|
# https://github.com/numba/llvmlite/issues/93
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ffi/Makefile.linux --replace "-static-libstdc++" ""
|
|
|
|
substituteInPlace llvmlite/tests/test_binding.py --replace "test_linux" "nope"
|
|
|
|
'';
|
|
|
|
# Set directory containing llvm-config binary
|
|
|
|
preConfigure = ''
|
|
|
|
export LLVM_CONFIG=${llvm_11.dev}/bin/llvm-config
|
|
|
|
'';
|
|
|
|
doCheck = false; # FIXME
|
|
|
|
}
|