-
Notifications
You must be signed in to change notification settings - Fork 28
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
Convert skeleton to use niv #262
Conversation
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.
It's looking great.
Most projects would also be wanting to update Haskell.nix at the same time.
But for skeleton that change could go into a separate PR.
# Use nixpkgs pin from commonLib | ||
, pkgs ? commonLib.pkgs | ||
, sourcesOverride ? {} | ||
, pkgs ? import ./nix { |
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.
Do you think the filename should be ./nix/nixpkgs.nix
rather than ./nix/default.nix
?
Could we also add a comment saying that this argument is the Nixpkgs package set, augmented with iohk-nix 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.
Added comments!
I'm a bit ambivalent on nix/nixpkgs.nix
, it is probably more explicit, but also more verbose and in some projects (like cardano-ops
) we import ../nix {}
at numerous places. Also using nix/default.nix
seems to be the convention used by projects using niv
, eg.:
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.
FWIW, I agree with Rodney that I'd prefer nix/default.nix
. We use niv and we don't even have a special file for the nixpkgs, we just pull it out and do pkgs = import (sources.nixpkgs) {... }
.
# Use nixpkgs pin from commonLib | ||
, pkgs ? commonLib.pkgs | ||
, sourcesOverride ? {} | ||
, pkgs ? import ./nix { |
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.
FWIW, I agree with Rodney that I'd prefer nix/default.nix
. We use niv and we don't even have a special file for the nixpkgs, we just pull it out and do pkgs = import (sources.nixpkgs) {... }
.
inherit system crossSystem config nixpkgsOverlays; | ||
sourcesOverride = sources; | ||
}; | ||
pkgs = iohkNix.pkgs; |
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 still really dislike the weird proxying of the nixpkgs arguments through iohk-nix
, but I guess that's orthogonal to this PR.
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.
yeah, would probably be best if iohk-nix expose an iohk-overlays
and a iohk-config
. and people use them explicitly.
"url": "https://github.com/input-output-hk/niv/archive/89da7b2e7ae0779fd351618fc74df1b1da5e6214.tar.gz", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
}, | ||
"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.
I take it this is just here to make niv
happy? Wish they would do nmattia/niv#134 already...
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.
indeed, otherwise we have to rely on <nixpkgs>
.
bors r+ |
Build succeeded |
No description provided.