nix-scripts/artiq-fast/pkgs/llvmlite-llvm11.nix

27 lines
895 B
Nix
Raw Normal View History

2021-09-12 18:17:47 +08:00
{ python3Packages, llvm_11 }:
python3Packages.buildPythonPackage rec {
pname = "llvmlite";
version = "0.37.0-artiq";
2021-09-12 18:17:47 +08:00
src = python3Packages.fetchPypi {
inherit pname;
version = "0.37.0";
sha256 = "sha256-Y5K4cM0BjsDGRda7uRjWqg7sqMYmdLqu4whi1raGWxU=";
2021-09-12 18:17:47 +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
}