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

Convert skeleton to use niv #262

Merged
merged 4 commits into from
Dec 4, 2019
Merged

Convert skeleton to use niv #262

merged 4 commits into from
Dec 4, 2019

Conversation

jbgi
Copy link
Contributor

@jbgi jbgi commented Dec 3, 2019

No description provided.

@jbgi jbgi requested review from disassembler and rvl December 3, 2019 15:15
Copy link
Contributor

@rvl rvl left a 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.

skeleton/default.nix Show resolved Hide resolved
# Use nixpkgs pin from commonLib
, pkgs ? commonLib.pkgs
, sourcesOverride ? {}
, pkgs ? import ./nix {
Copy link
Contributor

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.

Copy link
Contributor Author

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.:

Copy link
Collaborator

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) {... }.

@jbgi jbgi changed the title Convert skeleton to use niv (WIP) Convert skeleton to use niv Dec 4, 2019
@jbgi jbgi requested review from michaelpj and rvl December 4, 2019 17:47
# Use nixpkgs pin from commonLib
, pkgs ? commonLib.pkgs
, sourcesOverride ? {}
, pkgs ? import ./nix {
Copy link
Collaborator

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;
Copy link
Collaborator

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.

Copy link
Contributor Author

@jbgi jbgi Dec 4, 2019

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": {
Copy link
Collaborator

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...

Copy link
Contributor Author

@jbgi jbgi Dec 4, 2019

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>.

@jbgi
Copy link
Contributor Author

jbgi commented Dec 4, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Dec 4, 2019
262: Convert skeleton to use niv r=jbgi a=jbgi



Co-authored-by: Jean-Baptiste Giraudeau <jean-baptiste.giraudeau@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 4, 2019

@iohk-bors iohk-bors bot merged commit b377d8e into master Dec 4, 2019
@iohk-bors iohk-bors bot deleted the niv branch December 4, 2019 21:47
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.

3 participants