forked from mirrors/nixpkgs
commit
c8c7cc1f09
|
@ -1,20 +1,15 @@
|
||||||
{ stdenv, fetchurl, gcc, unzip, curl }:
|
{ stdenv, fetchurl, gcc, unzip, curl }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "dmd-2.064.2";
|
name = "dmd-2.066.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://downloads.dlang.org/releases/2013/dmd.2.064.2.zip;
|
url = http://downloads.dlang.org/releases/2014/dmd.2.066.1.zip;
|
||||||
sha256 = "1i0jdybigffwyb7c43j0c4aayxx3b93zzqrjxyw6zgp06yhi06pm";
|
sha256 = "1qifwgrl6h232zsnvcx3kmb5d0fsy7j9zv17r3b4vln7x5rvzc66";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ gcc unzip curl ];
|
buildInputs = [ gcc unzip curl ];
|
||||||
|
|
||||||
configurePhase = "";
|
|
||||||
patchPhase = ''
|
|
||||||
cp src/VERSION src/dmd/
|
|
||||||
cp license.txt src/phobos/LICENSE_1_0.txt
|
|
||||||
'';
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd src/dmd
|
cd src/dmd
|
||||||
make -f posix.mak INSTALL_DIR=$out
|
make -f posix.mak INSTALL_DIR=$out
|
||||||
|
@ -28,25 +23,33 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cd src/dmd
|
cd src/dmd
|
||||||
tee dmd.conf.default << EOF
|
mkdir $out
|
||||||
[Environment]
|
mkdir $out/bin
|
||||||
DFLAGS=-I$out/import -L-L$out/lib
|
cp dmd $out/bin
|
||||||
EOF
|
|
||||||
|
|
||||||
make -f posix.mak INSTALL_DIR=$out install
|
|
||||||
export DMD=$PWD/dmd
|
|
||||||
cd ../druntime
|
cd ../druntime
|
||||||
make -f posix.mak INSTALL_DIR=$out install
|
mkdir $out/include
|
||||||
|
mkdir $out/include/d2
|
||||||
|
cp -r import/* $out/include/d2
|
||||||
|
|
||||||
cd ../phobos
|
cd ../phobos
|
||||||
make -f posix.mak INSTALL_DIR=$out install
|
mkdir $out/lib
|
||||||
cd ../..
|
cp generated/linux/release/64/libphobos2.a $out/lib # for 64-bit version
|
||||||
|
|
||||||
|
cp -r std $out/include/d2
|
||||||
|
cp -r etc $out/include/d2
|
||||||
|
|
||||||
|
cd $out/bin
|
||||||
|
tee dmd.conf << EOF
|
||||||
|
[Environment]
|
||||||
|
DFLAGS=-I$out/include/d2 -L-L$out/lib -L--no-warn-search-mismatch -L--export-dynamic
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "D language compiler";
|
description = "D language compiler";
|
||||||
homepage = http://dlang.org/;
|
homepage = http://dlang.org/;
|
||||||
license = "open source, see included files";
|
license = "open source, see included files";
|
||||||
maintainers = with stdenv.lib.maintainers; [ vlstill ];
|
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
{ stdenv, fetchurl, writeText, lib, dmd }:
|
{stdenv, lib, fetchgit, dmd}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "rdmd-2.064";
|
name = "rdmd-20141113";
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = https://raw2.github.com/D-Programming-Language/tools/2.064/rdmd.d;
|
|
||||||
sha256 = "0b1g3ng6bkanvg00r6xb4ycpbh9x8b9dw589av665azxbcraqrs1";
|
|
||||||
name = "rdmd-src";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ dmd ];
|
buildInputs = [ dmd ];
|
||||||
|
|
||||||
builder = writeText "drmd-builder.sh" ''
|
src = fetchgit {
|
||||||
source $stdenv/setup
|
url = git://github.com/D-Programming-Language/tools.git;
|
||||||
cp $src rdmd.d
|
rev = "f496c68ee4e776597bd7382aa47f05da698a69e";
|
||||||
dmd rdmd.d
|
sha256 = "0vbhmz8nbh8ayml4vad0239kfg982vqfyqqrjv6wrlnjah97n5ms";
|
||||||
mkdir -p $out/bin
|
};
|
||||||
cp rdmd $out/bin/
|
|
||||||
|
buildPhase = ''
|
||||||
|
dmd rdmd.d
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp rdmd $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Wrapper for D language compiler";
|
description = "Wrapper for D language compiler";
|
||||||
homepage = http://dlang.org/rdmd.html;
|
homepage = http://dlang.org/rdmd.html;
|
||||||
license = lib.licenses.boost;
|
license = lib.licenses.boost;
|
||||||
maintainers = with stdenv.lib.maintainers; [ vlstill ];
|
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue