joost
The issue arises because artiq uses a slightly modified version of llvmlite, which conflicts with the standard llvmlite required by numba. If numba isn't necessary for your work, the simplest solution is to remove it, as sb10q suggested.
If you still need numba, a workaround is to override its dependency on llvmlite with the modified version from the ARTIQ flake (should be same release version):
diff --git a/flake.nix b/flake.nix
index ad4b828..1f87faf 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,29 @@
let
pkgs = extrapkg.pkgs;
artiq = extrapkg.packages.x86_64-linux;
+
+ llvmlite-new = pkgs.python3Packages.buildPythonPackage rec {
+ pname = "llvmlite";
+ version = "0.43.0";
+ src = pkgs.fetchFromGitHub {
+ owner = "numba";
+ repo = "llvmlite";
+ rev = "v${version}";
+ sha256 = "sha256-5QBSRDb28Bui9IOhGofj+c7Rk7J5fNv5nPksEPY/O5o=";
+ };
+ nativeBuildInputs = [ pkgs.llvm_15 ];
+ # 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=${pkgs.llvm_15.dev}/bin/llvm-config
+ '';
+ };
+
in {
# This section defines the new environment
packages.x86_64-linux.default = pkgs.buildEnv {
@@ -23,7 +46,7 @@
# The NixOS package collection contains many other packages that you may find
# interesting. Here are some examples:
#ps.pandas
- #ps.numba
+ (ps.numba.override {llvmlite = llvmlite-new;})
#ps.matplotlib
# or if you need Qt (will recompile):
#(ps.matplotlib.override { enableQt = true; })