-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
UXThe way in which users interact with Nix. Higher level than UI.The way in which users interact with Nix. Higher level than UI.bugcliThe old and/or new command line interfaceThe old and/or new command line interface
Description
nix-env silently fails to install unfree packages when allowUnfree = false; and returns success:
$ nix-env -iA nixpkgs.unrar
$ echo $?
0
$ nix build nixpkgs.unrar
error: Package ‘unrar-5.5.8’ in <nixpkgs>/pkgs/tools/archivers/unrar/default.nix:39 has an unfree license (‘unfreeRedistributable’), refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
Feels like it should display the same error that nix build does.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
UXThe way in which users interact with Nix. Higher level than UI.The way in which users interact with Nix. Higher level than UI.bugcliThe old and/or new command line interfaceThe old and/or new command line interface