-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
888: Update Haskell.nix r=KtorZ a=rvl Relates to #703. # Overview - [x] Updates the Haskell.nix version so that we can build for windows again. - [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once. - [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03. - [x] Provides a big bundle of scripts and tests that can be run on Windows. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888) [Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet) [Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest) [Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest) # Comments @angerman Please help - [x] Fix failure for missing `hsc2hs` - [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason) - [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`. - [ ] Evaluation is taking a rather long time (5+ hours) in Hydra. - [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix. - [ ] Tests for windows are built not not executed. The tests should be run under wine. # Next PRs - [ ] Fix failures in sqlite tests on Windows ⇒ #918. - [ ] Fix failure in launch command on Windows. - [ ] Fix the UTF-8 text issues on Windows ⇒ #914. - [ ] Add code which tells the windows command prompt to interpret ANSI color codes. - [ ] Identify other test failures and fix. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: Michael Bishop <[email protected]>
- Loading branch information
Showing
13 changed files
with
163 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Provides a function for fetching a GitHub repo from a JSON spec. | ||
{ name, specJSON }: | ||
|
||
let | ||
spec = builtins.fromJSON (builtins.readFile specJSON); | ||
in | ||
builtins.fetchTarball { | ||
inherit name; | ||
url = "${spec.url}/archive/${spec.rev}.tar.gz"; | ||
inherit (spec) sha256; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"url": "https://github.com/input-output-hk/haskell.nix", | ||
"rev": "fcba9447b31a0802fab15f46fa18d6b9675ab528", | ||
"date": "2019-11-02T21:33:00+13:00", | ||
"sha256": "0s7gdcjxv8y7bmbi7wd5cp8jlvdcn2bgf8kaqyy25x0bqcdafaz3", | ||
"fetchSubmodules": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
############################################################################ | ||
# Nixpkgs 19.03 with Haskell.nix overlay | ||
# | ||
# This works by importing the base Nixpkgs with extra config and | ||
# overlays provided by Haskell.nix. It will contain patched GHCs | ||
# suitable for cross-compiling to Windows, and the `haskell-nix` | ||
# component builder. | ||
# | ||
# To update the Nixpkgs version, use: | ||
# | ||
# nix-prefetch-git https://github.com/NixOS/nixpkgs-channels refs/heads/nixpkgs-19.03-darwin | tee nix/nixpkgs-src.json | ||
# | ||
# This will pick the latest revision on the 19.03 branch. | ||
# | ||
# To update the Haskell.nix version, use: | ||
# | ||
# nix-prefetch-git https://github.com/input-output-hk/haskell.nix | tee nix/haskell-nix-src.json | ||
# | ||
############################################################################ | ||
|
||
# Arguments to pass when importing nixpkgs. | ||
{ system ? builtins.currentSystem | ||
, crossSystem ? null | ||
, config ? {} | ||
}: | ||
|
||
let | ||
haskell-nix-src = import ./dep.nix { | ||
name = "haskell.nix"; | ||
specJSON = ./haskell-nix-src.json; | ||
}; | ||
nixpkgs = import ./dep.nix { | ||
name = "nixpkgs"; | ||
specJSON = ./nixpkgs-src.json; | ||
}; | ||
|
||
haskellNixArgs = import haskell-nix-src; | ||
|
||
# Merge config and overlays provided by Haskell.nix into | ||
# our own nixpkgs args. | ||
args = haskellNixArgs // { | ||
inherit system crossSystem; | ||
config = (haskellNixArgs.config or {}) // config; | ||
overlays = (haskellNixArgs.overlays or []) ++ overlays; | ||
}; | ||
|
||
overlays = []; | ||
in | ||
import nixpkgs args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"url": "https://github.com/NixOS/nixpkgs", | ||
"rev": "a8f81dc037a5977414a356dd068f2621b3c89b60", | ||
"date": "2019-10-13T18:41:59-04:00", | ||
"sha256": "01z13axll5g5yl00lz9adr2jw2bs12g9skhbb1vxy8p7fjjbhhhm", | ||
"fetchSubmodules": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
(import ./default.nix {}).shell | ||
let | ||
self = import ./default.nix {}; | ||
# a shell that only has basic CI tools, and no dependencies | ||
ci-shell = self.pkgs.stdenv.mkDerivation { | ||
name = "ci-shell"; | ||
buildInputs = [ self.pkgs.haskellPackages.stylish-haskell self.iohkLib.hlint ]; | ||
}; | ||
in self.shell // { inherit ci-shell; } |