This adds support to haskell.nix for building for armv7a-android.
It includes
- various minor fixes
- a lot of bionic (libc) patches for ghc
- no gold on 32bit android
- android overlay: mostly static
- disable KTLS on openssl for android
* Support revisions
Cabal files are now obtained from the index tarball (as cabal does)
directly. This allows us to always pick the cabal file revision that
cabal would pick, without having to understand or reference hackage.
* Update nix-tools materialised plan for new tooling
* Update materialized files
* Eval on x86_64-linux
* Turn off full materialization check
* Replace pkgs.writeText with passAsFile
Nix derivations are already able to pass a attribute to the builder as a
file. This means we don't need to use pkgs.writeText to turn the
cabalFile attribute into a file, saving one derivation.
* Bump closure size limit to 540
---------
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
Adds GHC 9.4 and uses hadrian to build it.
This also updates the way iserv-proxy and remote-iserv are built as they now have their own package and gitlab repo.
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
* Add ciJobs and hydraJobs to the flake output
* Adds Cicero support.
* Includes only some darwin native builds in hydra release.nix required (to avoid OOM issues when everything is in there).
* devshell: better definition of PKG_CONFIG_PATH
that manually going through pkg-config of all packages.
Also filter out non-derivation from nativeBuildInputs.
* Add project.projectVariants that apply flake.variants modules
* Move projectOverlays.devhshell to haskellLib.devshellFor
* Add hydraJobs.devShell and flatten hydraJobs
Also moves the `rawFlake` code into a `haskellLib.mkFlake` function
* Unflatten hydraJobs and add ciJobs
It turns out it is nice to use system first in the hierarchy for cicero. Also both hydra and cicero are ok with a deep hierarchy of attributes.
* Refactoring
* Add mkFlakeCiJobs
* Avoid `:` in ciJobs and hydraJobs
* Use cabal names again in ciJobs
* More updates
Turns off code coverage by default.
Rename flattenChecks to mkFlakeChecks.
Adds flake packages to ciJobs and hydraJobs.
* Expand comment
In the past hydra didn't give good feedback on eval time errors. Deferring the errors was a way to get them into a build log (instead of the eval log that would get overwritten with the next eval).
I'm not sure how well this actually worked since it is super easy to introduce an eval time dependency on a broken project. For instance if you try to enumerate the components in a project haskell that failed to configure the error would be forced (in some cases a more cryptic one).
Now that hydra is better at reporting eval errors I think we should try to fail fast again.
* update llvm-hs llvm from 11 to 12
* allow passing version args to build-tools; fix llvm-hs build-tools, pass allRefs to builtins.fetchGit to allow fetching non-standard-refs (to mirror stack behaviour)
* Fix regex to match source-repository-package tag
Regex to tell ref from rev was wrong
* Fix fetchGit call when rev and sha256 unspecified
* Update expected output for unit test
* Auto retry concurrency check that keeps failing
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
* Fix ghcjs for time_t is 64bit in emscripten now.
* Fix error: qca2 has been removed, because it depended on qt4.
* Add spdx 3.18 materialization.
* Turn off building tests for wine-5.4 (due to IDL issue).
* Fix options-doc.nix.
* Comment added to force rebuild on hydra
* Remove webkitgtk24x-gtk3 mapping
Even just looking for `pkgs.webkitgtk24x-gtk3.version` crashes nix eval with:
```
error: webkitgtk24x-gtk3 has been removed because it's insecure. Please use webkitgtk.
```
* Pin hlint for tests
* Pin hlint for tests
* Add flake.variants
This allows flakes to easily include variations of the
project by with different project arguments.
Anything you can pass to `project.addModule` can be used.
For instance to include variants using ghc 9.2.4:
```
flake.variants.ghc924.compiler-nix-name = pkgs.lib.mkForce "ghc924";
```
Then use it with:
```
nix build .#ghc924:hello:exe:hello
```
This change also:
* Exposes add `combineFlakes` and `rawFlake` for more control over how flakes are combined.
* Includes package coverageReports to the `hydraJobs` of the flakes.
* Tries to make the materialisation concurrency test more reliable
* Determine if the tag is a ref or a rev
Test the `tag` attribute in the `cabal.project` file. If it looks like a
git hash, then assign it to `rev`. Otherwise, assign it to `ref`.
* ok
* ok
* lmao
* Address comments
* better if not present
* patch hpc to allow files to be used for the list of src dirs, hpc dirs, and includes
* delete trailing whitespace
* use Response Files for HPC arguments; delete unnecessary patch
* Add ghc patch based on what was merged upstream
* Fix coverage tests
* Update responseFile usage
* Enable coverage-no-libs test
Co-authored-by: Richard Wallace <rwallace@thewallacepack.net>
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
#1588 does not provide an implicit project the way cabal does. So for instance:
```
$ cabal unpack hello
$ cd hello-1.0.0.2
$ echo 'constraints: hello<0' >cabal.project.local
$ cabal build all
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] next goal: hello (user goal)
[__0] rejecting: hello-1.0.0.2 (constraint from project config
/Users/hamish/iohk/hello-1.0.0.2/cabal.project.local requires <0)
[__0] rejecting: hello-1.0.0.1, hello-1.0 (constraint from user target
requires ==1.0.0.2)
[__0] fail (backjumping, conflict set: hello)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: hello
```
So even though there was no `packages:` it is looking for the package in the default location (the default is `packages: ./*.cabal` according to the cabal docs).
I also checked that including `packages:` in `.local` does not change the implicit `packages: ./*.cabal` with:
```
$ cabal unpack split
$ echo 'packages: ./split-0.2.3.5' > cabal.project.local
$ cabal build hello:exe:hello split:lib:split
```
This adds support for using nix flakes commands with hix. This is done by creating a hidden `.hix-flake` directory and passing the source in using `--override-input`.
It also includes a `hix init` command to add a `flake.nix` and `nix/hix.nix` configuration file.
New versions of `srcOnly` pass the `prePatch` hook in and we `cd` into the sub directory for the package in that hook. This means that the output includes only the package subdirectory.
We worked around this, but the work around breaks for older nixpkgs where `prePatch` is not passed.
This change replaces the use of `srcOnly` and instead uses the same trick as source so that the `buildPhase` is replaced and runs in the expected source directory (including and it should still include any sibling directories that have not been filtered).
This adds a way to specify the `evalSystem` or `evalPackages` explicitly when calling the `project` functions.
Currently if we want to make a `flake` that supports multiple systems we have few options:
* Require builders for all the supported systems (even just for `nix flake show`).
* Pass `--impure` so that haskell.nix can see `builtins.currentSystem` to set up `pkgs.evalPackages` to use that. Unfortunately this prevents nix from caching some of the work it does and often results in it recalculating for each supported system when it would otherwise be cached and take no time at all.
* Add an overlay to replace `evalPackages`. This works, but it is not straight forward.
* Materialize the nix files for the project.
This change allows `evalSystem = "x86_64-linux";` to be passed telling `haskell.nix` to run `cabal` and `nix-tools` on that system. The user will have to have a builder for that system, but does not need to have builders for the others (unless building outputs for them).
* Provide an empty coverage report when package has no coverage
- When covering a project with multiple packages, the project coverage report
will produce a table of individual coverage reports for each package. The
links in this table don't go anywhere when a package is uncovered (they are
broken links).
- By producing an empty coverage report when a package has no coverage, we fix
the broken links, and provide a tad more information about the coverage
state of that package.
* Improve project coverage report index page
- Provide a link to the union/all coverage report.
- Format the reports as a list instead of a table of one column.
- Provide better explanation of what each report means.
* Add warning explaining modules with no coverage
- Modules that have no coverage at all are simply not included in the HTML
reports generated by HPC.
- Add a warning to the project coverage report index page so users are aware of
this limitation of HPC.
* Simplify interface of coverageReport
- Remove the concept of "package boundaries" from the "coverageReport" function.
- The "coverageReport" is now a function of:
- arbitrary checks generating tix files
- arbitrary mix modules
- This more closely reflects the usage of hpc, which doesn't care about package
boundaries.
- Use this new "coverageReport" function to simplify the "projectCoverageReport"
implementation. A project coverage report now simply:
- copies out constituent coverage reports.
- writes out an "all coverage report" using all checks in the project and all
mix modules..
- writes out a summary index page.
since it needs custom shell setup and knowledge not wanted/necessary for
many project. cabalWrapper can still be used from iohk-nix, until
underlying issue is handled natively by cabal.
Also remove packagesExes materialization attributes,
not really useful anymore, given faster evaluation of recent haskell.nix
Currently haskell.nix uses IFDs internally in a number of places. This prevents the use of `--option allow-import-from-derivation false` even when `materialized` nix is provided.
* Changes `materialize` function so that it returns the `materialized` path when possible instead of a derivation (updates import-and-filter-project.nix to cope with that).
* Materializes the spdx json file.
* Prevents haskell.nix looking for `cabal.project`, `cabal.project.local` and `cabal.project.freeze` files in hackage packages and the ghc-extra-projects.