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 flake to use haskell.nix #2600

Merged
merged 1 commit into from Apr 28, 2021
Merged

Convert flake to use haskell.nix #2600

merged 1 commit into from Apr 28, 2021

Conversation

craigem
Copy link
Contributor

@craigem craigem commented Apr 12, 2021

Convert the existing flake.nix to use the documented example from haskell.nix as a basis.

Depends on input-output-hk/iohk-nix#470

Should be import ./nix/haskell.nix with some tweaks the haskell.nix to get the things it needs correctly.

  • nix build . will build cardano-node by default.
  • nix build .#cardano-node to be explicit
  • nix build .#cardano-cli
  • nix build .#cardano-ping
  • nix build .#db-converter

Specific system targets can be built, ie:

nix build .#packages.x86_64-darwin.cardano-node

A nix repl equivalent can be reached running: nix run .#repl

ToDo:

  • Import custom libsodium
  • Import nix/haskell.nix
  • Provide shortcuts so applications can be built as per the above examples, rather than as "cardano-cli:exe:cardano-cli"
  • Provide builds for all Cardano networks.
  • Fix nix repl (replaced - see above)
  • Remove legacy Nix files

@craigem craigem force-pushed the flake-haskell.nix branch 4 times, most recently from 8be92bd to 7e6a370 Compare April 12, 2021 08:54
@jbgi jbgi force-pushed the flake-haskell.nix branch 4 times, most recently from 017f3be to ca47543 Compare April 22, 2021 13:53
@jbgi jbgi force-pushed the flake-haskell.nix branch 2 times, most recently from 8d099a1 to 09ff59e Compare April 27, 2021 12:01
@jbgi jbgi force-pushed the flake-haskell.nix branch 3 times, most recently from 55a1900 to 8a9fa1c Compare April 27, 2021 22:37
@jbgi jbgi requested a review from a team April 27, 2021 22:43
@jbgi jbgi changed the title WIP: Convert flake to use haskell.nix Convert flake to use haskell.nix Apr 27, 2021
@jbgi jbgi added WIP Work In Progress (cannot be merged yet) nix Nix-based build and CI infrastructure labels Apr 27, 2021
@jbgi jbgi force-pushed the flake-haskell.nix branch 2 times, most recently from dbbb282 to e71194a Compare April 27, 2021 22:48
Copy link
Contributor Author

@craigem craigem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very happy with this PR 😃

@disassembler
Copy link
Contributor

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 28, 2021

👎 Rejected by label

@disassembler disassembler removed the WIP Work In Progress (cannot be merged yet) label Apr 28, 2021
@disassembler
Copy link
Contributor

bors r+

iohk-bors bot added a commit that referenced this pull request Apr 28, 2021
2600: Convert flake to use haskell.nix r=disassembler a=craigem

Convert the existing flake.nix to use the documented [example](https://input-output-hk.github.io/haskell.nix/tutorials/getting-started-flakes/) from [haskell.nix](https://github.com/input-output-hk/haskell.nix) as a basis.

Depends on input-output-hk/iohk-nix#470

Should be import `./nix/haskell.nix` with some tweaks the `haskell.nix` to get the things it needs correctly.

- [X] `nix build .` will build `cardano-node` by default.
- [X] `nix build .#cardano-node` to be explicit
- [X] `nix build .#cardano-cli`
- [X] `nix build .#cardano-ping`
- [X] `nix build .#db-converter`

Specific system targets can be built, ie:
```
nix build .#packages.x86_64-darwin.cardano-node
```
A `nix repl` equivalent can be reached running: `nix run .#repl`

### ToDo:

- [x] Import custom `libsodium`
- [x] Import `nix/haskell.nix` 
- [x] Provide shortcuts so applications can be built as per the above examples, rather than as `"cardano-cli:exe:cardano-cli"`
- [x] Provide builds for all Cardano networks.
- [x] Fix `nix repl` (replaced - see above)
- [x] Remove legacy Nix files

Co-authored-by: Craige McWhirter <craige.mcwhirter@iohk.io>
Co-authored-by: Jean-Baptiste Giraudeau <jean-baptiste.giraudeau@iohk.io>
@craigem
Copy link
Contributor Author

craigem commented Apr 28, 2021

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 28, 2021

@iohk-bors iohk-bors bot merged commit 0f39332 into master Apr 28, 2021
@iohk-bors iohk-bors bot deleted the flake-haskell.nix branch April 28, 2021 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nix Nix-based build and CI infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants