dmd: Add (D language compiler).

This commit is contained in:
Vladimir Still 2014-01-10 19:09:52 +01:00 committed by Rok Garbas
parent ef94c2171c
commit b78871efa6
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,52 @@
{ stdenv, fetchurl, gcc, unzip, curl }:
stdenv.mkDerivation {
name = "dmd-2.064.2";
src = fetchurl {
url = http://downloads.dlang.org/releases/2013/dmd.2.064.2.zip;
sha256 = "1i0jdybigffwyb7c43j0c4aayxx3b93zzqrjxyw6zgp06yhi06pm";
};
buildInputs = [ gcc unzip curl ];
configurePhase = "";
patchPhase = ''
cp src/VERSION src/dmd/
cp license.txt src/phobos/LICENSE_1_0.txt
'';
buildPhase = ''
cd src/dmd
make -f posix.mak INSTALL_DIR=$out
export DMD=$PWD/dmd
cd ../druntime
make -f posix.mak INSTALL_DIR=$out DMD=$DMD
cd ../phobos
make -f posix.mak INSTALL_DIR=$out DMD=$DMD
cd ../..
'';
installPhase = ''
cd src/dmd
tee dmd.conf.default << EOF
[Environment]
DFLAGS=-I$out/import -L-L$out/lib
EOF
make -f posix.mak INSTALL_DIR=$out install
export DMD=$PWD/dmd
cd ../druntime
make -f posix.mak INSTALL_DIR=$out install
cd ../phobos
make -f posix.mak INSTALL_DIR=$out install
cd ../..
'';
meta = {
description = "D language compiler";
homepage = http://dlang.org/;
license = "open source, see included files";
maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -802,6 +802,8 @@ let
disper = callPackage ../tools/misc/disper { };
dmd = callPackage ../development/compilers/dmd { };
dmg2img = callPackage ../tools/misc/dmg2img { };
docbook2odf = callPackage ../tools/typesetting/docbook2odf {