Commit Graph

20 Commits

Author SHA1 Message Date
iko
cc35ee60ea
Patched GHCJS 8.10 2022-08-02 13:27:30 +03:00
Hamish Mackenzie
82bc945818
Fix ghc 9 windows cross compilation (#1450)
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.
2022-05-19 20:21:16 +12:00
Hamish Mackenzie
0a847d9ab9
Fix ghcide 1.7 and ghc810420210212 (#1462) 2022-05-03 21:07:31 +12:00
Hamish Mackenzie
f707aa2e75
Fix hls conflict with unboxed tuple (#1457)
This is Maxim Koltsov's work around for building `haskell-language-server` with the haskell.nix compilers that include unboxed tuple patch.

See https://github.com/haskell/haskell-language-server/issues/2860#issuecomment-1110861573
2022-04-29 01:13:56 +12:00
Hamish Mackenzie
f67cf8e439
Use updated nix-tools (#1365) 2022-02-09 22:08:43 +13:00
Zhenya Vinogradov
6b7c7ad95c Fix singletons patch (#409)
The previous patch was based on a master git commit, not on the 2.5.1
release
2020-01-21 17:10:48 +08:00
Moritz Angermann
caa7375d41
Apply proper singletons patch. See d78e5ce3fb (#402) 2020-01-16 16:24:39 +08:00
Viktor Kronvall
4d43ee2219 Patch singletons to use modified Uniq type (#333) 2019-11-30 20:38:21 +08:00
Moritz Angermann
5884ab02be
Overlays (#261)
The Overlays branch

This is a major reorganization in how haskell.nix is used, and marks our 1.0 release.
The branch doesn't build due to numerous issues that we believe to be with the CI
and not this branch. We expect only very minor adjustments prior to calling this the
official 1.0 release.

* Move iohk-nix patches into haskell.nix

This moves the customizations we did in iohk-nix
into haskell.nix via overlays and config.

Add bootPkgs logic

this moves the nuking of bootPkgs where it belongs. This should eventually still be
removed and replaced by a proper solution, that doesn't require the nuking of
bootPkgs.

Allow us to bootstrap binary ghcs and a cabal-install

With this we can do the following:

```
$ nix repl compiler/old-ghc-nix
nix-repl> :b (let pkgs = import <nixpkgs> {}; in with import ./. {}; import ./compiler/bootstrap/cabal-install.nix { inherit (pkgs) fetchurl stdenv zlib; inherit hackage
; ghc = ghc844; src = pkgs.fetchurl { url = "https://github.com/haskell/cabal/archive/Cabal-v3.0.0.0-rc3.tar.gz"; sha256 = "1zl2mgg8307ykq3v8nmafc6zdhhj1cw7w8ffpap16dsm6
5lbnx33"; }; })
```

which wile it may look daunting, will allow us to bootstrap a
cabal-install with a ghc. From that point onwards, we should be able to
build any hackage package via haskell.nix.

Pass through cabal-install version

Better threading of arguments.

Add bootstrap overlay

Allow alex + happy to be built

This still has a wart: we need nix-tools, and for that we use the ghc865 from
nixpkgs. Ideally we'd build nix-tools against a specific ghc, but then
we'd need a build expression for that.

Make ghcjs work

Building something like this:
```
 nix build '(with import ./. { nixpkgs = ../nixpkgs; nixpkgsArgs = { crossSystem = { config = "js-unknown-ghcjs"; }; }; }; (haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; })).components.exes.hello'
```
will now work. Assuming `nixpkgs` has been appropriately patched to support the `js-unknown-ghcjs` triple.

Also: this will need an additional `Cabal` patch, to make `Cabal` understand what it needs to do with: `dist/build/hello/hello: copyFile: does not exist (No such file or directory)`

It needs to learn that `dist/build/hello/hello.jsexe` is what it wants to copy and that that is a directory.  Luckily we do have some code in Cabal already that does this for `.exe` on windows.

Build `js-unknown-ghcjs` packages with haskell.nix

Using the following expression:
```
with import ./. { nixpkgs = ../nixpkgs; nixpkgsArgs = { crossSystem = { config = "js-unknown-ghcjs"; }; }; };
let Cabal = buildPackages.haskell-nix.hackage-package {
    name = "Cabal"; version = "2.4.1.0";
    modules = [
        { packages.Cabal.patches = [ ./Cabal-install-folder.diff ]; }
    ];
}; in
(haskell-nix.hackage-package {
    name = "hello"; version = "1.0.0.2";
    modules = [
    	    ({config, ... }:{ packages.hello.package.setup-depends = [ Cabal ]; })
    ];}).components.exes.hello
```
in a `test.nix` file. And running
```
nix build -f ./test.nix
```
on it, will produce
```
./result
├── bin
│   └── hello.jsexe
│       ├── all.js
│       ├── all.js.externs
│       ├── index.html
│       ├── lib.js
│       ├── manifest.webapp
│       ├── out.frefs.js
│       ├── out.frefs.json
│       ├── out.js
│       ├── out.stats
│       ├── rts.js
│       └── runmain.js
└── share
    └── doc
        └── x86_64-linux-ghc-8.6.5
            └── hello-1.0.0.2
                └── LICENSE

6 directories, 12 files
```
2019-10-21 20:07:58 +08:00
Moritz Angermann
f4cc5ebcc6
Adds ghc865 logic (#167)
* Adds ghc865 logic

* Move nixpkgs pin back to nixos/nixpkgs
2019-06-08 15:29:27 +08:00
Moritz Angermann
662942cf9f
fix typo 2019-04-09 11:34:48 +08:00
Moritz Angermann
8c612394e8
add missing unix patch 2019-04-05 22:01:46 +08:00
Moritz Angermann
69ad0f1d28
adds 864 patches 2019-04-05 21:52:44 +08:00
Rodney Lorrimar
5e0d5e26bd
Update compiler-specific patches to add ghc864 2019-04-02 12:34:08 +10:00
Rodney Lorrimar
5c58240a67
Stable sort order for update-patches.sh 2019-04-02 12:34:08 +10:00
Moritz Angermann
3a6c2f823d
no patch versions 2019-01-18 16:03:54 +08:00
Moritz Angermann
5acc8b97fd
missing default.nix 2019-01-18 15:50:24 +08:00
Moritz Angermann
4050450b86
Allow patches to optionally depend on version and revision
This allows us to patch hackage packages to match those as shipped
with ghc; which we sadly have to.
2019-01-18 15:45:56 +08:00
Moritz Angermann
84bcfd77a3
better patches 2019-01-18 14:40:05 +08:00
Moritz Angermann
e1355cac7d
add ghc patches :( 2019-01-18 10:48:22 +08:00