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
{{ message }}
Repository navigation
Support (force) build on platforms != meta.platforms #246
When trying to build a package on a system that is not listed in meta.platforms, nix throws this error:
error: the package ‘foo’ in ‘.../default.nix:50’ is not supported on ‘system-bar’
While I think this is a good default behaviour, I think that we should provide an easy way to override it and force a build. Something like nix-build --option build-unsupported-platforms true or some env var. Or both.
And then we could expand the error message to suggest the ways to force a build.
I hope this feature will stop people from feeling the need to remove meta.platforms and/or blindly replacing it with meta.hydraPlatforms, something I consider workarounds to avoid this issue.
Great! I didn't know that it worked for this too, I thought it only worked for meta.broken = true packages.
Still, I think it would be nice to change the error message to hint about NIXPKGS_ALLOW_BROKEN=1 and allowBroken = true. Should I create another issue for that?
$ nix-build -A skype
error: Package ‘skype-4.2.0.13’ in ‘/home/bfo/nixpkgs2/pkgs/applications/networking/instant-messengers/skype/default.nix:68’ has an unfree license, refusing to evaluate. You can set
{ nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this. If you use Nix standalone, you can add
{ config.allowUnfree = true; }
to ~/.nixpkgs/config.nix or pass
--arg config '{ allowUnfree = true; }'
on the command line.
Activity
qfsm: update meta.platforms settings for the new logic
edolstra commentedon Apr 29, 2014
You can already do this by setting
NIXPKGS_ALLOW_BROKENto1, or settingallowBroken = true;inconfig.nix.bjornfor commentedon Apr 29, 2014
Great! I didn't know that it worked for this too, I thought it only worked for
meta.broken = truepackages.Still, I think it would be nice to change the error message to hint about
NIXPKGS_ALLOW_BROKEN=1andallowBroken = true. Should I create another issue for that?vcunat commentedon Apr 30, 2014
+1 for user-friendlier messages. I've managed to get no response around that topic (NixOS/nixpkgs#2134).
bjornfor commentedon Apr 30, 2014
@vcunat: We have user friendly error message for that use case now, added in NixOS/nixpkgs@ebe8fab:
bjornfor commentedon Apr 30, 2014
Pull request "More helpful message when refusing to evaluate "broken" package": NixOS/nixpkgs#2455
vcunat commentedon Apr 30, 2014
Ah, true, I see.
Merge pull request NixOS#246 from nix-dot-dev/dependabot/pip/black-22…
Merge pull request NixOS#246 from kolloch/dependabot-rollup
Merge pull request NixOS#246 from DeterminateSystems/fixup-missing-bu…
doc/inventory: 2026-05 adversarial audit — corrections, NixOS#241-Nix…
libstore/build: drop dead PathSubstitutionGoal gotInfo/finished decls