[Nix#8811] default output is no longer built by default, unless it's named "out" #125

Open
opened 2024-03-16 06:45:02 +00:00 by lix-bot · 0 comments
Member

Upstream-Issue: NixOS/nix#8811

Describe the bug

It's no longer possible to nix build outputs other than out:

{
  outputs = { self, nixpkgs }:
    let pkgs = import nixpkgs { system = "x86_64-linux"; };
    in {
      packages.x86_64-linux = {
        test = builtins.derivation {
          system = "x86_64-linux";
          name = "test-0";
          outputs = [ "main" "alt" ];
          builder = "${pkgs.busybox}/bin/ash";
          args = [ "-c" "echo main > $main; echo alt > $alt" ];
        };
      };
    };
}

Steps To Reproduce

$ nix build '.#test'  # broken
error: derivation '/nix/store/nz97m53ivjay0vk6spcr2pdzw3xg68if-test-0.drv' does not have wanted outputs 'out'
$ nix build '.#test^main'  # works

Expected behavior

As with Nix 2.12:

$ nix build '.#test'  # works
$ nix build '.#test^main'  # works

nix-env --version output

nix-env (Nix) 2.15.1

Additional context

Seems to be a regression in between 2.12 and 2.13.

Priorities

Add 👍 to issues you find important.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/8811 **Describe the bug** It's no longer possible to `nix build` outputs other than `out`: ``` { outputs = { self, nixpkgs }: let pkgs = import nixpkgs { system = "x86_64-linux"; }; in { packages.x86_64-linux = { test = builtins.derivation { system = "x86_64-linux"; name = "test-0"; outputs = [ "main" "alt" ]; builder = "${pkgs.busybox}/bin/ash"; args = [ "-c" "echo main > $main; echo alt > $alt" ]; }; }; }; } ``` **Steps To Reproduce** ``` $ nix build '.#test' # broken error: derivation '/nix/store/nz97m53ivjay0vk6spcr2pdzw3xg68if-test-0.drv' does not have wanted outputs 'out' $ nix build '.#test^main' # works ``` **Expected behavior** As with Nix 2.12: ``` $ nix build '.#test' # works $ nix build '.#test^main' # works ``` **`nix-env --version` output** `nix-env (Nix) 2.15.1` **Additional context** Seems to be a regression in between 2.12 and 2.13. **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
lix-bot added the
bug
imported
labels 2024-03-16 06:45:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#125
No description provided.