Skip to content
nix scripts shared across projects
Nix Shell Haskell Other
Branch: master
Clone or download
iohk-bors and johnalotoski Merge #159
159: jormungandr: 0.3.2 -> 0.3.3 r=johnalotoski a=johnalotoski



Co-authored-by: John Lotoski <john.lotoski@iohk.io>
Latest commit e1b20b5 Aug 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildkite Add skeleton project Jul 25, 2019
cardano-lib Merge #158 Aug 21, 2019
ci Add skeleton project Jul 25, 2019
docs Fix mistakes in skeleton docs Jul 25, 2019
ghc-packages Adds the relevant ghc-8.6.5 packages and patches Jun 7, 2019
gotchas Update documentation Jul 4, 2019
jemalloc initial commit of shared nix files across projects Nov 7, 2018
lib Add skeleton project Jul 25, 2019
overlays jormungandr: 0.3.2 -> 0.3.3 Aug 22, 2019
patches Cleanup the config.nix Jun 12, 2019
pins haskell.nix bump Aug 9, 2019
pkgs Add package for openapi-spec-validator Jul 22, 2019
skeleton Fix mistakes in skeleton docs Jul 25, 2019
tests [DEVOPS-1124] move tests, improve fetch-nixpkgs Nov 8, 2018
.gitignore Adds ghc and reinstallable info (#42) Mar 18, 2019
README.md Add skeleton project Jul 25, 2019
bors.toml add the check-hydra.sh script Jun 5, 2019
changelog.md Add skeleton project Jul 25, 2019
clean-source-haskell.nix common-nixpkgs improvements Nov 15, 2018
commit-id.nix common-nixpkgs improvements Nov 15, 2018
config.nix Same issue for MR95--ghc-pkg-deadlock-fix.patch Jun 24, 2019
default.nix add cardanoLib for environment information Aug 19, 2019
fetch-tarball-with-override.nix Bump default *.nix repo. Add update script. Feb 5, 2019
get-packages.nix fix get-packages Nov 7, 2018
haskell-packages.nix Remove compiler override in haskellPackages Mar 19, 2019
haskell.nix Add haskellNixJsonOverride argument to default.nix May 17, 2019
maybe-env.nix implementing overlays with haskellPackages Nov 7, 2018
mingw_w64.nix Update haskell.nix for direct test exe call and use testWrapper Jun 7, 2019
nix-tools-default.nix Expose shellFor in nix-tools-default. May 30, 2019
nix-tools-iohk-extras.nix iohk-extras: add ghc865 Jun 11, 2019
nix-tools-iohk-module.nix Move cabal patch into patches section Jul 19, 2019
nix-tools-regenerate.nix Reduce closure size of regenerate script Jul 15, 2019
nix-tools-release.nix nix-tools-release.nix: allow easy disabling of jobs. Jul 22, 2019
release.nix Add skeleton project Jul 25, 2019
run-haskell.nix implementing overlays with haskellPackages Nov 7, 2018
stack-shell.nix initial commit of shared nix files across projects Nov 7, 2018
stack2nix-regenerate.nix Add stack2nix regeneration script Jan 22, 2019
stack2nix.nix

README.md

IOHK Common Nix Code

Build status

This repo contains build code and tools shared between IOHK projects.

  1. Pinned versions of input-output-hk/nixpkgs.
  2. Haskell.nix and nix-tools, plus package overlays and patches for cross-compiling to Windows.
  3. Scripts for regenerating code with nix-tools.
  4. Util functions such as source filtering.
  5. Nix builds of development tools such as HLint, ShellCheck, Stylish Haskell, SHC, cache-s3.
  6. Nix packages and overlay for the rust-cardano projects.
  7. A skeleton project demonstrating how to use iohk-nix and set up CI.

How to use in your project

See Starting a new project.

How to update the iohk-nix revision.

To get the latest version of iohk-nix, update the iohk-nix-src.json file in your project.

Download the JSON file from iohk-nix Buildkite, or run the following command:

$ nix-prefetch-git https://github.com/input-output-hk/iohk-nix | tee ./nix/iohk-nix-src.json

(You may need to install the nix-prefetch-git package beforehand.)

Some things may have changed which could break your build, so refer to the ChangeLog.

How to use Haskell.nix and stack-to-nix

Look in the "User Guide" section of the Haskell.nix Documentation.

After updating your Stackage LTS

If you have updated your project's Stackage LTS version, then you may need to update the iohk-nix revision in your project. The error message you may see is:

error: This version of stackage.nix does not know
  about the Stackage resolver X.Y.

  You may need to update haskell.nix to one
  that includes a newer stackage.nix.

If updating the LTS, the compiler version may also have been increased. Note that we maintain a patched GHC for cross-compiling to Windows. The GHC version that you use needs to be supported by iohk-nix. The error message in this case will be:

error: This version of Nixpkgs does not contain GHC x.y.z

In both of these cases, update the iohk-nix revision to the latest available using the instructions above.

Adding new GHC versions

To add support for a new GHC version in iohk-nix, first update its Nixpkgs version to one that provides that compiler, then work on adding the version to nix-tools-iohk-extras.nix.

Nix Gotchas

The gotchas folder is dedicated to typical Nix errors encountered while developing with Haskell and Nix. The hope is developers will add Nix related problems they've encountered and solved to this folder.

  • Gotcha 1 - attribute unbuildable missing (win32/unix dependency issues)
  • Gotcha 2 - more help with build problems
  • Gotcha 3 - filtering sources
  • Gotcha 4 - overriding version pins

When making changes to iohk-nix

Please document any change that might affect project builds in the ChangeLog. For example:

  • Bumping nixpkgs to a different branch.
  • Changing API (renaming attributes, changing function parameters, etc).
  • Bumping the haskell.nix version.

Also update the skeleton project if necessary.

You can’t perform that action at this time.