Rebuild --upgrade is failing on dependency of etc

Hi,
My nix-rebuild --upgrade switch is Failing with the Following Error:

error: builder for '/nix/store/1r09nqg55gjpnfsdmw79nr1kdpp7ikc3-adafruit-nrfutil-0.5.3.post17.drv' failed with exit code 1
copying path '/nix/store/7q83znq247cfc65h3zzq6l82z8dr9d56-xwayland-23.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/5vg8f8mk816a2xwvwwwvfgczskdx1cv8-zlib-ng-2.1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/niz62plfmbw9p4cjrjcnjhvrclf3r69g-zstd-1.5.6' from 'https://cache.nixos.org'...
copying path '/nix/store/k154922jprs97n6rs2k0lppk9l32xqdz-zstd-1.5.6-man' from 'https://cache.nixos.org'...
copying path '/nix/store/2gndws2srqbaqwn7c72v4x6m9v72mbpa-zulu-ca-jdk-21.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/pr996x75xjam88pf59irxn26n11s218s-zulu-ca-jdk-8.0.402' from 'https://cache.nixos.org'...
copying path '/nix/store/d5a1n8z5zfd4v0wyz1kbxs7h5571c8a4-zxing-cpp-2.2.1' from 'https://cache.nixos.org'...
copying path '/nix/store/pl9ki0qia8lwc489wf4yg0kciyj0f1j8-zxing-cpp-2.2.1' from 'https://cache.nixos.org'...
error: 1 dependencies of derivation '/nix/store/9q5pc7n3lf71x7kd41ijxsaa6m12iakz-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/chqmpm66r7wvd3hqzr888xvm9m09fd7x-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/z540f3sg87bpqc8qizj9qbjqxl8l0qai-nixos-system-redacted-24.05pre625274.205781405197.drv' failed to build
View Test Log causing the failed build
wrapping `/nix/store/qn3lpcl9vkldmbjxkrxrjvkji6s6sibh-adafruit-nrfutil-0.5.3.post17/bin/adafruit-nrfutil'...
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
Running phase: installCheckPhase
no Makefile or custom installCheckPhase, doing nothing
Running phase: pythonCatchConflictsPhase
Running phase: pythonRemoveBinBytecodePhase
Running phase: pythonImportsCheckPhase
Executing pythonImportsCheckPhase
Check whether the following modules can be imported: nordicsemi
Running phase: pytestCheckPhase
Executing pytestCheckPhase
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-8.1.1, pluggy-1.4.0
rootdir: /build/source
collected 33 items                                                             

nordicsemi/bluetooth/hci/tests/test_codec.py .                           [  3%]
nordicsemi/dfu/tests/test_dfu_transport_serial.py ss                     [  9%]
nordicsemi/dfu/tests/test_init_packet.py ...                             [ 18%]
nordicsemi/dfu/tests/test_manifest.py ....                               [ 30%]
copying path '/nix/store/0c9wn8nb04qs9kyh2zhll4wzjmp0fmag-xorg-server-21.1.13' from 'https://cache.nixos.org'...
nordicsemi/dfu/tests/test_nrfhex.py .........                            [ 57%]
nordicsemi/dfu/tests/test_package.py .....                               [ 72%]
nordicsemi/dfu/tests/test_signing.py ....F..                             [ 93%]
nordicsemi/utility/tests/test_target_registry.py ..                      [100%]

=================================== FAILURES ===================================
_________________________ TestSinging.test_get_vk_pem __________________________

self = <nordicsemi.dfu.tests.test_signing.TestSinging testMethod=test_get_vk_pem>

    def test_get_vk_pem(self):
        key_file_name = 'key.pem'
        expected_vk_pem = "-----BEGIN PUBLIC KEY-----\n" \
                          "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZY2i7duYH2l9rnIg1oIXq+0/uHAF\n" \
                          "7IoFubVru6oX9GCQm67NrXImwgS2ErZi/0/MvRsMkIQQkNg6Wc2tbJgdTA==\n" \
                          "-----END PUBLIC KEY-----\n"
    
        signing = Signing()
        signing.load_key(key_file_name)
    
        vk_pem = signing.get_vk_pem().decode("ascii")
    
>       self.assertEqual(expected_vk_pem, vk_pem)
E       AssertionError: '----[83 chars]/uHAF\n7IoFubVru6oX9GCQm67NrXImwgS2ErZi/0/MvRs[45 chars]--\n' != '----[83 chars]/uHAF7IoFubVru6oX\n9GCQm67NrXImwgS2ErZi/0/MvRs[45 chars]--\n'
E         -----BEGIN PUBLIC KEY-----
E       - MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZY2i7duYH2l9rnIg1oIXq+0/uHAF
E       + MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZY2i7duYH2l9rnIg1oIXq+0/uHAF7IoFubVru6oX
E       ?                                                                 ++++++++++++
E       - 7IoFubVru6oX9GCQm67NrXImwgS2ErZi/0/MvRsMkIQQkNg6Wc2tbJgdTA==
E       ? ------------
E       + 9GCQm67NrXImwgS2ErZi/0/MvRsMkIQQkNg6Wc2tbJgdTA==
E         -----END PUBLIC KEY-----

/build/source/nordicsemi/dfu/tests/test_signing.py:155: AssertionError
=============================== warnings summary ===============================
nordicsemi/utility/target_registry.py:66
  /build/source/nordicsemi/utility/target_registry.py:66: DeprecationWarning: invalid escape sequence '\d'
    match = re.match("NORDICSEMI_TARGET_(?P<target>\d+)_(?P<key>[a-zA-Z_]+)", key)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED nordicsemi/dfu/tests/test_signing.py::TestSinging::test_get_vk_pem - AssertionError: '----[83 chars]/uHAF\n7IoFubVru6oX9GCQm67NrXImwgS2ErZi/0/Mv...
============== 1 failed, 30 passed, 2 skipped, 1 warning in 0.51s ==============
/nix/store/wq046wv3s3h4m2n9ak3j534di2pzra93-stdenv-linux/setup: line 1579: pop_var_context: head of shell_variables not a function context
Full configuration.nix
{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      <home-manager/nixos>
    ];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "redacted"; # Define your hostname.

  # Enable networking
  networking.networkmanager.enable = true;

  # Set your time zone.
  time.timeZone = "Europe/Berlin";

  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";

  i18n.extraLocaleSettings = {
    LC_ADDRESS = "de_DE.UTF-8";
    LC_IDENTIFICATION = "de_DE.UTF-8";
    LC_MEASUREMENT = "de_DE.UTF-8";
    LC_MONETARY = "de_DE.UTF-8";
    LC_NAME = "de_DE.UTF-8";
    LC_NUMERIC = "de_DE.UTF-8";
    LC_PAPER = "de_DE.UTF-8";
    LC_TELEPHONE = "de_DE.UTF-8";
    LC_TIME = "de_DE.UTF-8";
  };

  # Nvidia Configuration
  hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
  hardware.bluetooth.enable = true;
  hardware.bluetooth.powerOnBoot = true;

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  services.xserver.videoDrivers = [ "nvidia" ];

  # Enable the KDE Plasma Desktop Environment.
  services.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "us,dv2,de";
    variant = "esc:swapcaps";
    extraLayouts.dv2 = {
      description = "German Dvorak Type 2";
      languages = [ "de" ];
      symbolsFile = /etc/nixos/symbols/dv2;
    };
  };

  # Configure console keymap
  console.keyMap = "de";

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };

  services.onlyoffice = {
    enable = true;
  };

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.redacted = {
    isNormalUser = true;
    description = "redacted";
    extraGroups = [ "networkmanager" "wheel" ];
    packages = with pkgs; [
      firefox
      kate
      thunderbird
      gnome.cheese
      obs-studio
      blender
      syncthing
      keepassxc
      freetube
      libreoffice
      adafruit-nrfutil
      prismlauncher
      gimp
      inkscape
      veracrypt
      matrix-commander
      vlc
      protonvpn-gui
      telegram-desktop
      logseq
      signal-desktop
    ];
  };
  
  # Define Service Users
  users.groups.languagetool = {};
  users.users.languagetool = {
    isSystemUser = true;
    group = "languagetool";
  };

  # Enable automatic login for the user.
  services.displayManager.autoLogin.enable = true;
  services.displayManager.autoLogin.user = "redacted";

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

  programs.steam = {
    enable = true;
    remotePlay.openFirewall = true;
  };
  
  programs.firefox.nativeMessagingHosts.packages = with pkgs; [ firefoxpwa ];

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
    vim 
    wget
    usbutils
    fprintd
    nss
    mesa
    python3
    zulu
    zulu8
    languagetool
    btop
    firefoxpwa
    bookworm
    foliate
    gparted
    kid3
    calibre
    spotify-player
  ];

  # List services that you want to enable:
  systemd.services.languagetool = {
    description = "LanguageTool HTTP Server for local Spellchecking";
    wants = [ "network.target" ];
    wantedBy = [ "multi-user.target" ];
    serviceConfig = {
      ExecStart = "/run/current-system/sw/bin/languagetool-http-server --port 8081 --allow-origin '*'";
      WorkingDirectory = "~"; # Defaults to "/" If the user has no home
      User = "languagetool";
      Restart = "always";
      RestartSec = 30;
    };
  };

  # Virtualisation
  virtualisation.podman = {
    enable = true;
    dockerCompat = true;
    dockerSocket.enable = true;
  };

  system.stateVersion = "23.05"; # Did you read the comment?

}

Thanks for any Help!

What channel are you on? Can you also include the results of nix-shell -p nix-info --run "nix-info -m"?

nix-shell -p nix-info --run "nix-info -m" shows:

  • system: "x86_64-linux"
  • host os: Linux 6.6.28, NixOS, 24.05 (Uakari), 24.05pre617818.58a1abdbae32
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.18.2
  • channels(root): "home-manager, nixos"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

And I am on unstable.

Oh, wow. I re-run the same nixos-rebuild command today (with no changes), And the Build run flawlessly. Maybe I had a Flipped Bit in the Sources of the adafruit-nrfutil.
Thank you for helping!

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.