This is fairly nasty. We rely on overriding for TH support, but this then prevents us
from allowing to override in final flake.nix or similar expressions for the final build
package/component/executable. This even fails silently and TH just doesn't work.
This seems to be a larger topic around how we deal with TH, and module inheritance. We should not override
existing keys, but namespace them properly, and thus still allow overriding.
* 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>
* Remove some obsolete hackage-quirks
The `stlylish-haskell` plugin is updated and there was a `retrie`
release.
* hls 1.8 workarounds that still seem to be needed.
* Use hls 1.9 on GHC 9.0 and 9.2
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 `shell.allDeps` as a fix for #1793#1769 added all the tool dependencies of the hsPkgs in a project to the shell. This is great for cabal projects where the set of packages will be limited to those in the plan. It allows these packages to be rebuilt by cabal.
For stack projects however this set is much larger (all of stackage), likely to include unwanted tools and tools that may be broken.
This change adds `shell.allDeps` and defaults it to `false` for stack projects.
Fixes#1793
* Added comments
* Switch to enableNativeBignum = true when available
* Fix bitvec dependency on gmp
Adds https://github.com/Bodigrim/bitvec/pull/61
* Fix dynamic linking tests (now GMP is not always linked)
Co-authored-by: Tom McLaughlin <tom@codedown.io>
* Use inputMap for soruce of packages in custom repository
* Include inputMap for hspkg-builder to use
* Use inputMap for soruce of packages in custom repository
* Fix url replacement.
* Check all the urls
* Add comments
* 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
Instead of `buildPackages` which is actually pkgsBuildHost. This makes sure that tools like `gdb` and `gcc` that we might depend on indirectly are the purely native ones (not versions for cross compiling).
* 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)
* 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
* Fix for haskell-language-server 1.8
It looks like two of the plugins have not been updated in hackage yet (qualifyimportednames and stylishhaskell).
* Add modified ghcide patch for issue 1455
* hlint plugin only works with ghc902
Co-authored-by: cydparser <cydparser@gmail.com>
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.
We have been using `readFile` and `fromJSON` to read a `.json` a 60MB .json file. This change puts the information contained in the json file into `.nix` files that are imported when needed (rather than all at once). This seems to save around 1s at eval time.
Tested with:
```
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" {}'
time nix-instantiate -E '(import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "haskell-language-server" {}'
```
See also https://github.com/input-output-hk/nix-tools/pull/118
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).
Fixes Windows cross compilation for GHC 9.0 and 9.2.
Updates wine to use the version that is included with the chosen Nixpkgs (it used to be pinned to an older version).
Moves the configuration of the GHC source into the GHC derivation. This should make adding Hadrian support easier.
Propagates library dependences (not just pkgconfig ones) on windows so that any DLLs in those libraries can be copied for TH evaluation and to the `/bin` directory of executable components.
Adds gcc and mfcgthreads as library dependencies on Windows so that the DLLs they include will be found.
Use `$pkgsHostTarget` (instead of `ghc-pkg`) to find all the DLLs can copy them to the `/bin` directory of executable components.
Adds support for __int128_t and __uint128_t to language-c to fix aarch64-darwin builds.
Fixed reinstalling packages that come with patched versions in ghcjs.
For ghc 9.0.2 Haskell.nix will use the `stm`and `filepath` source that came with `ghc` when the version desired matches. This is because 9.0.2 shipped with packages that differ from the same version in hackage.
`reinstallableLibGhc` is fixed for GHC 8.10 and above. Rather than including a patch file this works by:
* Setting the `subDir` to the `compiler` directory when building. That way relative paths to other parts of the `ghc` source tree (outside the `compiler` directory) still work.
* Files that are needed, but generated when `ghc` builds are added from the `generated` output of the ghc derivation.
`nonReinstallablePkgs` is now sorted and deduplicated before it is used (this reduces the chance of rebuilds when the list is refactored).
When downloading a `repository` block we get a number of files (not just the index). For some repositories these files will be necessary for `cabal configure` and the vanilla ones created by haskell.nix will not work. This change keeps these extra files and combines them with the main hackage index using `lndir`, so that changes to the repo will not require a new copy of the hackage index in the store.
This change also introduces `inputMap` that allows flake or niv inputs to be used to pin repository. It also works with `source-repository-package` blocks.