Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[DEVOPS-1061] Add support for cabal new-build #3662

Merged
merged 6 commits into from
Sep 26, 2018

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Sep 25, 2018

Description

Building with cabal new-build gives you a multi-package project with Nix downloading all of the dependencies from its binary cache.

Linked issue

https://iohk.myjetbrains.com/youtrack/issue/DEVOPS-1061

Type of change

  • New feature in build system and dev environment.

Developer checklist

  • Documentation updated accordingly.
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub.

QA Steps

nix-shell
cabal new-configure
cabal new-build all
cabal new-repl cardano-sl-wallet-new
stack --nix setup
stack --nix build
nix-build -A all-cardano-sl

@rvl rvl requested a review from a team September 25, 2018 10:57
This helps our nix expressions identify the "local" packages.
The current package set comes with cabal 2.0.0.1 which has a bug
relating to cpphs.

So don't include this in the shell. Ask the user to install their own
cabal 2.2 from the 18.09 channel.
@jmitchell
Copy link
Contributor

jmitchell commented Sep 26, 2018

NB: cabal new-configure failed for me when using an older version of cabal, but worked after upgrading (nix-env -f channel:nixos-18.09 -iA pkgs.cabal-install) and then updating the package cache by running cabal update.

This is already addressed in the PR with changes to docs/how-to/build-cardano-sl-and-daedalus-from-source-code.md.

Old version

$ cabal --version
cabal-install version 2.0.0.1
compiled using version 2.0.1.0 of the Cabal library

New version

$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library

@michaelpj
Copy link

Randomly saw this, and thought I'd add (since I tried to get new-build working for the Plutus repo) that you want to filter out the GHC environment files in whatever you use to filter package source before building, otherwise things will randomly break mysteriously.

@disassembler disassembler merged commit a2be15c into develop Sep 26, 2018
@disassembler disassembler deleted the rvl/cabal-new-build branch September 26, 2018 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants