-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow unfree packages with nix shell
#166220
Comments
stale
bot
added
the
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
label
Oct 1, 2022
stale
bot
removed
the
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
label
Mar 24, 2023
So is there a solution or workaround for this? I'd like have a devShell with unfree packages. |
For now a workaround is to use
|
Norbert (NobbZ) suggest the following on discord, which seems to work well: inputs = {
nixunstable.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { nixunstable }: {
devShells.x86_64-linux.default = let
pkgs = import nixunstable { system = "x86_64-linux"; config.allowUnfree = true; };
in pkgs.callPackage ./myshelll.nix {};
}; |
the error message already contains
anything else should be discussed in nix instead of nixpkgs
|
You also could add in nxpkg import
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
Currently, it's not possible to use unfree packages with
nix shell
e.g.
a current workaround is to use
--impure
, but one can want both unfree and not impure.Possible fix
My guess is that the
legacyPackages
is loaded with inheritedsystem
.nixpkgs/flake.nix
Line 43 in c618329
There is no way to provide an argument to flakes (see NixOS/nix#3843 (comment)) and pass it to the instanciation, and most likely won't ever be.
Therefore, a suggestion would be to add
The downside is that we get all packages twice, e.g. in commands such as
nix search
.Note
We could think of being able to pass an argument such as
--allow-unfree
to the Nix command, but in my opinion it is too focused on nixpkgs and most likely to be rejected.The text was updated successfully, but these errors were encountered: