diff --git a/pkgs/development/compilers/dmd/binary.nix b/pkgs/development/compilers/dmd/binary.nix index 6a99d42eff72..3a5d6b76cec8 100644 --- a/pkgs/development/compilers/dmd/binary.nix +++ b/pkgs/development/compilers/dmd/binary.nix @@ -5,7 +5,12 @@ let inherit (stdenv) hostPlatform; OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name; MODEL = toString hostPlatform.parsed.cpu.bits; -in stdenv.mkDerivation { +in + +# On linux pargets like `pkgsLLVM.dmd` `cc` does not expose `libgcc` +# and can't build `dmd`. +assert hostPlatform.isLinux -> (stdenv.cc.cc ? libgcc); +stdenv.mkDerivation { pname = "dmd-bootstrap"; inherit version;