Skip to content

Build failure for niri-stable (25.08) on NixOS 25.05 #1515

@farahfinn

Description

@farahfinn

When attempting to use the niri-flake overlay and modules on a NixOS 25.05 system, the build for niri-stable (and
niri-unstable) consistently fails with exit code 2. The failure appears to happen during the installPhase according to the
logs.

This prevents the installation and use of niri via the flake, which is necessary for configuring features like Xwayland
support. The expected behavior is for the niri package from the flake to build successfully on NixOS 25.05 when the overlay is
used.

System Information

  • NixOS Version: 25.05
  • nixpkgs URL: github:nixos/nixpkgs/25.05
  • niri-flake URL: github:sodiboo/niri-flake (latest commit on main)

Steps to Reproduce

  1. Use the following flake.nix configuration:
    1     {
    2       description = "Niri build test flake";
    3       inputs = {
    4         nixpkgs.url = "github:nixos/nixpkgs/25.05";
    5         niri-flake.url = "github:sodiboo/niri-flake";
    6         home-manager.url = "github:nix-community/home-manager/release-25.05";
    7         home-manager.inputs.nixpkgs.follows = "nixpkgs";
    8       };
    9
   10       outputs = { self, nixpkgs, niri-flake, home-manager, ... }@inputs: {
   11         nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
   12           system = "x86_64-linux";
   13           specialArgs = { inherit inputs; };
   14           modules = [
   15             # Import the niri-flake module
   16             niri-flake.nixosModules.niri
   17
   18             # Minimal system config
   19             ({ pkgs, ... }: {
   20               nixpkgs.overlays = [ inputs.niri-flake.overlays.niri ];
   21               programs.niri.enable = true;
   22               system.stateVersion = "25.05";
   23               users.users.test = { isNormalUser = true; };
   24             })
   25           ];
   26         };
   27       };
   28     }
  1. Run nixos-rebuild switch --flake .

Relevant Logs

The build fails with a generic exit code 2. The end of the build log shows:

    1 
    2    Doc-tests niri
    3
    4 running 0 tests
    5
    6 test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
    7
    8 Finished cargoCheckHook
    9 checkPhase completed in 1 minutes 20 seconds
   10 Running phase: glibPreInstallPhase
   11 Running phase: installPhase
   12 Executing cargoInstallHook
   13 error: builder for '/nix/store/9pfj20nh6ax25p23b7v4pzh2ccaacsdi-niri-25.08.drv' failed with exit code 2;
   14        For full logs, run:
   15          nix log /nix/store/9pfj20nh6ax25p23b7v4pzh2ccaacsdi-niri-25.08.drv

The full log doesn't seem to indicate a specific compilation error, and the tests appear to pass. The failure happens during
the installPhase. There are some Fontconfig error messages in the test phase, but these may be red herrings related to the
sandboxed build environment.

Thank you for your work on this project

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions