Commit Graph

9 Commits

Author SHA1 Message Date
Michael Peyton Jones
1dce3ffcb3
Don't reference scripts directly in materialization messages (#945)
Instead, give a hint as to how to get the appropriate scripts
as attributes.

Fixes #456, #877.
2020-11-27 00:33:51 +13:00
Michael Peyton Jones
141cd02f29
Fix path to nix-hash (#664) 2020-06-10 12:10:06 +12:00
Michael Peyton Jones
908a3114d8
Materialization: add scripts for fixing materialized files and shas, expose via passthru and errors (#653)
* Add script for fixing materialized files

This is useful in two ways:
- We reference it in the error message, so users can more easily
copy-paste the correct call, rather than several lines of commands.
- We add it to `passthru`, so users can reference it directly when they
know they need to update the files, without having to first run a build
and find it on stderr.

* Add script for calculating the sha

This is useful in two ways:
- It makes it easier for users to copy from the message.
- We add it to `passthru` so users can call it directly if they know
they need to update the sha, without having to run a build and copy it
from stderr.

* Refactor unchecked a bit

Put the positive logic first, use the materialized files by preference
if they're there.

* Allow the updater script to take an argument

* Use double brackets

* Fix a dependency

* Separate generating and updating scripts
2020-06-08 22:19:20 +12:00
Hamish Mackenzie
6dc93ce1d4
Fix missing -lnuma when linking musl test exes (#652)
Also:

* Reduce the number of calls to override functions

* cp -L is not needed for user to cp calculateNoHash

* Update dummy-ghc files
2020-06-05 12:54:33 +12:00
Hamish Mackenzie
3356114206
Symlinks in materialized cause permissions err (#650) 2020-06-04 19:57:50 +08:00
Hamish Mackenzie
e4d75d61f1
Allow materialized only (#563)
This change allows for just the materialized argument to be passed
and removes the sha256 values for haskell.nix's own materialized
nix files.
2020-04-27 23:20:32 +12:00
Hamish Mackenzie
d1102d342c
Add pins and materialization for ghc-boot-packages and ghc-extra-packages (#546)
* Include `tests` in path for cross compiled tests

* Add ghc-boot-packages-nix to haskellNixRoots

* Fix naming warnings in tests sources

* Uses a single cleanGit call for all the tests

* Add memoize code for ghc-boot and ghc-extra pkgs

* Memoize ghc-boot and ghc-extra pkgs nix

* Fix release.nix being more strict than ci.nix by updating filterAttrsOnlyRecursive in ci-lib.nix

* Nicer errors when materialized path does not exist

* Updated materialization docs

* Add internalHackageIndexState to set the index-state used within haskell.nix
2020-04-20 13:27:52 +12:00
Hamish Mackenzie
fbeb1e09aa
Fix issue with materialize and sandboxed builds (#399) 2020-03-04 17:06:24 +13:00
Hamish Mackenzie
f5d1f82952
Add support for materializing generated nix files (#356)
This change adds a `materialized` argument to the functions that
generate nix files with `plan-to-nix` and `stack-to-nix`.

* Provides `builtins.trace` messages with pointers on how to do so.

* Includes a `checkMaterialized` option that can be used
  to verify the materialized files.

* Documents how to script updates with `plan-nix` or `stack-nix`.

* Outputs warnings if materialized files are used without hash
  (or without an `index-state` for cabal projects).

* Provides materialized nix files for `alex`, `happy` and `hscolour`
2019-12-10 16:42:25 +13:00