-
Notifications
You must be signed in to change notification settings - Fork 84
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
nixpkgs_flake_package()
supplies --experimental-features 'nix-command flakes'
in case someone's local nix.conf
hasn't enabled them.
#465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need --extra-experimental-features to avoid wiping the features already present in the user config. Otherwise, yes, this is a very good idea 💯
core/nixpkgs.bzl
Outdated
@@ -790,7 +790,7 @@ def _nixpkgs_flake_package_impl(repository_ctx): | |||
extra_msg = "See: https://nixos.org/nix/", | |||
) | |||
|
|||
_nixpkgs_build_and_symlink(repository_ctx, [nix_path, "build"], expr_args, build_file_content) | |||
_nixpkgs_build_and_symlink(repository_ctx, [nix_path, "--experimental-features", "nix-command flakes", "build"], expr_args, build_file_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_nixpkgs_build_and_symlink(repository_ctx, [nix_path, "--experimental-features", "nix-command flakes", "build"], expr_args, build_file_content) | |
_nixpkgs_build_and_symlink(repository_ctx, [nix_path, "--extra-experimental-features", "nix-command flakes", "build"], expr_args, build_file_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Done 🙂
…and flakes'` in case someone's local `nix.conf` hasn't enabled them.
3962b20
to
7a832ba
Compare
One more thought I have while I'm in here, def is_supported_platform(repository_ctx):
return repository_ctx.which("nix-build") != None Should this switch to checking |
The existence of |
@layus does this seem reasonable? I'm not aware of any downsides for unconditionally passing these flags.