snowfallorg / nix-software-center

A simple gtk4/libadwaita software center to easily install and manage nix packages
GNU General Public License v3.0
572 stars 16 forks source link

Unfree packages throw an error when installing to user profile #65

Open iopq opened 6 months ago

iopq commented 6 months ago

Expected:

When you click install it installs it to your user profile, fixing any errors

Actual:

error:
       … in the condition of the assert statement

         at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/customisation.nix:268:17:

          267|     in commonAttrs // {
          268|       drvPath = assert condition; drv.drvPath;
             |                 ^
          269|       outPath = assert condition; drv.outPath;

       … while evaluating the attribute 'handled'

         at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/pkgs/stdenv/generic/check-meta.nix:490:7:

          489|       # or, alternatively, just output a warning message.
          490|       handled =
             |       ^
          491|         (

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Package ‘roomeqwizard-5.30.9’ in /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/pkgs/applications/audio/roomeqwizard/default.nix:112 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) [
             "roomeqwizard-5.30.9"
           ];
         }

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowUnfree = true; }
       to ~/.config/nixpkgs/config.nix.