Updated flake, then tried to switch but doesn't work anymore

I’m probably doing something stupid wrong, but I updated my flake and then tried to update and since then i’ve been stuck.

sudo nixos-rebuild switch --flake .#mySystem --upgrade --show-trace
building the system configuration...
error: builder for '/nix/store/2qfkvyq0ccnbw4bb91q83rx9pcd96ad1-quirc-1.2.drv' failed with exit code 1;
       last 10 log lines:
       > install   -m 0644 libquirc.a /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib
       > install   -m 0755 libquirc.so.1.2 \
       >         /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib
       > cp -d libquirc.so /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib
       > install   -m 0755 quirc-demo /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/bin
       > # install   -m 0755 quirc-demo-opencv /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/bin
       > install   -m 0755 quirc-scanner /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/bin
       > evaling implicit 'postInstall' string hook
       > ln: failed to create symbolic link '/nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib/libquirc.so': File exists
       > /nix/store/5r0df66ikad3xw06azlqvswcvncll8wa-stdenv-linux/setup: line 193: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/2qfkvyq0ccnbw4bb91q83rx9pcd96ad1-quirc-1.2.drv'.
error: 1 dependencies of derivation '/nix/store/3ryzpvd7hs1bw99wmkq19wrhg6yg17k3-ffmpeg-full-7.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7vdxgiyfg2iz0vq83117dfz797fyh534-handbrake-1.8.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4vxivs2g4hh3dy89xmjnx9abbwmm94dk-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2c3hds9jsq20hj81y5mq6qyppdp04mg1-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/84f7vkc9xfpw6zx45n3gkzrqk1aipdz5-nixos-system-Framework-THIB-24.11.20240721.68c9ed8.drv' failed to build

-vv:

sudo nixos-rebuild switch --flake .#mySystem --upgrade -vv
$ nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixos-rebuild.QEH5fn/nixos-rebuild .#nixosConfigurations."mySystem".config.system.build.nixos-rebuild -vv
evaluating derivation 'git+file:///home/thibaultmol/nix/Nixos-personal#nixosConfigurations."mySystem".config.system.build.nixos-rebuild'...
using revision b5de5ecefa94f8abc0354d1da983a21e6bd5dc75 of repo '/home/thibaultmol/nix/Nixos-personal'
evaluating file '/nix/store/rzddvc7z4mxvdcngyhpa08lf86jb35hp-source/flake.nix'
$ exec /nix/store/lrr944y6fvymd0h836xvy5bs0lbs1290-nixos-rebuild/bin/nixos-rebuild switch --flake .#mySystem --upgrade -vv
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."mySystem".config.system.build.toplevel -vv --out-link /tmp/nixos-rebuild.JCPZBs/result
evaluating derivation 'git+file:///home/thibaultmol/nix/Nixos-personal#nixosConfigurations."mySystem".config.system.build.toplevel'...
using revision b5de5ecefa94f8abc0354d1da983a21e6bd5dc75 of repo '/home/thibaultmol/nix/Nixos-personal'
evaluating file '/nix/store/rzddvc7z4mxvdcngyhpa08lf86jb35hp-source/flake.nix'
these 19 derivations will be built:
  /nix/store/1i49kcy9ds8fjir3l7ka8x8ivx17j16m-system-path.drv
  /nix/store/9a8h7qax43fvkvsz9sqvlw69gj746zyd-unit-accounts-daemon.service.drv
  /nix/store/33642r27hm99yr4va176nhh6sgw8377q-X-Restart-Triggers-polkit.drv
  /nix/store/ga7ng2y7nj5wkn1gkpp0r3b896g9i3jh-unit-polkit.service.drv
  /nix/store/knjdaj05lj0zr3s4lj32npyyv9kyp6gs-dbus-1.drv
  /nix/store/c94w2rf3g2p33z4q7q9sd2pfkd0rlsaz-X-Restart-Triggers-dbus.drv
  /nix/store/iapq2b8c5lh3v8d2r84qm441qy4mi7vn-unit-dbus.service.drv
  /nix/store/7d71ysmk5m84y1w3j61s39vnv7872gai-X-Restart-Triggers-systemd-tmpfiles-resetup.drv
  /nix/store/n780yxzlcrp46xvlv7d6l1kr4h99q0iq-unit-systemd-tmpfiles-resetup.service.drv
  /nix/store/30v89bj2910d9prw4iqnd0b6sfq24a4y-system-units.drv
  /nix/store/2qfkvyq0ccnbw4bb91q83rx9pcd96ad1-quirc-1.2.drv
  /nix/store/3ryzpvd7hs1bw99wmkq19wrhg6yg17k3-ffmpeg-full-7.0.drv
  /nix/store/7vdxgiyfg2iz0vq83117dfz797fyh534-handbrake-1.8.0.drv
  /nix/store/ry839sc6aza6h82sw8wfvp1iyrkkgq6m-google-chrome-126.0.6478.182.drv
  /nix/store/4vxivs2g4hh3dy89xmjnx9abbwmm94dk-user-environment.drv
  /nix/store/rfzn4aazbvx9aw77yl99mip2hnjp7njg-unit-dbus.service.drv
  /nix/store/8wvif5n6wkdygajfa7rx48c2ik8qia6x-user-units.drv
  /nix/store/2c3hds9jsq20hj81y5mq6qyppdp04mg1-etc.drv
  /nix/store/84f7vkc9xfpw6zx45n3gkzrqk1aipdz5-nixos-system-Framework-THIB-24.11.20240721.68c9ed8.drv
building '/nix/store/1i49kcy9ds8fjir3l7ka8x8ivx17j16m-system-path.drv'...
building '/nix/store/7d71ysmk5m84y1w3j61s39vnv7872gai-X-Restart-Triggers-systemd-tmpfiles-resetup.drv'...
building '/nix/store/ry839sc6aza6h82sw8wfvp1iyrkkgq6m-google-chrome-126.0.6478.182.drv'...
building '/nix/store/2qfkvyq0ccnbw4bb91q83rx9pcd96ad1-quirc-1.2.drv'...
building '/nix/store/n780yxzlcrp46xvlv7d6l1kr4h99q0iq-unit-systemd-tmpfiles-resetup.service.drv'...
error: builder for '/nix/store/2qfkvyq0ccnbw4bb91q83rx9pcd96ad1-quirc-1.2.drv' failed with exit code 1;
       last 10 log lines:
       > install   -m 0644 libquirc.a /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib
       > install   -m 0755 libquirc.so.1.2 \
       >         /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib
       > cp -d libquirc.so /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib
       > install   -m 0755 quirc-demo /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/bin
       > # install   -m 0755 quirc-demo-opencv /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/bin
       > install   -m 0755 quirc-scanner /nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/bin
       > evaling implicit 'postInstall' string hook
       > ln: failed to create symbolic link '/nix/store/igc14rpxdci0pjw4yw7x2amx4qxwia6k-quirc-1.2/lib/libquirc.so': File exists
       > /nix/store/5r0df66ikad3xw06azlqvswcvncll8wa-stdenv-linux/setup: line 193: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/2qfkvyq0ccnbw4bb91q83rx9pcd96ad1-quirc-1.2.drv'.
