diff --git a/pkgs/development/compilers/swift/compiler/default.nix b/pkgs/development/compilers/swift/compiler/default.nix index 651c6faa566ce..76d36e170a82b 100644 --- a/pkgs/development/compilers/swift/compiler/default.nix +++ b/pkgs/development/compilers/swift/compiler/default.nix @@ -190,6 +190,24 @@ let ''; }; + ninja' = + if stdenv.hostPlatform.isDarwin then + # https://github.com/NixOS/nixpkgs/issues/327836 + # Fail to build with ninja 1.12 on Hydra when host platform is darwin, but + # not on developers' local machines. + # Until we find out the exact cause, pin ninja to version 1.11 to + # workaround the problem. + ninja.overrideAttrs (old: rec { + version = "1.11.1"; + src = old.src.override { + rev = version; + hash = "sha256-LvV/Fi2ARXBkfyA1paCRmLUwCh/rTyz+tGMg2/qEepI="; + }; + patches = [ ]; + }) + else + ninja; + in stdenv.mkDerivation { pname = "swift"; inherit (sources) version; @@ -199,7 +217,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake git - ninja + ninja' perl # pod2man pkg-config python3