dmd: fix 32-bit build and some nitpicks

CC #4976.
This commit is contained in:
Vladimír Čunát 2014-11-14 14:11:38 +01:00
parent ea05587309
commit 961ed7c8b4

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gcc, unzip, curl }: { stdenv, fetchurl, unzip, curl }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "dmd-2.066.1"; name = "dmd-2.066.1";
@ -8,7 +8,7 @@ stdenv.mkDerivation {
sha256 = "1qifwgrl6h232zsnvcx3kmb5d0fsy7j9zv17r3b4vln7x5rvzc66"; sha256 = "1qifwgrl6h232zsnvcx3kmb5d0fsy7j9zv17r3b4vln7x5rvzc66";
}; };
buildInputs = [ gcc unzip curl ]; buildInputs = [ unzip curl ];
buildPhase = '' buildPhase = ''
cd src/dmd cd src/dmd
@ -34,7 +34,9 @@ stdenv.mkDerivation {
cd ../phobos cd ../phobos
mkdir $out/lib mkdir $out/lib
cp generated/linux/release/64/libphobos2.a $out/lib # for 64-bit version ${let bits = if stdenv.is64bit then "64" else "32"; in
"cp generated/linux/release/${bits}/libphobos2.a $out/lib"
}
cp -r std $out/include/d2 cp -r std $out/include/d2
cp -r etc $out/include/d2 cp -r etc $out/include/d2
@ -46,10 +48,11 @@ DFLAGS=-I$out/include/d2 -L-L$out/lib -L--no-warn-search-mismatch -L--export-dyn
EOF EOF
''; '';
meta = { meta = with stdenv.lib; {
description = "D language compiler"; description = "D language compiler";
homepage = http://dlang.org/; homepage = http://dlang.org/;
license = "open source, see included files"; license = licenses.free; # parts under different licenses
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
}; };
} }