on iko/ghcjs-patch-master help sign in
Fix ranlib issue on macOS (#354)

Because we `meta.platforms` was not set in `nix-tools/default.nix` we were not testing or caching `nix-tools` for macOS. As a result we missed that there was a need for the ranlib fix on `macOS`. This enables hydra builds of nix-tools on all platforms and fixes the resulting issue with `ranlib` in the `old-ghc-nix` version of ghc 8.4.4. Also enables hydra builds of the plan-nix to make sure dependencies of plan-nix are cached for darwin. And fixes the default `nix-tools` arg for `hackageTarball`.

commita28e3625ec050a045a2a31735085edb1d169f49c authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateMon 9 Dec 2019, 12:10 (7 years ago) parente127ab6
4 files changed+7−4
compiler/old-ghc-nix/old-ghc-nix.json+3−3 lib/call-cabal-project-to-nix.nix+1 nix-tools/default.nix+1 overlays/haskell.nix+2−1
compiler/old-ghc-nix/old-ghc-nix.json+3−3
@@ -1,7 +1,7 @@
11{
22 "url": "https://github.com/angerman/old-ghc-nix",
3− "rev": "c7c381f3ec5fb80e807271271f9df75ab7127f57",
4− "date": "2019-12-06T12:34:44+08:00",
5− "sha256": "0j1jwxfhcdz6h9qpvzz39kllhz6wb2bvgyy5irj6iav9ykp6xjin",
3+ "rev": "ee5e7181f681522f075e01a1875228188b03cc8c",
4+ "date": "2019-12-08T20:24:29+08:00",
5+ "sha256": "0ywvyjvyw9vm0qbf0a7k6zpsrzcz5wa7y16rfcs3wfv36plj3qd5",
66 "fetchSubmodules": false
77}
lib/call-cabal-project-to-nix.nix+1
@@ -160,6 +160,7 @@ let
160160 nativeBuildInputs = [ nix-tools ghc hpack cabal-install pkgs.rsync pkgs.git ];
161161 # Needed or stack-to-nix will die on unicode inputs
162162 LANG = "en_US.UTF-8";
163+ meta.platforms = pkgs.lib.platforms.all;
163164 preferLocalBuild = false;
164165 } // (if plan-sha256 == null
165166 then {}
nix-tools/default.nix+1
@@ -53,6 +53,7 @@ in
5353 name = "nix-tools";
5454 paths = builtins.attrValues hsPkgs.nix-tools.components.exes;
5555 buildInputs = [ makeWrapper ];
56+ meta.platforms = lib.platforms.all;
5657 # We wrap the -to-nix executables with the executables from `tools` (e.g. nix-prefetch-git)
5758 # so that consumers of `nix-tools` won't have to provide those tools.
5859 postBuild = ''
overlays/haskell.nix+2−1
@@ -165,7 +165,7 @@ self: super: {
165165 # TODO perhaps there is a cleaner way to get a suitable nix-tools.
166166
167167 # Produce a fixed output derivation from a moving target (hackage index tarball)
168− hackageTarball = { index-state, sha256, nix-tools ? self.nix-tools, ... }:
168+ hackageTarball = { index-state, sha256, nix-tools ? self.haskell-nix.nix-tools, ... }:
169169 assert sha256 != null;
170170 self.fetchurl {
171171 name = "01-index.tar.gz-at-${builtins.replaceStrings [":"] [""] index-state}";
@@ -390,6 +390,7 @@ self: super: {
390390 (filterSupportedGhc self.ghc-extra-projects));
391391 } // self.lib.optionalAttrs (ifdLevel > 1) {
392392 # Things that require two levels of IFD to build (inputs should be in level 1)
393+ inherit (self.haskell-nix) nix-tools;
393394 ghc-extra-packages = self.recurseIntoAttrs
394395 (filterSupportedGhc self.ghc-extra-packages);
395396 });