Nix Flake on Ubuntu - Python Installs

Hi All,

I am very new to Nix and am having alot of trouble getting it to work especially with this artiq nix flake template. Artiq-controls some hardware but seems unable to install spyder correctly and requires the nix package manager to successfully install. Specifically I am trying to get spyder to install and find a console.

The nix flake is below. I have added the repository for spyder from github but am not sure what I am doing right/wrong. Any help would be appreciated. I am running nix-shell in the directory containing the following flake.nix .

{
  inputs.extrapkg.url = "git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git";
  inputs.spyder = { url = github:spyder-ide; flake = false; };
  
  outputs = { self, extrapkg, spyder}:
    let
      pkgs = extrapkg.pkgs;
      artiq = extrapkg.packages.x86_64-linux;
      
    in {
    
    	spyder = spyder.defaultPackage ;

      defaultPackage.x86_64-linux = pkgs.buildEnv {
        name = "artiq-env";
        paths = [
          # ========================================
          # EDIT BELOW
          # ========================================
          (pkgs.python3.withPackages(ps: [
            # List desired Python packages here.
            artiq.artiq
            #ps.paramiko  # needed if and only if flashing boards remotely (artiq_flash -H)
            artiq.flake8-artiq
            artiq.dax
            artiq.dax-applets

            # The NixOS package collection contains many other packages that you may find
            # interesting. Here are some examples:
            ps.pandas
            ps.numpy
            ps.scipy
            #ps.numba
            ps.matplotlib
            ps.jupyterlab
            # or if you need Qt (will recompile):
            #(ps.matplotlib.override { enableQt = true; })
            #ps.bokeh
            #ps.cirq
            #ps.qiskit
          ]))
          
          #artiq.korad_ka3005p
          #artiq.novatech409b
          # List desired non-Python packages here
          artiq.openocd-bscanspi  # needed if and only if flashing boards
          # Other potentially interesting non-Python packages from the NixOS package collection:
          #pkgs.gtkwave
          #pkgs.spyder
          #pkgs.R
          #pkgs.julia
          # ========================================
          # EDIT ABOVE
          # ========================================
        ];
      };
    };
  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";
  };
}