You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install Nix on macOS, with the Determinate Systems installer. Using the "official" installer would work, but with more steps (enable Flakes, disable nixpkgs) and I'm not an expert on that 😬
Install an unfree flake: NIXPKGS_ALLOW_UNFREE=1 nix profile install --impure 'nixpkgs#_1password'
Run topgrade
Erroneous Behavior
topgrade fails with the following error:
MacPro% env|grep ALLOWNIXPKGS_ALLOW_UNFREE=1MacPro% nix --extra-experimental-features nix-command profile upgrade '.*' --verbose error: Package ‘1password-cli-2.22.0’ in /nix/store/mrckm9b3v6wg2fljdp3z4pja1sz07g3z-source/pkgs/applications/misc/1password/default.nix:71 has an unfree license (‘unfree’), refusing to evaluate. a) To temporarily allow unfree packages, you can use an environment variable for a single invocation of the nix tools. $ export NIXPKGS_ALLOW_UNFREE=1 Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake, then pass `--impure` in order to allow use of environment variables. b) For `nixos-rebuild` you can set { nixpkgs.config.allowUnfree = true; } in configuration.nix to override this. Alternatively you can configure a predicate to allow specific packages: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "1password-cli" ]; } c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add { allowUnfree = true; } to ~/.config/nixpkgs/config.nix.
Options b/c do not work, because of Flakes (from what I understand) - and the env.var alone isn't enough, --impure must be passed.
Expected Behavior
One of:
Documentation to explain why this doesn't work - which I'm trying to achieve with this ticket.
The command used by topgrade should work out of the box.
Topgrade should allow setting --impure.
Topgrade should automagically add --impure when NIX_* environment variables are present?
Problem persists without calling from topgrade
Yes, but with a workaround
No
Additional Details
Operation System/Version: MacOS Sonoma
Topgrade version (topgrade -V): Topgrade 13.0.0, installed with Nix
This is related to #389, with a twist.
Steps to reproduce
NIXPKGS_ALLOW_UNFREE=1 nix profile install --impure 'nixpkgs#_1password'
topgrade
Erroneous Behavior
topgrade fails with the following error:
Options
b
/c
do not work, because of Flakes (from what I understand) - and the env.var alone isn't enough,--impure
must be passed.Expected Behavior
One of:
--impure
.--impure
whenNIX_*
environment variables are present?Problem persists without calling from topgrade
Additional Details
topgrade -V
): Topgrade 13.0.0, installed with NixRelevant code
topgrade/src/steps/os/unix.rs
Line 397 in 78dec89
The text was updated successfully, but these errors were encountered: