diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2017-08-21 01:28:27 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2017-08-21 01:28:27 +0200 |
commit | 04cd1db2b76d275dfd06920787ed200e92e7d2d9 (patch) | |
tree | db1e9513ee1775e1151a5f07c09030a2bc60e474 /pkgs/development/compilers | |
parent | 5baea8f0eb5dd7ef275bf9711e49830775bff894 (diff) | |
parent | 1eb48d3b085ee6187e403f00f8d1f221776f0524 (diff) | |
download | nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.tar nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.tar.gz nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.tar.bz2 nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.tar.lz nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.tar.xz nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.tar.zst nixlib-04cd1db2b76d275dfd06920787ed200e92e7d2d9.zip |
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/adobe-flex-sdk/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/dmd/2.067.1.nix | 144 | ||||
-rw-r--r-- | pkgs/development/compilers/dmd/default.nix | 136 | ||||
-rw-r--r-- | pkgs/development/compilers/ghcjs/ghcjs.patch | 24 | ||||
-rw-r--r-- | pkgs/development/compilers/halvm/2.4.0.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/kotlin/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/ponyc/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/cargo.nix | 2 |
8 files changed, 251 insertions, 69 deletions
diff --git a/pkgs/development/compilers/adobe-flex-sdk/default.nix b/pkgs/development/compilers/adobe-flex-sdk/default.nix index 03cfee61ce48..ccb366ffe1cb 100644 --- a/pkgs/development/compilers/adobe-flex-sdk/default.nix +++ b/pkgs/development/compilers/adobe-flex-sdk/default.nix @@ -32,9 +32,9 @@ stdenv.mkDerivation rec { done ''; - meta = { + meta = { description = "Flex SDK for Adobe Flash / ActionScript"; - homepage = "http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_sdk.html#installation"; + homepage = "http://www.adobe.com/products/flex.html"; license = stdenv.lib.licenses.mpl11; platforms = stdenv.lib.platforms.unix; }; diff --git a/pkgs/development/compilers/dmd/2.067.1.nix b/pkgs/development/compilers/dmd/2.067.1.nix index 4dbe922ce811..3cf530e9e5e8 100644 --- a/pkgs/development/compilers/dmd/2.067.1.nix +++ b/pkgs/development/compilers/dmd/2.067.1.nix @@ -1,47 +1,122 @@ -{ stdenv, fetchurl, unzip, makeWrapper }: +{ stdenv, fetchFromGitHub +, makeWrapper, unzip, which +, curl, tzdata +}: -stdenv.mkDerivation { - name = "dmd-2.067.1"; +stdenv.mkDerivation rec { + name = "dmd-${version}"; + # This is the last version of dmd which is buildable without a D compiler. + # So we use this as a bootstrap version. + # The DMD frontend has been ported to D in 2.069.0 but idgen was already + # ported in 2.068.0. + version = "2.067.1"; - src = fetchurl { - url = http://downloads.dlang.org/releases/2015/dmd.2.067.1.zip; - sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94"; - }; + srcs = [ + (fetchFromGitHub { + owner = "dlang"; + repo = "dmd"; + rev = "v${version}"; + sha256 = "0fm29lg8axfmzdaj0y6vg70lhwb5d9rv4aavnvdd15xjschinlcz"; + }) + (fetchFromGitHub { + owner = "dlang"; + repo = "druntime"; + rev = "v${version}"; + sha256 = "1n2qfw9kmnql0fk2nxikispqs7vh85nhvyyr00fk227n9lgnqf02"; + }) + (fetchFromGitHub { + owner = "dlang"; + repo = "phobos"; + rev = "v${version}"; + sha256 = "0fywgds9xvjcgnqxmpwr67p3wi2m535619pvj159cgwv5y0nr3p1"; + }) + ]; + + sourceRoot = "."; + + postUnpack = '' + mv dmd-v${version}-src dmd + mv druntime-v${version}-src druntime + mv phobos-v${version}-src phobos + ''; + + # Compile with PIC to prevent colliding modules with binutils 2.28. + # https://issues.dlang.org/show_bug.cgi?id=17375 + usePIC = "-fPIC"; - nativeBuildInputs = [ unzip makeWrapper ]; + postPatch = '' + # Ugly hack so the dlopen call has a chance to succeed. + # https://issues.dlang.org/show_bug.cgi?id=15391 + substituteInPlace phobos/std/net/curl.d \ + --replace libcurl.so ${curl.out}/lib/libcurl.so - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' - # Allow to use "clang++", commented in Makefile - substituteInPlace src/dmd/posix.mak \ - --replace g++ clang++ \ - --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_ + # Ugly hack to fix the hardcoded path to zoneinfo in the source file. + # https://issues.dlang.org/show_bug.cgi?id=15391 + substituteInPlace phobos/std/datetime.d \ + --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/ - # Was not able to compile on darwin due to "__inline_isnanl" - # being undefined. - substituteInPlace src/dmd/root/port.c --replace __inline_isnanl __inline_isnan + substituteInPlace druntime/test/shared/Makefile \ + --replace "DFLAGS:=" "DFLAGS:=${usePIC} " + + # phobos uses curl, so we need to patch the path to the lib. + substituteInPlace phobos/posix.mak \ + --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4" + + # Use proper C++ compiler + substituteInPlace dmd/src/posix.mak \ + --replace g++ $CXX '' - + stdenv.lib.optionalString stdenv.isLinux '' - substituteInPlace src/dmd/root/port.c \ + + + stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' + substituteInPlace dmd/src/root/port.c \ --replace "#include <bits/mathdef.h>" "#include <complex.h>" - ''; + '' + + + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace dmd/src/posix.mak \ + --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_ + + # Was not able to compile on darwin due to "__inline_isnanl" + # being undefined. + substituteInPlace dmd/src/root/port.c --replace __inline_isnanl __inline_isnan + ''; + + nativeBuildInputs = [ makeWrapper unzip which ]; + buildInputs = [ curl tzdata ]; # Buid and install are based on http://wiki.dlang.org/Building_DMD buildPhase = '' - cd src/dmd + cd dmd make -f posix.mak INSTALL_DIR=$out - export DMD=$PWD/dmd + export DMD=$PWD/src/dmd + cd ../druntime + make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD + cd ../phobos + make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD + cd .. + ''; + + doCheck = true; + + checkPhase = '' + cd dmd + export DMD=$PWD/src/dmd cd ../druntime - make -f posix.mak INSTALL_DIR=$out DMD=$DMD + make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release cd ../phobos - make -f posix.mak INSTALL_DIR=$out DMD=$DMD - cd ../.. + make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release + cd .. ''; installPhase = '' - cd src/dmd + cd dmd mkdir $out mkdir $out/bin - cp dmd $out/bin + cp $PWD/src/dmd $out/bin + mkdir -p $out/share/man/man1 + mkdir -p $out/share/man/man5 + cp -r docs/man/man1/* $out/share/man/man1/ + cp -r docs/man/man5/* $out/share/man/man5/ cd ../druntime mkdir $out/include @@ -50,9 +125,11 @@ stdenv.mkDerivation { cd ../phobos mkdir $out/lib - ${let bits = if stdenv.is64bit then "64" else "32"; - osname = if stdenv.isDarwin then "osx" else "linux"; in - "cp generated/${osname}/release/${bits}/libphobos2.a $out/lib" + ${ + let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; + extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; in + "cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib" } cp -r std $out/include/d2 @@ -65,14 +142,17 @@ stdenv.mkDerivation { cd $out/bin tee dmd.conf << EOF [Environment] - DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--no-warn-search-mismatch -L--export-dynamic"} + DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC EOF ''; meta = with stdenv.lib; { - description = "D language compiler"; + description = "Official reference compiler for the D language"; homepage = http://dlang.org/; - license = licenses.free; # parts under different licenses + # Everything is now Boost licensed, even the backend. + # https://github.com/dlang/dmd/pull/6680 + license = licenses.boost; platforms = platforms.unix; }; } + diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index 41162c4e50e7..278a77f62903 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -1,44 +1,123 @@ -{ stdenv, fetchurl +{ stdenv, fetchFromGitHub , makeWrapper, unzip, which - +, curl, tzdata # Versions 2.070.2 and up require a working dmd compiler to build: , bootstrapDmd }: stdenv.mkDerivation rec { name = "dmd-${version}"; - version = "2.070.2"; + version = "2.075.1"; - src = fetchurl { - url = "http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.zip"; - sha256 = "1pbhxxf41v816j0aky3q2pcd8a6phy3363l7vr5r5pg8ps3gl701"; - }; + srcs = [ + (fetchFromGitHub { + owner = "dlang"; + repo = "dmd"; + rev = "v${version}"; + sha256 = "0kq6r8rcghvzk5jcphg89l85rg734s29bssd2rcw3fygx0k9a9k5"; + }) + (fetchFromGitHub { + owner = "dlang"; + repo = "druntime"; + rev = "v${version}"; + sha256 = "0idn2v1lmp7hl637g3i7pdfj9mjk4sclkz4cm77nl8873k2fhk8j"; + }) + (fetchFromGitHub { + owner = "dlang"; + repo = "phobos"; + rev = "v${version}"; + sha256 = "1a7q5fd15yspgs5plxgx54jyrcwgzlyw3rahmz04jd2s5h56dj04"; + }) + ]; - nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which ]; + sourceRoot = "."; - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' - # Allow to use "clang++", commented in Makefile - substituteInPlace src/dmd/posix.mak \ - --replace g++ clang++ \ - --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_ + postUnpack = '' + mv dmd-v${version}-src dmd + mv druntime-v${version}-src druntime + mv phobos-v${version}-src phobos ''; + # Compile with PIC to prevent colliding modules with binutils 2.28. + # https://issues.dlang.org/show_bug.cgi?id=17375 + usePIC = "-fPIC"; + + postPatch = '' + # Ugly hack so the dlopen call has a chance to succeed. + # https://issues.dlang.org/show_bug.cgi?id=15391 + substituteInPlace phobos/std/net/curl.d \ + --replace libcurl.so ${curl.out}/lib/libcurl.so + + # Ugly hack to fix the hardcoded path to zoneinfo in the source file. + # https://issues.dlang.org/show_bug.cgi?id=15391 + substituteInPlace phobos/std/datetime/timezone.d \ + --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/ + + substituteInPlace druntime/test/common.mak \ + --replace "DFLAGS:=" "DFLAGS:=${usePIC} " + + # phobos uses curl, so we need to patch the path to the lib. + substituteInPlace phobos/posix.mak \ + --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4" + + # Use proper C++ compiler + substituteInPlace dmd/posix.mak \ + --replace g++ $CXX + '' + + + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace dmd/posix.mak \ + --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_ + ''; + + nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which ]; + buildInputs = [ curl tzdata ]; + # Buid and install are based on http://wiki.dlang.org/Building_DMD buildPhase = '' - cd src/dmd + cd dmd make -f posix.mak INSTALL_DIR=$out - export DMD=$PWD/dmd + ${ + let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in + "export DMD=$PWD/generated/${osname}/release/${bits}/dmd" + } cd ../druntime - make -f posix.mak INSTALL_DIR=$out DMD=$DMD + make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD cd ../phobos - make -f posix.mak INSTALL_DIR=$out DMD=$DMD - cd ../.. + make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD + cd .. + ''; + + doCheck = true; + + checkPhase = '' + cd dmd + ${ + let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in + "export DMD=$PWD/generated/${osname}/release/${bits}/dmd" + } + cd ../druntime + make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release + cd ../phobos + make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release + cd .. ''; installPhase = '' - cd src/dmd + cd dmd mkdir $out mkdir $out/bin - cp dmd $out/bin + ${ + let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in + "cp $PWD/generated/${osname}/release/${bits}/dmd $out/bin" + } + + mkdir -p $out/share/man/man1 + mkdir -p $out/share/man/man5 + cp -r docs/man/man1/* $out/share/man/man1/ + cp -r docs/man/man5/* $out/share/man/man5/ cd ../druntime mkdir $out/include @@ -47,9 +126,11 @@ stdenv.mkDerivation rec { cd ../phobos mkdir $out/lib - ${let bits = if stdenv.is64bit then "64" else "32"; - osname = if stdenv.isDarwin then "osx" else "linux"; in - "cp generated/${osname}/release/${bits}/libphobos2.a $out/lib" + ${ + let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits; + osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; + extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; in + "cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib" } cp -r std $out/include/d2 @@ -62,14 +143,17 @@ stdenv.mkDerivation rec { cd $out/bin tee dmd.conf << EOF [Environment] - DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--no-warn-search-mismatch -L--export-dynamic"} + DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC EOF ''; meta = with stdenv.lib; { - description = "D language compiler"; + description = "Official reference compiler for the D language"; homepage = http://dlang.org/; - license = licenses.free; # parts under different licenses + # Everything is now Boost licensed, even the backend. + # https://github.com/dlang/dmd/pull/6680 + license = licenses.boost; platforms = platforms.unix; }; } + diff --git a/pkgs/development/compilers/ghcjs/ghcjs.patch b/pkgs/development/compilers/ghcjs/ghcjs.patch index 61bbb95b0a58..9f4fa3a8b7ae 100644 --- a/pkgs/development/compilers/ghcjs/ghcjs.patch +++ b/pkgs/development/compilers/ghcjs/ghcjs.patch @@ -2,7 +2,7 @@ diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs index db8b12e..7b815c5 100644 --- a/src-bin/Boot.hs +++ b/src-bin/Boot.hs -@@ -526,9 +526,7 @@ initPackageDB :: B () +@@ -540,9 +540,7 @@ initPackageDB :: B () initPackageDB = do msg info "creating package databases" initDB "--global" <^> beLocations . blGlobalDB @@ -12,7 +12,7 @@ index db8b12e..7b815c5 100644 initDB dbName db = do rm_rf db >> mkdir_p db ghcjs_pkg_ ["init", toTextI db] `catchAny_` return () -@@ -552,29 +550,22 @@ installDevelopmentTree = subTop $ do +@@ -566,29 +564,22 @@ installDevelopmentTree = subTop $ do msgD info $ "preparing development boot tree" checkpoint' "ghcjs-boot-git" "ghcjs-boot repository already cloned and prepared" $ do testGit "ghcjs-boot" >>= \case @@ -46,7 +46,25 @@ index db8b12e..7b815c5 100644 mapM_ patchPackage =<< allPackages preparePrimops buildGenPrim -@@ -1110,14 +1101,14 @@ cabalInstallFlags parmakeGhcjs = do +@@ -1141,7 +1132,7 @@ cabalStage1 pkgs = sub $ do + globalFlags <- cabalGlobalFlags + flags <- cabalInstallFlags (length pkgs == 1) + let args = globalFlags ++ ("install" : pkgs) ++ +- [ "--solver=topdown" -- the modular solver refuses to install stage1 packages ++ [ "--allow-boot-library-installs" + ] ++ map ("--configure-option="<>) configureOpts ++ flags + checkInstallPlan pkgs args + cabal_ args +@@ -1162,7 +1153,7 @@ cabalInstall pkgs = do + -- uses somewhat fragile parsing of --dry-run output, find a better way + checkInstallPlan :: [Package] -> [Text] -> B () + checkInstallPlan pkgs opts = do +- plan <- cabal (opts ++ ["-v2", "--dry-run"]) ++ plan <- cabal (opts ++ ["-vverbose+nowrap", "--dry-run"]) + when (hasReinstalls plan || hasUnexpectedInstalls plan || hasNewVersion plan) (err plan) + where + hasReinstalls = T.isInfixOf "(reinstall)" -- reject reinstalls +@@ -1201,14 +1192,14 @@ cabalInstallFlags parmakeGhcjs = do , "--avoid-reinstalls" , "--builddir", "dist" , "--with-compiler", ghcjs ^. pgmLocText diff --git a/pkgs/development/compilers/halvm/2.4.0.nix b/pkgs/development/compilers/halvm/2.4.0.nix index dd81d780838c..b88ac73c7e40 100644 --- a/pkgs/development/compilers/halvm/2.4.0.nix +++ b/pkgs/development/compilers/halvm/2.4.0.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { }; meta = { - homepage = http://github.com/GaloisInc/HaLVM; + homepage = https://github.com/GaloisInc/HaLVM; description = "The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen"; platforms = ["x86_64-linux"]; # other platforms don't have Xen maintainers = with stdenv.lib.maintainers; [ dmjio ]; diff --git a/pkgs/development/compilers/kotlin/default.nix b/pkgs/development/compilers/kotlin/default.nix index e23bee15e1bf..65c2125dfbca 100644 --- a/pkgs/development/compilers/kotlin/default.nix +++ b/pkgs/development/compilers/kotlin/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, makeWrapper, jre, unzip }: stdenv.mkDerivation rec { - version = "1.1.2-5"; + version = "1.1.4-2"; name = "kotlin-${version}"; src = fetchurl { url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip"; - sha256 = "0whfnn7wf8nil9lb8hl9bccjrzwf9zpbf8pz607zg9x3q8g01p9d"; + sha256 = "09sikwk5xxn4b30icbq28mjs4lm9xbj0bv5yjx75r165iz65g2cv"; }; propagatedBuildInputs = [ jre ] ; diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index ab7881a21514..f605f31c06dc 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation ( rec { name = "ponyc-${version}"; - version = "0.17.0"; + version = "0.18.0"; src = fetchFromGitHub { owner = "ponylang"; repo = "ponyc"; rev = version; - sha256 = "06g811x7vc275ypn3laqcsq7lmp2w8al6ipkpknhpq9c6lf7dvcp"; + sha256 = "0favj1895fp5j5i23cmjn9wvrrlchr2dmc18grlvbjr2cg2c76mg"; }; buildInputs = [ llvm makeWrapper which ]; diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 2d4d6ad4db1f..ac4102c9a63c 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec { doCheck = false; meta = with stdenv.lib; { - homepage = http://crates.io; + homepage = https://crates.io; description = "Downloads your Rust project's dependencies and builds your project"; maintainers = with maintainers; [ wizeman retrry ]; license = [ licenses.mit licenses.asl20 ]; |