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 flake.nix #134

Closed
wants to merge 3 commits into from
Closed

Add flake.nix #134

wants to merge 3 commits into from

Conversation

ursi
Copy link
Contributor

@ursi ursi commented Apr 27, 2021

Just a simple flake that exposes the packages in this repo.

@toastal
Copy link
Contributor

toastal commented Apr 27, 2021

Will the lockfile need a lot of updating?

@ursi
Copy link
Contributor Author

ursi commented Apr 27, 2021

I don't think so. utils will never need to be updated, nixpkgs will need to be updated any time a newer version of some package is required. But I just realized the project already pins nixpkgs in pinned.nix, so I actually think using that is the way to go.

@toastal
Copy link
Contributor

toastal commented May 25, 2021

alternatively, this can be used without a flake file as

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    easy-purescript-nix = {
      url = "github:justinwoo/easy-purescript-nix";
      flake = false;
    };
  };
  
  outputs = { self, nixpkgs, easy-purescript-nix, ... }@inputs:
    let
      easy-ps = import easy-purescript-nix { inherit pkgs; };
    in
    {
      # ...
    };
}

@toastal
Copy link
Contributor

toastal commented Nov 12, 2021

I think this merge request is worth looking at again. Flakes are no longer behind an experimental flag in unstable and in future versions of Nix.

@shinzui shinzui mentioned this pull request Dec 5, 2021
@@ -0,0 +1,10 @@
{ inputs.utils.url = "github:numtide/flake-utils";
Copy link
Contributor

Choose a reason for hiding this comment

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

flake-utils is not needed for what this project is doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean, flake-utils is never needed, it's just a nicer api. Do you have something more specific to say about it?

Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/NixOS/nixpkgs/blob/master/flake.nix#L14-L16

Nicer API? It's actually more lines of code to have inputs and now you have an additional dependency.

@srid
Copy link

srid commented May 10, 2022

utils will never need to be updated,

It needs to be updated if you want to use a new set of defaults for eachDefaultSystem. For example, numtide/treefmt#162 updated it to get aarch64-darwin in the list (added in numtide/flake-utils@997f7ef).

@voidus
Copy link

voidus commented Apr 19, 2023

I definitely don't want to block this, but importing nixpkgs from the classic file makes stuff like inputs.easy-purescript.inputs.nixpkgs.follows = "nixpkgs"; impossible

@ursi
Copy link
Contributor Author

ursi commented Apr 19, 2023

I no longer have interest in this PR.

@ursi ursi closed this Apr 19, 2023
This was referenced Jun 2, 2023
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.

None yet

4 participants