dmd: 2.067.1 -> 2.070.2

dmd 2.070.2 requires a working dmd compiler to build.

Instead of downloading a pre-compiled binary blob, keep the previous
version (which does properly build from source) around as dmd_2_067_1,
and use that to bootstrap the new version.
This commit is contained in:
Tobias Geerinckx-Rice
2016-11-06 00:44:32 +01:00
parent c9bb753584
commit a66f9b2a02
3 changed files with 89 additions and 7 deletions
+11 -6
View File
@@ -1,14 +1,19 @@
{ stdenv, fetchurl, unzip, makeWrapper }:
{ stdenv, fetchurl
, makeWrapper, unzip, which
stdenv.mkDerivation {
name = "dmd-2.067.1";
# Versions 2.070.2 and up require a working dmd compiler to build:
, bootstrapDmd }:
stdenv.mkDerivation rec {
name = "dmd-${version}";
version = "2.070.2";
src = fetchurl {
url = http://downloads.dlang.org/releases/2015/dmd.2.067.1.zip;
sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94";
url = "http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.zip";
sha256 = "1pbhxxf41v816j0aky3q2pcd8a6phy3363l7vr5r5pg8ps3gl701";
};
nativeBuildInputs = [ unzip makeWrapper ];
nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
# Allow to use "clang++", commented in Makefile