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

Add Nix flake #10352

Open
yoav-lavi opened this issue Sep 13, 2023 · 5 comments
Open

Add Nix flake #10352

yoav-lavi opened this issue Sep 13, 2023 · 5 comments
Labels
build-package Everything concerning the CI build process and packaging of nushell enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@yoav-lavi
Copy link

yoav-lavi commented Sep 13, 2023

Describe the solution you'd like

Would be useful (IMO) to add a Nix flake (see for example https://github.com/helix-editor/helix/blob/master/flake.nix [the nixpkgs configuration for Nushell is here and home-manager is here]) so Nix users (using flakes) can easily point to a "nightly" version of Nushell.

This would allow users to configure an input and overlay to use the GitHub main version of Nushell.

This would also allow Nix users to contribute more easily.

(with helix:)

   # inputs ...
    helix = {
      url = "github:helix-editor/helix";
    };
    # ...
   # ...
    overlays = [
      (self: super: {
        inherit (helix.packages.aarch64-darwin) helix helix-unwrapped;
      })
    ];
    # ...
@yoav-lavi yoav-lavi added enhancement New feature or request needs-triage An issue that hasn't had any proper look labels Sep 13, 2023
@fdncred
Copy link
Collaborator

fdncred commented Sep 13, 2023

We'd probably accept a PR for this.

@sholderbach sholderbach added build-package Everything concerning the CI build process and packaging of nushell help wanted Extra attention is needed good first issue Good for newcomers and removed needs-triage An issue that hasn't had any proper look labels Sep 13, 2023
@bugeats
Copy link

bugeats commented Sep 24, 2023

There's one here I've been using like so:

inputs.nushell-nightly.url = "sourcehut:~mangoiv/nu-shell.nix"

However I really think nu should own its own destiny and host the flake directly. Unfortunately that probably means maintaining a proper nix build/CI.

How to make nix fans out of the maintainers?

@khionu
Copy link

khionu commented Oct 6, 2023

Summarizing some notes from a Discord convo:

  • A flake is more than a distro-specific addition, as there are plenty of non-NixOS users of Nix (a common model is to have a Macbook client + NixOS servers)
  • Flakes provide optimal functionality when included with the project they represent
    • You can then import flakes by branch/tag

Also, I can volunteer to take ownership of the flake.

@amtoine
Copy link
Member

amtoine commented Oct 6, 2023

i would like to add that, as in #41 for nufmt, there would be two files added to the root of the repo if this goes to completion:

  • flake.nix: similar to Cargo.toml, written in the Nix language
  • flake.lock: similar to Cargo.lock and written in JSON i believe

@amtoine
Copy link
Member

amtoine commented Oct 6, 2023

Also, I can volunteer to take ownership of the flake.

i guess listing the contact of maintainers in the flake could be useful 👌

@ysthakur ysthakur mentioned this issue Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-package Everything concerning the CI build process and packaging of nushell enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants