Commit Graph

34 Commits

Author SHA1 Message Date
John A. Lotoski 09526c8555 Spelling, typo and whitespace fixes (#833)
* Spelling and typo fixes in doc and code comments
* Trailing whitespace or whitespace only truncation
* readTheDocs formatting corrections
2020-08-31 11:08:25 +12:00
Hamish Mackenzie cacfba0b45 Replace ghc 8.8.3 with 8.8.4 (#766)
Also adds some tooling/docs for adding new ghc versions (see `docs/adding-new-ghc.md`)
2020-07-21 14:10:23 +12:00
Hamish Mackenzie 4cac8bd00f Remove internal deps on default ghc and stackage (#738)
Changes to the interface of haskell.nix (from the changelog.md file):

* Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead.
* Removed `./nixpkgs` directory, use  `(import ./. {}).sources`
  or `./nix/sources.nix` instead.
* Removes V1 interface for details on how to fix old code see:
    https://github.com/input-output-hk/haskell.nix/issues/709
* Removed defaultCompilerNixName.
* cabalProject, cabalProject', hackage-project and hackage-package
  now require a `compiler-nix-name` argument.
* `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument.
  New functions `p.tool` and `p.tools` (where p is a project) do not.
  Like `shellFor { tools = ... }` they will use the compiler nix name
  from the project (including stack projects where it is derived from
  the resolver).
* `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use
  `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
  the hpack exe now).
* `haskell-nix.cabal-install` -> 
  `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`

Other changes:

Adds hpack executable to the nix-tools derivations.

Adds a `cabal-hpack` test to make sure `hpack` works with
`cabalProject`.

Reduces the number of calls to `cabalProject` (particularly when
checking materialization), by giving internal tools a per-compiler
attribute.

Uses happy 1.19.12 when building newer ghc versions.

Updates cabal-install 3.2.0.0 to use the source from github that
is compatible with ghc 8.10.1.

Updates the docs for callCabalProjectToNix.

Adds a license mapping to fix a common warning.
2020-07-08 22:54:01 +12:00
Hamish Mackenzie 29a9b936eb Test cabalProject when src is a non store path (#752) 2020-07-07 21:13:27 +12:00
Domen Kožar 59cf05606e module: generate using markdown template (#693)
The main motivation is that each option now is a heading and
such a link!
2020-06-16 17:13:04 +08:00
Hamish Mackenzie 5a8b3cb5da Check that materialize does not limit concurrency (#699)
Adding materialize call to a derivation should not prevent nix form
building it concurrently with other derivations.

This test makes sure that is the case.
2020-06-16 21:02:37 +12:00
Hamish Mackenzie edc948e0e8 Update nixpkgs 20.03 (matches with iohk-nix) (#671)
* Use hydra-migration in check-hydra.nix

* mkdocs fix is now in nixpkgs 20.03 (so this drops our work around)

* Adds sanity checks for #660

* Add missing ${targetPrefix} to NIX_LDFLAGS

* Use eval system for callStackToNix.

* Improves pins.
2020-06-14 22:54:03 +12:00
Michael Peyton Jones 701c83fb43 Update nixpkgs pins to include 20.03 (#557)
* Update nixpkgs pins to include 20.03, wobble

- Add 20.03
- Remove 19.03 (and old 18.09 file)
- Update 19.09 to latest
- Update github pin to 20.03
- Remove workarounds for 19.03

* Mark openssl as allowedInsecure

* Force python3 for mkdocs
2020-04-29 02:49:36 +12:00
Moritz Angermann 28b8e2244a Update update-index-state-hashes.nix 2020-03-26 14:17:32 +08:00
Michael Peyton Jones b6a8a97249 Get the hackage index tarball at runtime, not eval time (#512)
* Get the hackage index tarball at runtime, not eval time
* Get rid of special case for update-hackage

Fixes #507.
2020-03-25 20:26:31 +08:00
Michael Peyton Jones 64700ae79e CI: share between ci.nix and release.nix (#504)
* Define release.nix in terms of ci.nix

Beef up ci.nix to handle the same things as release.nix, then implement
the one in terms of the other.

* Fix infinite loop in evaluating release.nix with high ifdLevel

* Add tests to cross-compile

* Remove obsolete fix

* Do generic platform filtering

* Undefined variable

* Extract ci-lib.nix

* More undefined variables

* Use filterAttrsOnlyRecursive to avoid forcing all the drv attributes

* Set ifdLevel 0 to see if it fixes hydra eval

* Turn off tests on aarch64 cross

* Ifd level 1

* Ifd level 2

* Ifd level 3

* Maybe it's required that's too big?

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-03-25 11:20:58 +00:00
Moritz Angermann 2232e06112 bump scripts 2020-03-06 21:52:05 +08:00
Hamish Mackenzie 8e52ad6f96 Automatically generate cache for stackage projects (#397)
You can add a `# nix-sha256` comment to stack.yaml if you
need it to work in restricted mode.
2020-01-15 10:34:14 +13:00
Hamish Mackenzie a9b01221dd Replace collectRunComponents with haskellLib.check (#316)
This change replaces `passthru.run` and `collectRunComponents` with
`haskellLib.check` and `$pkg.checks`.

Uses `ln -s` instead of `cp` for DLLs to avoid duplicating them.

Adds features to help debugging eval issues with haskell.nix/release.nix.
The ifdInputLevel can be set to limit the jobs included to control
how much work is done at the eval stage when looking for issues.

Reduce CI times by excluding older ghc versions from haskellNixRoots
(GHC 8.6.3 and 8.6.4)

Sets `preferLocalBuild=false` on `callCabalProjectToNix` and `callStackToNix`
to ensure they are cached on hydra for both Linux and macOS.

Fix `data-dir:` when cleaning components.
`normalizeRelativeDir` adds a slash on to the end of `dataDir`.
Adding another one here results in `//` and files are left out by
mistake.
2019-11-29 23:28:47 +13:00
Hamish Mackenzie a5f9f45922 Test setup deps issue depending on ghc and Cabal (#278)
Projects like asterius and leksah that include dependencies on ghc. Sometimes the are needed by a setup.hs file (as is the case for the binaryen package used by asterius). The recent overlays merge broke this and #279 was needed to allow reinstallableLibGhc to be used to fix it. This PR adds a test case to make sure it is not inadvertently broken again. Also gives us a place to try out better ways to make this type of package work.* Test setup deps issue depending on ghc and Cabal

* Uses nixpkgs 19.09 + macOS wine fix on hydra/buildkite

* Enables macOS hydra tests

* disables musl tests for now

* Adds haskellNixRoots to tests

* Uses reinstallableLibGhc to fix the new setup-depends test

* Adds meta.platforms to haskell.nix components

* Set meta.platforms on cabal-install

* Builds some maintainer-scripts on hydra

* Pins hackage index-state for ghc-extra-packages
2019-11-01 12:34:10 +13:00
Michael Peyton Jones bec812b3e4 update-hackage: actually modify the hacakge.nix copy of the index state (#187) 2019-06-24 12:32:33 +02:00
Rodney Lorrimar 62984c91c2 docs: Remove build directory paths from generated text (#184)
Removes paths such as /var/lib/buildkite-agent/builds/buildkite-packet-3/input-output-hk/haskell-dot-nix/ from the generated docs.
2019-06-21 12:14:45 +10:00
Rodney Lorrimar 2e49d28de0 Reduce closure size of nix-tools (#178)
* Buildkite: Add a test for nix-tools closure size

The limit is a rather generous 500MB.

* nix-tools: Reduce closure size

1. Run justStackExecutables on hpack to remove dependency on ghc and
   libraries.

   Ideally we would be using the component builder on hpack.

2. Replace nix-prefetch-scripts with nix-prefetch-git. stack.yaml
   supports mercurial repositories but I've never seen it used.
2019-06-15 07:18:06 +02:00
Rodney Lorrimar 097852792d Fix daily Hackage update (#177)
Hackage hasn't been updated for a week because of a build error.
2019-06-15 07:16:52 +02:00
Rodney Lorrimar e15f235319 More documentation (#179)
* docs: Fix notes about .nix-tools.cache

Relates to #57

* docs: Add note about Cabal 2.4 requirement

Fixes #164

* docs: Autogenerate module option reference

* docs: Update library reference

* Buildkite: enable docs build on branches
2019-06-15 07:11:52 +02:00
Moritz Angermann 03fd50f0b7 Run the nightly scripts to also update the index-state-hashes (#146)
* Run the nightly scripts to also update the index-state-hashes

This moves the index-state-hashes to `hackage.nix` as well.  Thus
we need to have a least one hackage.nix update in.

* fix import

* Update update-index-state-hashes.nix

Add comments.
2019-06-08 15:21:02 +08:00
Rodney Lorrimar 554b504a52 Buildkite: really fix dependencies of check-hydra script
Fix for #163 was missing something.

Failure was random because the repo is often already unpacked due to
the daily Hackage and Stackage update process.
2019-06-06 12:45:35 +10:00
Rodney Lorrimar db92702fc5 Buildkite: fix dependencies of check-hydra script (#163) 2019-06-06 08:50:38 +08:00
Rodney Lorrimar caf1f61267 Use release-lib.nix for Hydra (#161)
* Use release-lib.nix for Hydra jobset

* Buildkite: Add a script to check Hydra evaluation
2019-06-03 11:26:28 +08:00
Rodney Lorrimar 83dba934ee Fix docs build 2019-06-03 08:36:20 +10:00
Rodney Lorrimar 8e141af10a Automatically update gh-pages branch when docs change (#159) 2019-06-03 07:41:46 +10:00
Rodney Lorrimar 940d119fe0 Buildkite: Final fixes for hackage.nix/stackage.nix updates 2019-04-04 12:43:48 +10:00
Rodney Lorrimar ad7c7ab4ef Buildkite: Fix daily update git push 2019-04-03 12:35:49 +10:00
Rodney Lorrimar 8d902b091b Fix updater script for json pins 2019-04-02 12:18:04 +10:00
Rodney Lorrimar b12e3b304e Nightly: Also update hackage-src.json and stackage-src.json 2019-04-02 11:30:32 +10:00
Jean-Baptiste Giraudeau 2a88d56aa4 update-stackage: update submodules on fresh checkout
otherwise we are missing out on new lts/nightlies.

 Also:
 - skip re-generation for existing resolver
 - better lts ordering in ltss.nix
2019-03-21 23:44:41 +01:00
Rodney Lorrimar dd51446974 Add Buildkite pipeline for updating hackage.nix and stackage.nix 2019-03-20 09:33:21 +10:00
Rodney Lorrimar a6d28bacb2 Add a script for updating the Stackage rev 2019-02-13 14:51:10 +10:00
Rodney Lorrimar 12076ea8f0 Add a script for updating the Hackage rev 2019-02-13 14:51:10 +10:00