error: 1 dependencies of derivation '/nix/store/3ryzpvd7hs1bw99wmkq19wrhg6yg17k3-ffmpeg-full-7.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7vdxgiyfg2iz0vq83117dfz797fyh534-handbrake-1.8.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4vxivs2g4hh3dy89xmjnx9abbwmm94dk-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2c3hds9jsq20hj81y5mq6qyppdp04mg1-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/84f7vkc9xfpw6zx45n3gkzrqk1aipdz5-nixos-system-Framework-THIB-24.11.20240721.68c9ed8.drv' failed to build
Flake.nix
{
  description = "My NixOS configuration with flakes";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixos-hardware.url = "github:NixOS/nixos-hardware/master";
    home-manager.url = "github:nix-community/home-manager/master";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = {
    self,
    nixpkgs,
    nixos-hardware,
    home-manager,
    ...
  } @ inputs: {
    nixosConfigurations.mySystem =
      nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          ./hardware-configuration.nix
          nixos-hardware.nixosModules.framework-13-7040-amd
          home-manager.nixosModules.home-manager
          ({
              pkgs,
              lib,
              ...
            }: {
              environment.systemPackages = with pkgs; [
                htop
                git
                wget
                cifs-utils
                stress
                glmark2
                dig
                mkvtoolnix
                vdhcoapp
                vesktop
                google-fonts
                steam-run # used to run non-nixos executables easily
                mesa # This shouldn't be needed, but fuck me can I not figure out how to get mesa working without this
              ];

              # Use the systemd-boot EFI boot loader.
              boot.loader.systemd-boot.enable = true;
              boot.loader.efi.canTouchEfiVariables = true;

              boot.supportedFilesystems = ["ntfs"];

              # Custom initrd commands for Btrfs subvolume management
              boot.initrd.postDeviceCommands = lib.mkAfter ''
                mkdir /mnt
                mount -t btrfs /dev/mapper/enc /mnt
                btrfs subvolume delete /mnt/root
                btrfs subvolume snapshot /mnt/root-blank /mnt/root
              '';

              # Enable experimental features
              nix.settings.experimental-features = ["nix-command" "flakes"];

              # System-wide package and security settings
              nixpkgs.config.allowUnfree = true;
              nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0"];

              # Networking, time zone, locale, and desktop environment configuration
              networking.hostName = "Framework-THIB";
              networking.networkmanager.enable = true;
              networking.firewall.enable = true;
              networking.firewall.allowedTCPPorts = [
                5188 # http temp
                60096 # qbittorent
                22000 # syncthing
                5000 # Geovisio api
                3000 # Geovisio web
              ];
              networking.firewall.allowedUDPPorts = [
                60096 # qbittorent
                22000 # syncthing
                5000 # Geovisio api
                3000 # Geovisio web
              ];
              networking.firewall.allowedTCPPortRanges = [
                {
                  from = 1;
                  to = 1;
                }
              ];
              networking.firewall.allowedUDPPortRanges = [
                {
                  from = 1;
                  to = 1;
                }
              ];

              time.timeZone = "Europe/Brussels";
              i18n.defaultLocale = "en_GB.UTF-8";

              environment.variables.LANG = "en_GB.UTF-8";
              environment.variables.LC_TIME = "en_GB.UTF-8";

              console.font = "Lat2-Terminus16";
              console.keyMap = lib.mkForce "be-latin1";
              console.useXkbConfig = true;
              services.xserver.enable = true;
              services.displayManager.sddm.enable = true;
              services.displayManager.sddm.autoNumlock = true;
              services.displayManager.sddm.wayland.enable = true;
              services.desktopManager.plasma6.enable = true;

              xdg.portal = {
                enable = true;
                extraPortals = [pkgs.xdg-desktop-portal-kde pkgs.xdg-desktop-portal-wlr];
              };

              virtualisation.waydroid.enable = true;

              services.tailscale.enable = true;

              services.fwupd.enable = true;
              services.fwupd.daemonSettings = {
                OnlyTrusted = false;
              };

              services.avahi.enable = true; # auto discovere of network drives for ex

              virtualisation.docker.enable = true;
              virtualisation.docker.enableOnBoot = true;

              services.syncthing = {
                enable = true;
                user = "thibaultmol";
                group = "users";
              };

              # User configuration
              users.users.thibaultmol = {
                isNormalUser = true;
                extraGroups = ["wheel"];
                password = "REDACTED";
                packages = with pkgs; [
                  # Web Browsers and Privacy Tools
                  firefox
                  google-chrome
                  ungoogled-chromium
                  tor-browser-bundle-bin

                  # Communication and Social Media
                  element-desktop
                  discord
                  signal-desktop
                  telegram-desktop
                  tuba # Mastodon client
                  # teams  Microsoft Teams, might need to use an overlay or Flathub
                  thunderbird
                  mumble

                  # Multimedia Players and Editors
                  vlc
                  mpv
                  jellyfin-media-player
                  audacity
                  gimp
                  krita
                  inkscape
                  hugin
                  obsidian
                  mkvtoolnix

                  # Text and Code Editors
                  kate # KDE text editor
                  gedit
                  vscodium

                  # Gaming and Emulation
                  lutris
                  steam
                  bottles
                  prismlauncher # Kinda cringe ngl
                  lunar-client
                  protonup-qt

                  detox # filename cleaner

                  # File Management and Sharing
                  nautilus
                  filezilla
                  deluge
                  qbittorrent
                  # peazip
                  zip

                  # System and Network Utilities
                  gparted
                  partition-manager # KDE Partition Manager
                  btop
                  gwenview
                  filelight
                  virtualbox
                  droidcam
                  scrcpy

                  # Torrents and Downloads
                  deluge
                  qbittorrent
                  yt-dlp

                  # Audio and Video Production
                  audacity
                  handbrake
                  obs-studio
                  qpwgraph

                  # Security and Passwords
                  bitwarden
                  protonvpn-gui

                  # Cleaning and Maintenance
                  bleachbit # Assuming inclusion for system cleaning
                  czkawka

                  # Image and Graphics
                  gimp
                  inkscape
                  krita
                  hugin
                  ffmpeg

                  # Office and Documentation
                  libreoffice-fresh
                  onlyoffice-bin
                  obsidian

                  # Miscellaneous Tools
                  meld
                  galaxy-buds-client
                  alejandra
                  bcompare
                  trayscale
                  kooha
                  spectacle
                  remmina
                  cinnamon.warpinator
                  killall
                  ghostscript
                  pdftk
                  easyeffects
                  google-cloud-sdk
                  libsForQt5.kcalc
                  libsForQt5.kget
                  krename
                  libsForQt5.kfind
                  libsForQt5.kompare
                  libsForQt5.skanlite
                  libsForQt5.skanpage

                  # THESE WILL HAVE TO BE CHANGED kdePackages. ONCE QT6 DROPS
                  # kdePackages.kjournald wasn't shipped with qt5 yet so add this once switchen to qt6
                  libsForQt5.kamoso
                  libsForQt5.krdc
                  croc # file transfer cli tool
                  localsend
                  josm
                  docker-compose
                  aria
                  wireguard-tools
                  nomachine-client
                  exiftool
                  zint # qr code creator
                  calibre
                  anydesk
                  unzip
                ];
              };

              # Services
              services.printing.enable = true;
              hardware.bluetooth.enable = true;
              # somehow this fixes a bluetooth problem: https://github.com/bluez/bluez/issues/745#issuecomment-2160670429
              hardware.bluetooth.settings = {
                General = {
                  JustWorksRepairing = "always";
                };
              };
              # sound.enable = true;  #disabled because I've switched to pipewire
              services.libinput.enable = true;
              services.flatpak.enable = true;

              # Audio
              security.rtkit.enable = true;
              services.pipewire = {
                enable = true;
                alsa.enable = true;
                alsa.support32Bit = true;
                pulse.enable = true;
                wireplumber.enable = true;
                # Additional configurations for Pipewire...
              };

              hardware.pulseaudio.extraConfig = "
load-module module-switch-on-connect
";

              # Set the system state version
              system.stateVersion = "23.11";
            })
        ];
      };
  };
}

It has been updated 5 days ago (nixpkgs/pkgs/tools/graphics/quirc/default.nix at 68c9ed8bbed9dfce253cc91560bf9043297ef2fe · NixOS/nixpkgs · GitHub), maybe you should ask in the relevant PR at : quirc: Use dylib with absolute install name on Darwin by toonn · Pull Request #328420 · NixOS/nixpkgs · GitHub

Looking in that PR, I see this: quirc: Fix FTBFS on Linux by OPNA2608 · Pull Request #328915 · NixOS/nixpkgs · GitHub

Maybe this is going to fix your issue?

I had only searched the forum for quirc and not the github actually.
Interesting.

maybe I don’t know how the release schedules work, but if I update my flake today then this should already contain that change, right? because I tried and it’s still showing the same problem

You can check https://nixpk.gs/pr-tracker.html?pr=328915 to see if the PR has actually landed in your branch yet or not.

Btw, --upgrade does nothing with flakes, you need to be using nix flake update first.

Thanks for the link
And yeah, I am running nix flake update before I run the switch command. But didn’t realize that i don’t need upgrade anymore, thx!