Hi I currently have Ubuntu 24.04 and Nix 2.23.2 and am working on setting up ARTIQ. I'm on the step where I install ARTIQ with my desired python packages. From my root, I create a new directory, add a file named flake.nix and add the same file content from the documentation.

When I run, $ nix shell, I get the following error: 'getting status of '/nix/store/5svr5sqj3a0c3vpd4gwrzlcrsd2szacg-source/git+https:/git.m-labs.hk/M-labs/artiq-extrapkgs.git': No such file or directory

I couldn't find a preevious post detailing this problem, any help is appreciated.

    Hi RyanEverly,

    Could you please run this command and share the results?

    nix shell -L --show-trace

    Please provide the last 20-30 lines of output, including the error message. Also, if you could share the input definitions part from your flake.nix file, that would be really helpful.

    I was able to fix the initial problem. I had a typo in my input which is now: "git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git?ref=release-8"

    Still when I run 'nix shell' or in this case 'nix shell -L --show-trace' I get the following error

    warning: ignoring untrusted substituter 'https://nixbld.m-labs.hk', you are not a trusted user.
    Run `man nix.conf` for more information on the `substituters` configuration option.
    warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
    error: executing 'git': No such file or directory
    warning: could not update mtime for file '/home/brown-lab/.cache/nix/gitv3/0d7hm9z1bs2rs9fp6b9xrknd35mmlaysghxnsd54c1gcgbiwam5f/refs/heads/release-8': No such file or directory
    error:
           … while updating the lock file of flake 'path:/home/brown-lab/artiq?lastModified=1721138715&narHash=sha256-hj//9VZ/9Py1SRDpxyjG6ridCsViHd4s0NqF5bG16S8%3D'
    
           … while updating the flake input 'extrapkg'
    
           … while fetching the input 'git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git?ref=release-8'
    
           error: resolving Git reference 'release-8': revspec 'release-8' not found

    I understand that the first 2 warnings are common and I followed the steps in the documentation on editing the nix.conf file but the warnings persist.

    The error indicates that git may not be installed in your Nix environment. To install it, use the following commands:
    without flakes:

    nix-env -iA nixpkgs.git

    or with flakes:

    nix profile install nixpkgs#git

    For the warnings, maybe you can try deleting the file ~/.local/share/nix/trusted-settings.json. When you invoke nix-shell, answer y to all prompts.

    Reference: https://m-labs.hk/artiq/manual/installing.html#do-you-want-to-allow-configuration-setting-y-n

    5 months later

    Hi, I'm working on this again and am running into a python collision problem. When I run 'nix shell' I get the following error:

    error: builder for '/nix/store/5s29nfc52j8m73c72cg167q0bgzy9l2m-python3-3.12.7-env.drv' failed with exit code 25;
    last 1 log lines:
    > error: collision between '/nix/store/ssp86vqlbi9c5dsa7ssc801qj33g7w9x-python3.12-llvmlite-0.43.0/lib/python3.12/site-packages/llvmlite-0.43.0.dist-info/RECORD' and '/nix/store/c2q88sp7mjrnkm7br5z85haj6r8jp4p8-python3.12-llvmlite-0.43.0/lib/python3.12/site-packages/llvmlite-0.43.0.dist-info/RECORD'
    For full logs, run 'nix-store -l /nix/store/5s29nfc52j8m73c72cg167q0bgzy9l2m-python3-3.12.7-env.drv'.
    error: 1 dependencies of derivation '/nix/store/lnbrna1l2wd96grcippgykd70ywaxywr-artiq-env.drv' failed to build

    When I get the full logs I get the following message:
    error: collision between '/nix/store/ssp86vqlbi9c5dsa7ssc801qj33g7w9x-python3.12-llvmlite-0.43.0/lib/python3.12/site-packages/llvmlite-0.43.0.dist-info/RECORD' and '/nix/store/c2q88sp7mjrnkm7br5z85haj6r8jp4p8-python3.12-llvmlite-0.43.0/lib/python3.12/site-packages/llvmlite-0.43.0.dist-info/RECORD'

      5 days later

      fsagbuya Maybe you have a previous python env installed via nix profile

      Nix profile interacts with nix shell? I don't think so.

      @RyanEverly please post the flake.nix and flake.lock that you are using.

        19 days later
        • Edited

        sb10q I get the same conflict from the llvmlite package when runnig nix shell:

               last 1 log lines:
               > error: collision between /nix/store/jywfzmaw6jf3jq9drpxldwfz2iinrk4d-python3.12-llvmlite-0.43.0/lib/python3.12/
        site-packages/llvmlite-0.43.0.dist-info/RECORD and /nix/store/01ib2w4sx0zqrkawqr73gnl3dnkcxxfq-python3.12-
        llvmlite-0.43.0/lib/python3.12/site-packages/llvmlite-0.43.0.dist-info/RECORD

        I am using the flake.nix example from the manual and it seems to me that the conflict resulting from artiq.artiq and ps.numba. My flake.nix looks like this:

          inputs.extrapkg.url = "git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git?ref=release-8";
          outputs = { self, extrapkg }:
            let
              pkgs = extrapkg.pkgs;
              artiq = extrapkg.packages.x86_64-linux;
            in {
              defaultPackage.x86_64-linux = pkgs.buildEnv {
                name = "artiq-env";
                paths = [
                  (pkgs.python3.withPackages(ps: [
                    artiq.artiq
                    ps.numba
                  ]))
                ];
              };
            };
          nixConfig = {  # work around https://github.com/NixOS/nix/issues/6771
            extra-trusted-public-keys = "nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc=";
            extra-substituters = "https://nixbld.m-labs.hk";
          };
        }

        As soon as i remove ps.numba or artiq.artiq nix shell works fine.

        Do you actually need numba? If not just remove it.

          Not urgently. But would be interested on how to handle this problems.

            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; })