@@ -1,20 +1,15 @@
11{ stdenv, fetchurl, gcc, unzip, curl }:
22
33stdenv.mkDerivation {
4− name = "dmd-2.064.2";
4+ name = "dmd-2.066.1";
55
66 src = fetchurl {
7− url = http://downloads.dlang.org/releases/2013/dmd.2.064.2.zip;
8− sha256 = "1i0jdybigffwyb7c43j0c4aayxx3b93zzqrjxyw6zgp06yhi06pm";
7+ url = http://downloads.dlang.org/releases/2014/dmd.2.066.1.zip;
8+ sha256 = "1qifwgrl6h232zsnvcx3kmb5d0fsy7j9zv17r3b4vln7x5rvzc66";
99 };
1010
1111 buildInputs = [ gcc unzip curl ];
1212
13− configurePhase = "";
14− patchPhase = ''
15− cp src/VERSION src/dmd/
16− cp license.txt src/phobos/LICENSE_1_0.txt
17− '';
1813 buildPhase = ''
1914 cd src/dmd
2015 make -f posix.mak INSTALL_DIR=$out
@@ -28,25 +23,33 @@ stdenv.mkDerivation {
2823
2924 installPhase = ''
3025 cd src/dmd
31− tee dmd.conf.default << EOF
32− [Environment]
33− DFLAGS=-I$out/import -L-L$out/lib
34− EOF
35−
36− make -f posix.mak INSTALL_DIR=$out install
37− export DMD=$PWD/dmd
38− cd ../druntime
39− make -f posix.mak INSTALL_DIR=$out install
26+ mkdir $out
27+ mkdir $out/bin
28+ cp dmd $out/bin
29+
30+ cd ../druntime
31+ mkdir $out/include
32+ mkdir $out/include/d2
33+ cp -r import/* $out/include/d2
34+
4035 cd ../phobos
41− make -f posix.mak INSTALL_DIR=$out install
42− cd ../..
36+ mkdir $out/lib
37+ cp generated/linux/release/64/libphobos2.a $out/lib # for 64-bit version
38+
39+ cp -r std $out/include/d2
40+ cp -r etc $out/include/d2
41+
42+ cd $out/bin
43+ tee dmd.conf << EOF
44+[Environment]
45+DFLAGS=-I$out/include/d2 -L-L$out/lib -L--no-warn-search-mismatch -L--export-dynamic
46+EOF
4347 '';
4448
4549 meta = {
4650 description = "D language compiler";
4751 homepage = http://dlang.org/;
4852 license = "open source, see included files";
49− maintainers = with stdenv.lib.maintainers; [ vlstill ];
5053 platforms = stdenv.lib.platforms.unix;
5154 };
5255}