Skip to content
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

Use flakes to run firefox-nightly without manually including overlays. #307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nbp
Copy link
Collaborator

@nbp nbp commented Mar 22, 2023

This change creates a set of flakes such that users can download / install / run various versions of Firefox using flakes.
Once merged, this change will make the following command work:

nix run --impure -no-write-lock-file github:mozilla/nixpkgs-mozilla?dir=flakes/nixos-22.11#firefox-nightly

The details of this command line are explained as part of the README, and provide explanations why each argument is needed or what they can be replaced by when possible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? users can just --override-input nixpkgs nixpkgs/nixos-22.11

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another option, yes, but this would still require ?dir=flakes, as there is no nixpkgs input to the root flake.nix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think channel specific flakes are unnecessary bloat and it can't be guaranteed that they will always exist many years in the future, while override-input is future proof

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing a bit, it seems that the following are already working:

$ nix shell --impure github:nbp/nixpkgs-mozilla?dir=flakes
$ nix shell --impure --override-input nixpkgs nixpkgs/nixos-22.11 github:nbp/nixpkgs-mozilla?dir=flakes

Thanks for the feedback, I will remove the 2 flake.nix which are simply replacing nixpkgs input and add this one as example in the README.

Unfortunately, the nix run command does not work yet, unless we override again the input, as the pname change is not yet part of mozilla/nixpkgs-mozilla, but it can temporarily be achieved with:

$ nix shell --impure --override-input nixpkgs-mozilla github:nbp/nixpkgs-mozilla github:nbp/nixpkgs-mozilla?dir=flakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants