* 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)
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).
- This allows nix run to work correctly, so that it knows the correct
name of the executable, as it would otherwise attempt to execute an
executable named "project-name-exe-exeName", for example.
- See #1231.
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).
We include the /bin directory of `component.libs` in `extra-lib-dirs` on windows, but not `components.pkgconfig`. This causes confusing differences between the behavior depending on how a dependency was specified in the `.cabal` file or added in a module. If it wounds up in `components.libs` the need for DLLs would propagate correctly, but if it was only in `componets.pkgconfig` DLLs would not be included when building TH code and did not get symlinked to `exe` component output /bin dirs.
This is a better fix to the problem of making DLLs available to the process running in wine that is used to evaluate TH code when cross compiling for Windows.
Also fixes macOS loadArchive in TH for ghc 9
Co-authored-by: Michael Peyton Jones <michael.peyton-jones@iohk.io>
* Adds small address space logic
* no numa on android
* Update comp-builder.nix
* Adds android.nix
* host And target.
* Make android remote-iserv static
* Add back mmap_next
* Create rts-android-jemalloc-qemu.patch
* Update bootstrap.nix
* Some android modifications to ghc
* Some modifications to the android overlay.
* disable more hardening flags on android
* Adds stack-protector-symbols.patch
* Adds libraries-prim-os-android.patch
* Adds support for CONDBR relocations
* Adds undef+weak symbol support.
* calloc takes 3 not 2 args :-(
* Adds getauxval
* Needs enable static now
* Fix android cross
Had a strange issue where eval of #955 and it might have been caused
by a the nix-tools library seeming to have no `.conf` files.
Since it seemed to go away by itself I think this was a nix GC issue
or something. Here is some code we could add to the builders to
double check the files are created if it turns out that is not the
case.
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
* factor out isSelectedComponent
* Optimise `flatLibDepends`
We no longer force the `outPath` attribute to avoid instantiating the
derivation, which is expensive
* Fix shellFor not accounting for transitive dependencies
ensure that the following invariant is enforced:
`shellFor` never adds the selected packages to its environment
* Fix missing selectedComponentsBitmap attribute
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
* Bump nix-tools to latest master revision
* Add writeHieFiles
* Update modules/plan.nix
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Move where the hie flags are specified
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Add test.
* wip
* Fix merge regression
* Combine drv, drv.source and drv.dist for doctest
* Skip cabal-doctests test when cross compiling
* Add the --no-magic flag to the .cabal file for the cabal-doctests test.
This appears to be necessary on OSX.
The --no-magic flag stops the doctest executable from expanding path
arguments, trying to locate the package db, etc.
This shouldn't be necessary with cabal-doctest, since all the
necessary options to pass to doctest are computed when running the Setup.hs
script.
See
https://github.com/input-output-hk/haskell.nix/pull/427#issuecomment-605761780.
* Fix cabal-doctest support
* Skip cabal-doctest test plan cross compiling
* More fixes for cabal-doctest
* Skip cabal-doctest tests when cross compiling
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
* Use emscripten branch of GHCJS for 8.6
* Adds release-linux-only.nix (for hydra with no mac builders)
* Sets HOME to a temp dir once per derivation to help performance of emcc
* Updates materialization
* Uses symlinks to reduce ghc derivation size for wrapped ghcjs
* Removes compiler-nix-name test
This test checked that the default compiler was overridden by the
compiler-nix-name arg. There is no default any more.
The GHCJS branches used include fixes for:
* hs$ret_1 typo (should be hs$ret1)
* A bignum issue
* Add `.debug` to build any component with DWARF dugug info on linux
(ghc >=8.10.2).
* Pass `enableDWARF` to `shellFor` for to get a shell where all the
components are the `.debug` ones.
`ghcOptions` has been moved from package and is now a list of strings.
old: packages.x.package.ghcOptions = "someGHCoption";
new: packages.x.ghcOptions = ["someGHCoption"];
To specify ghcOptions for all packages:
ghcOptions = ["someGHCoption"];
For a single component:
packages.x.compoents.library.ghcOptions = ["someGHCoption"];