-
Notifications
You must be signed in to change notification settings - Fork 18
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
default.nix: init #209
base: main
Are you sure you want to change the base?
default.nix: init #209
Conversation
Blocked on #222 |
894d3ba
to
6b1eda4
Compare
52ef767
to
7350e78
Compare
633fee8
to
a186239
Compare
80be2ec
to
6b90854
Compare
default.nix
Outdated
inputs = import ./flake-inputs.nix; | ||
in | ||
{ | ||
nixpkgs ? inputs.nixpkgs, |
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.
Is there any reason we can't create the actual values here already?
nixpkgs ? inputs.nixpkgs, | |
pkgs ? import inputs.nixpkgs { inherit system; config = {}; overlays = []; }, |
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.
There's the Rust overlay, I guess passing a different pkgs
could break atomic-server
?
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.
Though I have no idea why the overlay is there, I'll open a test PR to see what happens if it's removed.
default.nix
Outdated
}, | ||
system ? builtins.currentSystem, | ||
}: let | ||
lib = import (nixpkgs + "/lib"); |
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.
If you have pkgs
from arguments you get
lib = import (nixpkgs + "/lib"); | |
inherit (pkgs) lib; |
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.
Since lib
is system-agnostic, I guess inheriting it from a system-dependent pkgs
is overkill.
278286a
to
c088ddd
Compare
8a5066d
to
f6ca212
Compare
I've been trying out this Although I haven't gotten it working yet, since it can already be used to build packages I assume that it will be feasible to use this proposed |
This PR moves the packaging logic from
flake.nix
todefault.nix
, so that all packages, including overview and options, can be built withnix-build -A some-package
, and be evaluated withnix repl --file .
.In addition, helper functions introduced in
flake.nix
in the previous refactor are moved tohelper.nix
, which also acceptsnix repl --file helper.nix
, makingflake.nix
even simpler.