-
Notifications
You must be signed in to change notification settings - Fork 29
Moves nix-tools standard templates into iohk-nix #30
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
Conversation
f8797f4
to
a2c9a3a
Compare
default.nix
Outdated
# default and release templates that abstract | ||
# over the details for CI. | ||
default-nix = import ./nix-tools-default.nix commonLib; | ||
release-nix = import ./nix-tools-release.nix commonLib; |
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.
Are these usable as part of a larger default.nix
or release.nix
? For example, in the Plutus repo we also have a bunch of latex that's buildable via our top-level default.nix
and included in release.nix
.
Also, writing a little about how to use these in a README or similar would be good.
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 should be perfectly fine to use the default-nix
template and just merge it with custom package definitions. The release-nix
will still rely on the default.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.
@michaelpj does the example (See the PR message atop) suite your needs?
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.
Good example, do put them somewhere in the actual repository so they're available for future people!
40ee24c
to
420910d
Compare
I'd rather do something like this, does that work?
Similarly for the |
@michaelpj maybe I'm misreading you...
{ pkgs, ... }@args:
localLib.nix-tools.default-nix ./nix/pkgs.nix args // {
# additional non-haskell packages we want to build on CI.
byronLedgerSpec = import ./specs/ledger/latex {};
byronChainSpec = import ./specs/chain/latex {};
semanticsSpec = import ./specs/semantics/latex {};
} This is equivalent to { pkgs, ... }@args:
{
inherit (localLib.nix-tools.default-nix ./nix/pkgs.nix args) nix-tools;
# additional non-haskell packages we want to build on CI.
byronLedgerSpec = import ./specs/ledger/latex {};
byronChainSpec = import ./specs/chain/latex {};
semanticsSpec = import ./specs/semantics/latex {};
} The slightly annoying but important part is that we pass Alright, I lied. It's technically equivalent to |
Okay, seems fine, but I'd like to have both documented. Have a look at the Plutus default.nix to see how much stuff there is in there. Ideally this would replace the |
Looks like you're still working on this - let me know if you'd like me to have another look. |
@angerman Should we also include packaging of |
4dd072e
to
340e2ef
Compare
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.
Looks fine, examples would be great!
As such we can now define: ``` let localLib = import ./lib.nix; in localLib.nix-tools.default-nix ./nix/pkgs.nix ``` as `default.nix` and ``` let localLib = import ./lib.nix; in localLib.nix-tools.release-nix { packages = [ "cardano-chain" "cs-ledger" "small-steps" "cs-blockchain" ]; required-name = "cardano-chain-required-checks"; other-packages = { byronLedgerSpec = import ./specs/ledger/latex {}; byronChainSpec = import ./specs/chain/latex {}; semanticsSpec = import ./specs/semantics/latex {}; }; package-set-path = ./.; } ``` as `release.nix`.
This should remove the datadir mismatch when using component builds with cabal.
1310a07
to
917e491
Compare
@angerman good with this, but can we as a follow-up add bors since we're adding CI checks now? |
As such we can now define:
as
default.nix
and
as
release.nix
.