-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: introduce flake #15
base: main
Are you sure you want to change the base?
Conversation
js2nix = pkgs'.callPackage ./. { }; | ||
in | ||
{ | ||
default = js2nix; |
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'd sort of expect this to be in a lib.${system}
namespace. "Semantics over impl-detail [that it is system scoped]"
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.
potentially even make that function curriable with an instance of pkgs
:
lib.js2nix pkgs {
package-json = ./package.json;
yarn-lock = ./yarn.lock;
}
I always feel immediately at home when there is special consideration put to the handling of pkgs
instance. 😄
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.
Thanks for the feedback around the lib
namespace @blaggacao, that's good point! I'll incorporate it in coming commit.
I tried using this branch from a flake but all dependencies end up failing to build. For instance:
|
Motivation
Introduce Nix flake so it allows using this project from Nix flake based projects as well.
It's noteworthy that the default exported package is not a Nix package but a function that allows to build environments.
Test the changes
Resolves #4
@typetetris, @blaggacao, any feedback is very welcome.