Skip to content

Multiple cross compilers #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pins/iohk-nix-src.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"url": "https://github.com/input-output-hk/iohk-nix",
"rev": "4608304d2e02f0f8384d3aa7b7d89ffd2929dab7",
"date": "2019-05-15T17:20:14+08:00",
"sha256": "0kcaw0dan3gq7gigymgi96sgn46ibw6mgq5phz24jczn5ghsiai0",
"rev": "878d54831829175c5b2100f8df842ad466c015f7",
"date": "2019-05-16T16:19:30+08:00",
"sha256": "02ig850r3bdns1fzlf91bv04wvqibb53x58scildsz5fil1q9hyc",
"fetchSubmodules": false
}
6 changes: 3 additions & 3 deletions pins/nixpkgs-src.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"url": "https://github.com/input-output-hk/nixpkgs",
"rev": "c96f5924811f5a8576c9f03d3a630c491fbaf7a3",
"date": "2019-05-10T15:32:41+08:00",
"sha256": "0iagdz0q37ffkpzyh2f21wjb7x4gx257adlranchzc43460x65c1",
"rev": "4d29a3148c22967a440badbe7168f55efde4fa8f",
"date": "2019-05-16T16:13:21+08:00",
"sha256": "0lcibrzxdhmz4dk8d39vnhrwjvqf1k8djwwy7pvkg3bq23sw9mgd",
"fetchSubmodules": false
}
17 changes: 16 additions & 1 deletion release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ let

# fetch nixpkgs. iohk hydra doesn't provide <nixpkgs>, so we'll have to use
# a pinned one.
pkgs = importPinned "nixpkgs" {};
pkgs = importPinned "nixpkgs" { };

# cross system settings
mingwW64 = pkgs.lib.systems.examples.mingwW64;
arm32 = pkgs.lib.systems.examples.raspberryPi;
arm64 = pkgs.lib.systems.examples.aarch64-multiplatform;
js = pkgs.lib.systems.examples.ghcjs;

# import iohk-nix with the same pin as the nixpkgs above.
config = { allowUnfree = false; inHydra = true; allowUnsupportedSystem = true; };
Expand All @@ -23,6 +26,15 @@ let
x86_64-mingw32 = importPinned "iohk-nix"
{ inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-linux"; crossSystem = mingwW64; };

arm32-linux = importPinned "iohk-nix"
{ inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-linux"; crossSystem = arm32; };

arm64-linux = importPinned "iohk-nix"
{ inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-linux"; crossSystem = arm64; };

js-ghcjs = importPinned "iohk-nix"
{ inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-linux"; crossSystem = js; };

# jobs contain a key -> value mapping that tells hydra which
# derivations to build. There are some predefined helpers in
# https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support/release
Expand All @@ -47,6 +59,9 @@ let
# linux -> win32
# Note: we want to build the cross-compiler. As such we want something from the buildPackages!
"${mingwW64.config}-ghc864".x86_64-linux = x86_64-mingw32.pkgs.buildPackages.haskell.compiler.ghc864;
"${arm32.config}-ghc864".x86_64-linux = arm32-linux.pkgs.buildPackages.haskell.compiler.ghc864;
"${arm64.config}-ghc864".x86_64-linux = arm64-linux.pkgs.buildPackages.haskell.compiler.ghc864;
"${js.config}-ghc864".x86_64-linux = js-ghcjs.pkgs.buildPackages.haskell.compiler.ghc864;
};
in
jobs