coreclr: cleanup build

This commit is contained in:
Joerg Thalheim 2017-10-06 14:52:08 +01:00 committed by Roman Kuznetsov
parent 856995d8ca
commit e7fc83f1a6
2 changed files with 21 additions and 30 deletions

View File

@ -13,7 +13,6 @@
, liburcu , liburcu
, libuuid , libuuid
, libkrb5 , libkrb5
, ed
, debug ? false , debug ? false
}: }:
@ -43,52 +42,42 @@ stdenv.mkDerivation rec {
liburcu liburcu
libuuid libuuid
libkrb5 libkrb5
ed
]; ];
configurePhase = '' configurePhase = ''
patchShebangs build.sh # override to avoid cmake running
patchShebangs src/pal/tools/gen-buildsys-clang.sh patchShebangs .
''; '';
BuildArch = if stdenv.is64bit then "x64" else "x86"; BuildArch = if stdenv.is64bit then "x64" else "x86";
BuildType = if debug then "Debug" else "Release"; BuildType = if debug then "Debug" else "Release";
hardeningDisable = [ "strictoverflow" "format" ]; hardeningDisable = [
NIX_CFLAGS_COMPILE = [ "strictoverflow"
"-Wno-error=unused-result" "-Wno-error=delete-non-virtual-dtor" "format"
"-Wno-error=null-dereference"
]; ];
buildPhase = '' buildPhase = ''
./build.sh $BuildArch $BuildType runHook preBuild
./build.sh $BuildArch Release
# Try to make some sensible hierarchy out of the output runHook postBuild
pushd bin/Product/Linux.$BuildArch.$BuildType
mkdir lib2
mv *.so *.so.dbg lib2
mv bin lib3
mkdir lib4
mv Loader lib4
mv inc include
mv gcinfo include
mkdir bin
mkdir -p share/doc
mv sosdocsunix.txt share/doc
for f in * ; do test -f $f && mv -v $f bin; done
popd
''; '';
installPhase = '' installPhase = ''
mkdir -p $out runHook preInstall
cp -rv bin/Product/Linux.$BuildArch.$BuildType/* $out mkdir -p $out/share/dotnet $out/bin
cp -r bin/Product/Linux.$BuildArch.$BuildType/* $out/share/dotnet
for cmd in coreconsole corerun createdump crossgen ilasm ildasm mcs superpmi; do
ln -s $out/share/dotnet/$cmd $out/bin/$cmd
done
runHook postInstall
''; '';
meta = { meta = with stdenv.lib; {
homepage = http://dotnet.github.io/core/; homepage = http://dotnet.github.io/core/;
description = ".NET is a general purpose development platform"; description = ".NET is a general purpose development platform";
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
maintainers = with stdenv.lib.maintainers; [ obadz ]; maintainers = with maintainers; [ obadz ];
license = stdenv.lib.licenses.mit; license = licenses.mit;
}; };
} }

View File

@ -13177,7 +13177,9 @@ with pkgs;
comic-relief = callPackage ../data/fonts/comic-relief {}; comic-relief = callPackage ../data/fonts/comic-relief {};
coreclr = callPackage ../development/compilers/coreclr { }; coreclr = callPackage ../development/compilers/coreclr {
debug = config.coreclr.debug or false;
};
corefonts = callPackage ../data/fonts/corefonts { }; corefonts = callPackage ../data/fonts/corefonts { };