Merge commit '3a59cd87f26cc59c91fb821749b1ec0d64922f87' into mingw32-w64-fix

This commit is contained in:
John Ericson
2017-12-29 14:24:10 -05:00
3957 changed files with 75662 additions and 53190 deletions

View File

@@ -1,13 +1,14 @@
{ stdenv, buildRebar3, fetchHex }:
{ name, version, sha256
, builder ? buildRebar3
, hexPkg ? name
, ... }@attrs:
with stdenv.lib;
let
pkg = self: buildRebar3 (attrs // {
pkg = self: builder (attrs // {
src = fetchHex {
pkg = hexPkg;

View File

@@ -1,16 +1,68 @@
{ stdenv, pkgs }:
{ stdenv, pkgs, erlang }:
let
self = rec {
hexPackages = import ./hex-packages.nix { stdenv = stdenv; callPackage = self.callPackage; pkgs = pkgs; };
callPackage = pkgs.lib.callPackageWith (pkgs // self // hexPackages);
buildRebar3 = callPackage ./build-rebar3.nix {};
buildHex = callPackage ./build-hex.nix {};
buildErlangMk = callPackage ./build-erlang-mk.nix {};
buildMix = callPackage ./build-mix.nix {};
inherit (stdenv.lib) getVersion versionAtLeast makeExtensible;
## Non hex packages
hex = callPackage ./hex {};
webdriver = callPackage ./webdriver {};
};
in self // self.hexPackages
lib = pkgs.callPackage ./lib.nix {};
# FIXME: add support for overrideScope
callPackageWithScope = scope: drv: args: stdenv.lib.callPackageWith scope drv args;
mkScope = scope: pkgs // scope;
packages = self:
let
defaultScope = mkScope self;
callPackage = drv: args: callPackageWithScope defaultScope drv args;
in
import ./hex-packages.nix {
inherit pkgs stdenv callPackage;
} // rec {
inherit callPackage erlang;
beamPackages = self;
rebar = callPackage ../tools/build-managers/rebar { };
rebar3-open = callPackage ../tools/build-managers/rebar3 {
hermeticRebar3 = false;
};
rebar3 = callPackage ../tools/build-managers/rebar3 {
hermeticRebar3 = true;
};
hexRegistrySnapshot = callPackage ./hex-registry-snapshot.nix { };
fetchHex = callPackage ./fetch-hex.nix { };
buildRebar3 = callPackage ./build-rebar3.nix {};
buildHex = callPackage ./build-hex.nix {};
buildErlangMk = callPackage ./build-erlang-mk.nix {};
buildMix = callPackage ./build-mix.nix {};
# BEAM-based languages.
elixir = elixir_1_5;
elixir_1_5 = lib.callElixir ../interpreters/elixir/1.5.nix {
inherit rebar erlang;
debugInfo = true;
};
elixir_1_4 = lib.callElixir ../interpreters/elixir/1.4.nix {
inherit rebar erlang;
debugInfo = true;
};
elixir_1_3 = lib.callElixir ../interpreters/elixir/1.3.nix {
inherit rebar erlang;
debugInfo = true;
};
lfe = lfe_1_2;
lfe_1_2 = lib.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; };
# Non hex packages
hex = callPackage ./hex {};
webdriver = callPackage ./webdriver {};
hex2nix = callPackage ../tools/erlang/hex2nix {};
cuter = callPackage ../tools/erlang/cuter {};
relxExe = callPackage ../tools/erlang/relx-exe {};
};
in makeExtensible packages

View File

@@ -1182,7 +1182,7 @@ let
systems to query, augment and transform data
according to Elixir matching rules. '';
license = stdenv.lib.licenses.mit;
homepage = "http://github.com/awetzel/adap";
homepage = "https://github.com/awetzel/adap";
};
} // packageOverrides)
) {};
@@ -6660,7 +6660,7 @@ let
requests and responds to preflight requests
(OPTIONS)'';
license = stdenv.lib.licenses.asl20;
homepage = "http://github.com/mschae/cors_plug";
homepage = "https://github.com/mschae/cors_plug";
};
} // packageOverrides)
) {};
@@ -9498,7 +9498,7 @@ let
H-metric are abstracted away - you provide them
as functions.'';
license = stdenv.lib.licenses.bsd3;
homepage = "http://github.com/herenowcoder/eastar";
homepage = "https://github.com/herenowcoder/eastar";
};
} // packageOverrides)
) {};
@@ -12266,7 +12266,7 @@ let
response. This project is a rewrite for Elixir
and Plug of basho webmachine.'';
license = stdenv.lib.licenses.mit;
homepage = "http://github.com/awetzel/ewebmachine";
homepage = "https://github.com/awetzel/ewebmachine";
};
} // packageOverrides)
) {};
@@ -22613,7 +22613,7 @@ let
meta = {
description = ''JWT decoding library for Elixir'';
license = stdenv.lib.licenses.mit;
homepage = "http://github.com/mschae/jwtex";
homepage = "https://github.com/mschae/jwtex";
};
} // packageOverrides)
) {};
@@ -30269,7 +30269,7 @@ let
according to rfc7239 and fill `conn.remote_ip`
with the root client ip.'';
license = stdenv.lib.licenses.mit;
homepage = "http://github.com/awetzel/plug_forwarded_peer";
homepage = "https://github.com/awetzel/plug_forwarded_peer";
};
} // packageOverrides)
) {};
@@ -30472,7 +30472,7 @@ let
meta = {
description = ''An elixir plug that serves HTTP range requests'';
license = stdenv.lib.licenses.mit;
homepage = "http://github.com/TheSquad/plug_range";
homepage = "https://github.com/TheSquad/plug_range";
};
} // packageOverrides)
) {};
@@ -36106,7 +36106,7 @@ let
use a rails-like trailing format:
http://api.dev/resources.format'';
license = stdenv.lib.licenses.asl20;
homepage = "http://github.com/mschae/trailing_format_plug";
homepage = "https://github.com/mschae/trailing_format_plug";
};
} // packageOverrides)
) {};
@@ -38938,7 +38938,7 @@ let
meta = {
description = ''stream zip archives while building them'';
license = stdenv.lib.licenses.bsd3;
homepage = "http://github.com/dgvncsz0f/zipflow";
homepage = "https://github.com/dgvncsz0f/zipflow";
};
} // packageOverrides)
) {};

View File

@@ -46,7 +46,7 @@ let
meta = {
description = "Package manager for the Erlang VM https://hex.pm";
license = stdenv.lib.licenses.mit;
homepage = "https://github.com/hexpm/hex";
homepage = https://github.com/hexpm/hex;
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
};

View File

@@ -1,4 +1,4 @@
{ pkgs }:
{ pkgs, stdenv }:
rec {
@@ -34,4 +34,48 @@ rec {
mkDerivation = pkgs.makeOverridable builder;
};
/* Uses generic-builder to evaluate provided drv containing Elixir version
specific data.
drv: package containing version-specific args;
builder: generic builder for all Erlang versions;
args: arguments merged into version-specific args, used mostly to customize
dependencies;
Arguments passed to the generic-builder are overridable.
Please note that "mkDerivation" defined here is the one called from 1.4.nix
and similar files.
*/
callElixir = drv: args:
let
inherit (stdenv.lib) versionAtLeast;
builder = callPackage ../interpreters/elixir/generic-builder.nix args;
in
callPackage drv {
mkDerivation = pkgs.makeOverridable builder;
};
/* Uses generic-builder to evaluate provided drv containing Elixir version
specific data.
drv: package containing version-specific args;
builder: generic builder for all Erlang versions;
args: arguments merged into version-specific args, used mostly to customize
dependencies;
Arguments passed to the generic-builder are overridable.
Please note that "mkDerivation" defined here is the one called from 1.2.nix
and similar files.
*/
callLFE = drv: args:
let
inherit (stdenv.lib) versionAtLeast;
builder = callPackage ../interpreters/lfe/generic-builder.nix args;
in
callPackage drv {
mkDerivation = pkgs.makeOverridable builder;
};
}

View File

@@ -3,18 +3,16 @@
%%! -smp enable
%%% ---------------------------------------------------------------------------
%%% @doc
%%% The purpose of this command is to prepare a rebar3 project so that
%%% rebar3 understands that the dependencies are all already
%%% installed. If you want a hygienic build on nix then you must run
%%% this command before running rebar3. I suggest that you add a
%%% `Makefile` to your project and have the bootstrap command be a
%%% dependency of the build commands. See the nix documentation for
%%% The purpose of this command is to prepare a mix project so that mix
%%% understands that the dependencies are all already installed. If you want a
%%% hygienic build on nix then you must run this command before running mix. I
%%% suggest that you add a `Makefile` to your project and have the bootstrap
%%% command be a dependency of the build commands. See the nix documentation for
%%% more information.
%%%
%%% This command designed to have as few dependencies as possible so
%%% that it can be a dependency of root level packages like rebar3. To
%%% that end it does many things in a fairly simplistic way. That is
%%% by design.
%%% This command designed to have as few dependencies as possible so that it can
%%% be a dependency of root level packages like mix. To that end it does many
%%% things in a fairly simplistic way. That is by design.
%%%
%%% ### Assumptions
%%%
@@ -37,7 +35,7 @@ main(Args) ->
%% @doc
%% This takes an app name in the standard OTP <name>-<version> format
%% and returns just the app name. Why? because rebar is doesn't
%% and returns just the app name. Why? Because rebar doesn't
%% respect OTP conventions in some cases.
-spec fixup_app_name(file:name()) -> string().
fixup_app_name(Path) ->

View File

@@ -22,7 +22,7 @@ let
meta = {
description = "Erlang PostgreSQL Driver";
license = stdenv.lib.licenses.mit;
homepage = "https://github.com/semiocast/pgsql";
homepage = https://github.com/semiocast/pgsql;
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
};

View File

@@ -28,7 +28,7 @@ let
meta = {
description = "WebDriver implementation in Erlang";
license = stdenv.lib.licenses.mit;
homepage = "https://github.com/Quviq/webdrv";
homepage = https://github.com/Quviq/webdrv;
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
};

View File

@@ -35,6 +35,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl3 ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
homepage = "https://common-lisp.net/project/armedbear/";
homepage = https://common-lisp.net/project/armedbear/;
};
}

View File

@@ -32,9 +32,9 @@ stdenv.mkDerivation rec {
chmod +x $out/bin/$b $t/bin/$b
done
'';
meta = {
description = "Flex SDK for Adobe Flash / ActionScript";
description = "Flex SDK for Adobe Flash / ActionScript";
homepage = "http://www.adobe.com/products/flex.html";
license = stdenv.lib.licenses.mpl11;
platforms = stdenv.lib.platforms.unix;

View File

@@ -30,7 +30,7 @@ stdenv.mkDerivation {
meta = {
# Please become a maintainer to fix this package
broken = true;
homepage = "http://www.aldor.org/";
homepage = http://www.aldor.org/;
description = "Programming language with an expressive type system";
license = stdenv.lib.licenses.asl20;

View File

@@ -32,7 +32,7 @@ in stdenv.mkDerivation {
'';
meta = with stdenv.lib; {
homepage = "http://wiki.erazor-zone.de/wiki:projects:linux:as31";
homepage = http://wiki.erazor-zone.de/wiki:projects:linux:as31;
description = "An 8031/8051 assembler by Ken Stauffer and Theo Deraadt which produces a variety of object code output formats";
maintainers = with maintainers; [ aneeshusa ];
platforms = with platforms; unix;

View File

@@ -68,11 +68,12 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin"
echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
'';
meta = with stdenv.lib; {
description = "Clozure Common Lisp";
homepage = http://ccl.clozure.com/;
homepage = https://ccl.clozure.com/;
maintainers = with maintainers; [ raskin muflax tohl ];
platforms = attrNames options;
license = licenses.lgpl21;

View File

@@ -69,7 +69,7 @@ stdenv.mkDerivation {
CHICKEN is a compiler for the Scheme programming language.
CHICKEN produces portable and efficient C, supports almost all
of the R5RS Scheme language standard, and includes many
enhancements and extensions. CHICKEN runs on Linux, MacOS X,
enhancements and extensions. CHICKEN runs on Linux, macOS,
Windows, and many Unix flavours.
'';
};

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
configurePhase = ''
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
./configure -clightgen -prefix $out -toolprefix ${tools}/bin/ '' +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
(if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux");
installTargets = "documentation install";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
mkdir -p $lib/share/doc/compcert
mv doc/html $lib/share/doc/compcert/
mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
mv backend cfrontend common cparser driver flocq x86 x86_32 lib \
mv backend cfrontend common cparser driver flocq x86 x86_64 lib \
$lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
'';

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_39, makeWrapper }:
{ stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_4, makeWrapper }:
stdenv.mkDerivation rec {
version = "0.22.0";
version = "0.23.0";
name = "crystal-${version}-1";
arch =
{
@@ -14,20 +14,20 @@ stdenv.mkDerivation rec {
url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-1-${arch}.tar.gz";
sha256 =
{
"x86_64-linux" = "03c1nmjibz8f7yhrczd49gmccx4ivqz121c64hl384w69227p7bq";
"i686-linux" = "1s8gpmxa9wpcc2a9csl205lcpipn1i7gwybapby3q34y7xnq9160";
"x86_64-darwin" = "1bnfxb0hbkx4qlkc1l88sdhcnhacqzy31hh7ksz0prah83g6vbxa";
"x86_64-linux" = "0nhs7swbll8hrk15kmmywngkhij80x62axiskb1gjmiwvzhlh0qx";
"i686-linux" = "03xp8d3lqflzzm26lpdn4yavj87qzgd6xyrqxp2pn9ybwrq8fx8a";
"x86_64-darwin" = "1prz6c1gs8z7dgpdy2id2mjn1c8f5p2bf9b39985bav448njbyjz";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
};
src = fetchurl {
url = "https://github.com/crystal-lang/crystal/archive/${version}.tar.gz";
sha256 = "0iw5i4hjzfxykwfdyzix23pgm3gxd79r9yss3abvva8cf7ci37sv";
sha256 = "05ymwmjkl1b4m888p725kybpiap5ag2vj8l07d59j02inm5r0rcv";
};
# crystal on Darwin needs libiconv to build
buildInputs = [
boehmgc libatomic_ops pcre libevent llvm_39 makeWrapper
boehmgc libatomic_ops pcre libevent llvm_4 makeWrapper
] ++ stdenv.lib.optionals stdenv.isDarwin [
libiconv
];
@@ -86,6 +86,8 @@ stdenv.mkDerivation rec {
install -Dm644 etc/completion.bash $out/share/bash-completion/completions/crystal
install -Dm644 etc/completion.zsh $out/share/zsh/site-functions/_crystal
install -Dm644 man/crystal.1 $out/share/man/man1/crystal.1
install -Dm644 LICENSE $out/share/licenses/crystal/LICENSE
'';
@@ -93,7 +95,7 @@ stdenv.mkDerivation rec {
meta = {
description = "A compiled language with Ruby like syntax and type inference";
homepage = "https://crystal-lang.org/";
homepage = https://crystal-lang.org/;
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [ mingchuan ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];

View File

@@ -90,7 +90,7 @@ let
meta = with stdenv.lib; {
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
homepage = "https://developer.nvidia.com/cuda-toolkit";
homepage = https://developer.nvidia.com/cuda-toolkit;
platforms = platforms.linux;
license = licenses.unfree;
};

View File

@@ -23,6 +23,8 @@ in stdenv.mkDerivation {
buildInputs = [ cmake pkgconfig libffi llvm_35 ]
++ stdenv.lib.optional doCheck perl;
patches = [ ./link-llvm.patch ];
inherit doCheck;
checkTarget = "tests";
@@ -35,7 +37,7 @@ in stdenv.mkDerivation {
Dale is a system (no GC) programming language that uses
S-expressions for syntax and supports syntactic macros.
'';
homepage = "https://github.com/tomhrr/dale";
homepage = https://github.com/tomhrr/dale;
license = licenses.bsd3;
maintainers = with maintainers; [ amiloradovsky ];
platforms = with platforms; [ "i686-linux" "x86_64-linux" ];

View File

@@ -0,0 +1,10 @@
--- dale-39e16d8e89fa070de65a673d4462e783d530f95a-src.org/CMakeLists.txt 2017-06-22 08:01:05.839531242 +0100
+++ dale-39e16d8e89fa070de65a673d4462e783d530f95a-src/CMakeLists.txt 2017-06-22 07:59:11.777566801 +0100
@@ -78,6 +78,7 @@
execute_process (COMMAND ${LLVM_CONFIG} --libs
OUTPUT_VARIABLE LLVM_LIBS
OUTPUT_STRIP_TRAILING_WHITESPACE)
+STRING(REGEX REPLACE " " ";" LLVM_LIBS "${LLVM_LIBS}")
if (${D_LLVM_VERSION_MINOR} GREATER 4)
execute_process (COMMAND ${LLVM_CONFIG} --system-libs
OUTPUT_VARIABLE LLVM_SYSTEM_LIBS

View File

@@ -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";
})
];
nativeBuildInputs = [ unzip makeWrapper ];
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
'';
# Was not able to compile on darwin due to "__inline_isnanl"
# being undefined.
substituteInPlace src/dmd/root/port.c --replace __inline_isnanl __inline_isnan
# 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.d \
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
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 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
export DMD=$PWD/src/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
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;
};
}

View File

@@ -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";
})
];
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";
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 ];
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_
'';
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;
};
}

View File

@@ -34,7 +34,7 @@ edk2 = stdenv.mkDerivation {
meta = {
description = "Intel EFI development kit";
homepage = http://sourceforge.net/projects/edk2/;
homepage = https://sourceforge.net/projects/edk2/;
license = stdenv.lib.licenses.bsd2;
platforms = ["x86_64-linux" "i686-linux"];
};

View File

@@ -32,7 +32,7 @@ mkDerivation {
test-framework-quickcheck2 text union-find
];
jailbreak = true;
homepage = "http://elm-lang.org";
homepage = http://elm-lang.org;
description = "Values to help with elm-package, elm-make, and elm-lang.org.";
license = stdenv.lib.licenses.bsd3;
# added manually since tests are not passing

View File

@@ -32,7 +32,7 @@ mkDerivation {
postInstall = ''
ln -s $out/bin/elm-format-0.18 $out/bin/elm-format
'';
homepage = "http://elm-lang.org";
homepage = http://elm-lang.org;
description = "A source code formatter for Elm";
license = stdenv.lib.licenses.bsd3;
}

View File

@@ -20,7 +20,7 @@ mkDerivation {
time
];
jailbreak = true;
homepage = "http://elm-lang.org";
homepage = http://elm-lang.org;
description = "A build tool for Elm projects";
license = stdenv.lib.licenses.bsd3;
}

View File

@@ -29,7 +29,7 @@ mkDerivation {
zip-archive
];
jailbreak = true;
homepage = "http://github.com/elm-lang/elm-package";
homepage = https://github.com/elm-lang/elm-package;
description = "Package manager for Elm libraries";
license = stdenv.lib.licenses.bsd3;
}

View File

@@ -22,7 +22,7 @@ mkDerivation {
websockets-snap
];
jailbreak = true;
homepage = "http://elm-lang.org";
homepage = http://elm-lang.org;
description = "Interactive development tool for Elm programs";
license = stdenv.lib.licenses.bsd3;
}

View File

@@ -24,7 +24,7 @@ mkDerivation {
test-framework test-framework-hunit test-framework-quickcheck2
];
jailbreak = true;
homepage = "https://github.com/elm-lang/elm-repl";
homepage = https://github.com/elm-lang/elm-repl;
description = "a REPL for Elm";
license = stdenv.lib.licenses.bsd3;
}

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, python, ... }:
let
rev = "1.37.13";
rev = "1.37.16";
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
in
stdenv.mkDerivation rec {
@@ -10,14 +10,14 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "kripken";
repo = "emscripten-fastcomp";
sha256 = "1r4f4d5dmhxqwmpf2psainx7sj1j26fdp5acifdwg4sbbpsv96az";
sha256 = "0wj9sc0gciaiidcjv6wb0qn6ks06xds7q34351masc7qpvd217by";
inherit rev;
};
srcFL = fetchFromGitHub {
owner = "kripken";
repo = "emscripten-fastcomp-clang";
sha256 = "1p0108iz77vmzm7i1aa29sk93g5vd95xiwmags18qkr7x3fmfqsw";
sha256 = "1akdgxzxhzjbhp4d14ajcrp9jrf39x004a726ly2gynqc185l4j7";
inherit rev;
};

View File

@@ -3,7 +3,7 @@
}:
let
rev = "1.37.13";
rev = "1.37.16";
appdir = "share/emscripten";
in
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
src = fetchFromGitHub {
owner = "kripken";
repo = "emscripten";
sha256 = "0xnr8nq431pksb346fwsbs5knqmcygb8mywzzl0c9nz3ims1vkx5";
sha256 = "1qyhjx5zza01vnwmj6qzxbkagxknn4kzb6gw12fqw5q8pa8fy4zy";
inherit rev;
};

View File

@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
meta = {
description = "A functional CLI language";
homepage = "http://fsharp.org/";
homepage = http://fsharp.org/;
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
platforms = with stdenv.lib.platforms; unix;

View File

@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
meta = {
description = "A functional CLI language";
homepage = "http://fsharp.org/";
homepage = http://fsharp.org/;
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
platforms = with stdenv.lib.platforms; unix;

View File

@@ -82,7 +82,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "ML-like functional programming language aimed at program verification";
homepage = "https://www.fstar-lang.org";
homepage = https://www.fstar-lang.org;
license = licenses.asl20;
platforms = with platforms; darwin ++ linux;
};

View File

@@ -0,0 +1,41 @@
{ stdenv, fetchurl, autoconf, ... }:
stdenv.mkDerivation rec {
name = "gambit-bootstrap-${version}";
version = "4.8.8";
tarball_version = "v4_8_8";
src = fetchurl {
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-${tarball_version}-devel.tgz";
sha256 = "075k2z04d6svxqf9paj3xvp0mm0xzy0vbma1y61s0lkywdim8xjz";
};
buildInputs = [ autoconf ];
configurePhase = ''
./configure --prefix=$out --enable-single-host
'';
buildPhase = ''
# Copy the (configured) sources now, not later, so we don't have to filter out
# all the intermediate build products.
mkdir -p $out ; cp -rp . $out/
# build the gsc-boot* compiler
make bootstrap
'';
installPhase = ''
cp -fa ./ $out/
'';
forceShare = [ "info" ];
meta = {
description = "Optimizing Scheme to C compiler, bootstrap step";
homepage = "http://gambitscheme.org";
license = stdenv.lib.licenses.lgpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
};
}

View File

@@ -1,31 +1,75 @@
{ stdenv, fetchurl, openssl }:
{ stdenv, fetchurl, fetchgit, git, openssl, autoconf, pkgs }:
stdenv.mkDerivation rec {
name = "gambit-${version}";
version = "4.8.6";
devver = "4_8_6";
version = "4.8.8-f3ffeb6";
bootstrap = import ./bootstrap.nix ( pkgs );
src = fetchurl {
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${devver}-devel.tgz";
sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
# devver = "4_8_8";
# src = fetchurl {
# url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${version}-devel.tgz";
# sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
# };
src = fetchgit {
url = "https://github.com/feeley/gambit.git";
rev = "f3ffeb695aeea80c18c1b9ef276b57898c780dca";
sha256 = "1lqixsrgk9z2gj6z1nkys0pfd3m5zjxrp3gvqn2wpr9h7hjb8x06";
};
configureFlags = [
"--enable-single-host"
"--enable-shared"
"--enable-absolute-shared-libs"
"--enable-c-opt=-O6" "--enable-gcc-opts" "--enable-inline-jumps"
"--enable-thread-system=posix" "--enable-dynamic-tls"
"--enable-openssl"
];
buildInputs = [ openssl git autoconf bootstrap ];
buildInputs = [ openssl ];
configurePhase = ''
options=(
--prefix=$out
--enable-single-host
--enable-c-opt=-O2
--enable-gcc-opts
--enable-shared
--enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it.
--enable-poll
--enable-openssl
#--enable-multiple-versions # Nope, NixOS already does version multiplexing
#--enable-guide
#--enable-track-scheme
#--enable-high-res-timing
#--enable-max-processors=4
#--enable-multiple-vms
#--enable-dynamic-tls
#--enable-multiple-vms
#--enable-multiple-threaded-vms ## when SMP branch is merged in
#--enable-thread-system=posix ## default when --enable-multiple-vms is on.
#--enable-profile
#--enable-coverage
#--enable-inline-jumps
#--enable-char-size=1" ; default is 4
)
./configure ''${options[@]}
'';
buildPhase = ''
# Make bootstrap compiler, from release bootstrap
mkdir -p boot/wip-compiler &&
cp -rp ${bootstrap}/. boot/wip-compiler/. &&
chmod -R u+w boot &&
cd boot/wip-compiler && \
cp ../../gsc/makefile.in ../../gsc/*.scm gsc && \
(cd gsc && make bootclean ) &&
make bootstrap &&
cd ../.. &&
cp boot/wip-compiler/gsc/gsc gsc-boot &&
# Now use the bootstrap compiler to build the real thing!
make -j2 from-scratch
'';
doCheck = true;
meta = {
description = "Optimizing Scheme to C compiler";
homepage = "http://gambitscheme.org";
license = stdenv.lib.licenses.lgpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
};
}

View File

@@ -0,0 +1,45 @@
{ stdenv, fetchurl, ncurses5, python27 }:
stdenv.mkDerivation rec {
name = "gcc-arm-embedded-${version}";
version = "6-2017-q2-update";
subdir = "6-2017q2";
platformString =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "mac"
else throw "unsupported platform";
urlString = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${platformString}.tar.bz2";
src =
if stdenv.isLinux then fetchurl { url=urlString; sha256="1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6"; }
else if stdenv.isDarwin then fetchurl { url=urlString; sha256="0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x"; }
else throw "unsupported platform";
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out
cp -r * $out
'';
dontPatchELF = true;
dontStrip = true;
preFixup = ''
find $out -type f | while read f; do
patchelf $f > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
done
'';
meta = {
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
license = with stdenv.lib.licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
maintainers = with stdenv.lib.maintainers; [ vinymeuh ];
platforms = with stdenv.lib.platforms; linux ++ darwin;
};
}

View File

@@ -87,7 +87,6 @@ let version = "4.5.4";
withMode;
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
@@ -243,6 +242,8 @@ stdenv.mkDerivation ({
++ (optionals langVhdl [gnat])
;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
@@ -281,11 +282,9 @@ stdenv.mkDerivation ({
if targetPlatform == hostPlatform && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -363,7 +362,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));
@@ -470,7 +469,7 @@ stdenv.mkDerivation ({
'';
meta = {
homepage = "http://ghdl.free.fr/";
homepage = http://ghdl.free.fr/;
license = stdenv.lib.licenses.gpl2Plus;
description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
maintainers = with stdenv.lib.maintainers; [viric];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, noSysDirs
{ stdenv, fetchurl, fetchpatch, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin
@@ -72,7 +72,14 @@ let version = "4.8.5";
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch;
++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch
++ [(fetchpatch {
name = "libc_name_p.diff"; # needed to build with gcc6
url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=ec1cc0263f1";
sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl";
excludes = [ "gcc/cp/ChangeLog" ];
})]
;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -123,8 +130,6 @@ let version = "4.8.5";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -197,7 +202,7 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
outputs = [ "out" "lib" "doc" ];
outputs = [ "out" "lib" "man" "info" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;
@@ -289,6 +294,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -339,12 +346,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -433,7 +438,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -73,8 +73,7 @@ let version = "4.9.4";
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
# The NXConstStr.patch can be removed at 4.9.4
++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch;
;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -125,8 +124,6 @@ let version = "4.9.4";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -297,6 +294,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -345,12 +344,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -439,7 +436,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -129,8 +129,6 @@ let version = "5.4.0";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -311,6 +309,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -360,16 +360,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + ''
--build=${buildPlatform.config}
--host=${hostPlatform.config}
--target=${targetPlatform.config}
'');
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -458,7 +452,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -1,25 +0,0 @@
From 5972cd58bde3bc8bacfe994e5b127c411241f255 Mon Sep 17 00:00:00 2001
From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 3 Jan 2017 05:36:40 +0000
Subject: [PATCH] * config/darwin-driver.c (darwin_driver_init):
Const-correctness fixes for first_period and second_period variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244010 138bc75d-0d04-0410-961f-82ee72b054a4
---
diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
index 0c4f0cd..e3ed79d 100644
--- a/gcc/config/darwin-driver.c
+++ b/gcc/config/darwin-driver.c
@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
if (vers_string != NULL)
{
char *asm_major = NULL;
- char *first_period = strchr(vers_string, '.');
+ const char *first_period = strchr(vers_string, '.');
if (first_period != NULL)
{
- char *second_period = strchr(first_period+1, '.');
+ const char *second_period = strchr(first_period+1, '.');
if (second_period != NULL)
asm_major = xstrndup (vers_string, second_period-vers_string);
else

View File

@@ -59,7 +59,7 @@ assert langGo -> langCC;
with stdenv.lib;
with builtins;
let version = "6.3.0";
let version = "6.4.0";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
@@ -73,8 +73,7 @@ let version = "6.3.0";
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
++ optional hostPlatform.isDarwin ./darwin-const-correct.patch; # Kill this after 6.3.0
++ optional langFortran ../gfortran-driving.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -125,8 +124,6 @@ let version = "6.3.0";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -192,8 +189,8 @@ stdenv.mkDerivation ({
builder = ../builder.sh;
src = fetchurl {
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
sha256 = "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph";
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
sha256 = "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5";
};
inherit patches;
@@ -206,6 +203,19 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
@@ -293,6 +303,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -342,12 +354,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -436,7 +446,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -125,8 +125,6 @@ let version = "7.1.0";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -207,6 +205,19 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
@@ -294,6 +305,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -343,12 +356,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -437,7 +448,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -125,8 +125,6 @@ let version = "7-20170409";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -294,6 +292,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -343,12 +343,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -437,7 +435,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -1,15 +1,22 @@
{ stdenv, fetchurl, fetchgit, gambit, openssl, zlib, coreutils, rsync, bash }:
{ stdenv, fetchurl, fetchgit, gambit,
coreutils, rsync, bash,
openssl, zlib, sqlite, libxml2, libyaml, libmysql, lmdb, leveldb }:
stdenv.mkDerivation rec {
name = "gerbil-${version}";
version = "0.11";
src = fetchurl {
url = "https://github.com/vyzo/gerbil/archive/v${version}.tar.gz";
sha256 = "0mqg6cqdcf5qr7vk79x5zkls7z2wm8i3lhwn0b7i0g1m6yyyyff7";
version = "0.12-DEV";
src = fetchgit {
url = "https://github.com/vyzo/gerbil.git";
rev = "3657b6e940ea248e0b312f276590e38ff68997e7";
sha256 = "11ys7082ghkm4yikz4qxmv3jpxcr42jfi0jhjw1mpzbqdg6004w2";
};
buildInputs = [ gambit openssl zlib coreutils rsync bash ];
buildInputs = [
gambit openssl
coreutils rsync bash
zlib openssl zlib sqlite libxml2 libyaml libmysql lmdb leveldb
];
postPatch = ''
patchShebangs .
@@ -21,7 +28,13 @@ stdenv.mkDerivation rec {
buildPhase = ''
runHook preBuild
# Enable all optional libraries
substituteInPlace "src/std/build-features.ss" --replace '#f' '#t'
# Build, replacing make by build.sh
( cd src && sh build.sh )
runHook postBuild
'';

View File

@@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
'';
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
license = stdenv.lib.licenses.bsd3;
platforms = ["x86_64-linux" "i686-linux"];

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported.
inherit (ghc.meta) license;

View File

@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
stripDebugFlags=["-S" "--keep-file-symbols"];
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported.

View File

@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
stripDebugFlags=["-S" "--keep-file-symbols"];
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber

View File

@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
};
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
};
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
stripDebugFlags=["-S" "--keep-file-symbols"];
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber

View File

@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber

View File

@@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber

View File

@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -50,7 +50,7 @@ stdenv.mkDerivation (rec {
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -82,7 +82,7 @@ stdenv.mkDerivation rec {
};
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
sha256 = "1c8qc4fhkycynk4g1f9hvk53dj6a1vvqi6bklqznns6hw59m8qhi";
};
patches = []
patches = [ ./ghc-gold-linker.patch ]
++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch
++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch;
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
outputs = [ "out" "man" "doc" ];
preConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
@@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
};
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -9,8 +9,8 @@
let
inherit (bootPkgs) ghc;
version = "8.2.1-rc2";
preReleaseName = "ghc-8.2.0.20170507";
version = "8.2.1";
preReleaseName = "ghc-8.2.1";
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
commonPreConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
@@ -27,11 +27,13 @@ in stdenv.mkDerivation (rec {
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/${preReleaseName}-src.tar.xz";
sha256 = "1hy3l6nzkyhzwy9mii4zs51jv048zwvdqk1q3188jznz35392zrn";
sha256 = "1w4k0n23b9fg8kmarqhfamzpmf91p6jcdr6xlwzfmb4df2bd9hng";
};
postPatch = "patchShebangs .";
patches = [ ./ghc-gold-linker.patch ];
preConfigure = commonPreConfigure;
buildInputs = commonBuildInputs;
@@ -80,7 +82,7 @@ in stdenv.mkDerivation (rec {
};
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -0,0 +1,54 @@
From 46fe80ab7c0013a929d0934e61429820042a70a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
Date: Fri, 21 Jul 2017 20:09:11 +0200
Subject: [PATCH 1/2] base: Add `extra-libraries: m` because base uses libm
functions.
Linking with gold needs this because in contrast to ld, gold
doesn't implicitly link libm.
Found by Michael Bishop <cleverca22@gmail.com>.
---
libraries/base/base.cabal | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index f00fb8768e5..fd91f268ffe 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -342,6 +342,10 @@ Library
WCsubst.h
consUtils.h
+ -- Base uses libm functions. ld.bfd links libm implicitly when necessary.
+ -- Other linkers, like gold, don't, so we have to declare it explicitly.
+ extra-libraries: m
+
-- OS Specific
if os(windows)
-- Windows requires some extra libraries for linking because the RTS
From 900a8f4931e9bc6d3219d9263cfecfc6af8fc766 Mon Sep 17 00:00:00 2001
From: michael bishop <cleverca22@gmail.com>
Date: Sat, 22 Jul 2017 13:12:39 -0300
Subject: [PATCH 2/2] also add -lm to ghc-prim
---
libraries/ghc-prim/ghc-prim.cabal | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index 00a029efedf..6db85dd69fc 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -42,6 +42,10 @@ Library
UnliftedFFITypes
build-depends: rts == 1.0.*
+
+ -- Base uses libm functions. ld.bfd links libm implicitly when necessary.
+ -- Other linkers, like gold, don't, so we have to declare it explicitly.
+ extra-libraries: m
exposed-modules:
GHC.CString

View File

@@ -5,6 +5,7 @@
# If enabled GHC will be build with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
, enableIntegerSimple ? false, gmp
, version ? "8.3.20170808"
}:
let
@@ -12,8 +13,7 @@ let
commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
version = "8.1.20170106";
rev = "b4f2afe70ddbd0576b4eba3f82ba1ddc52e9b3bd";
rev = "14457cf6a50f708eecece8f286f08687791d51f7";
commonPreConfigure = ''
echo ${version} >VERSION
@@ -34,7 +34,7 @@ in stdenv.mkDerivation (rec {
src = fetchgit {
url = "git://git.haskell.org/ghc.git";
inherit rev;
sha256 = "1h064nikx5srsd7qvz19f6dxvnpfjp0b3b94xs1f4nar18hzf4j0";
sha256 = "08vj9ca7rq7rv8pjfl14fg2lg9d6zisrwlq6bi5vzr006816dy8y";
};
postPatch = "patchShebangs .";
@@ -87,7 +87,7 @@ in stdenv.mkDerivation (rec {
};
meta = {
homepage = "http://haskell.org/ghc";
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;

View File

@@ -186,7 +186,7 @@ in mkDerivation (rec {
};
};
homepage = "https://github.com/ghcjs/ghcjs";
homepage = https://github.com/ghcjs/ghcjs;
description = "A Haskell to JavaScript compiler that uses the GHC API";
license = stdenv.lib.licenses.bsd3;
platforms = ghc.meta.platforms;

View File

@@ -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

View File

@@ -15,7 +15,7 @@
base HUnit test-framework test-framework-hunit
];
jailbreak = true;
homepage = "https://github.com/simonmar/async";
homepage = https://github.com/simonmar/async;
description = "Run IO operations asynchronously and wait for their results";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -47,7 +47,7 @@
time time-locale-compat unordered-containers uuid-types vector
];
jailbreak = true;
homepage = "https://github.com/bos/aeson";
homepage = https://github.com/bos/aeson;
description = "Fast JSON parsing and encoding";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -76,7 +76,7 @@
transformers unordered-containers vector
];
jailbreak = true;
homepage = "https://github.com/bos/attoparsec";
homepage = https://github.com/bos/attoparsec;
description = "Fast combinator parsing for bytestrings and text";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -95,7 +95,7 @@
];
benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
jailbreak = true;
homepage = "https://github.com/basvandijk/case-insensitive";
homepage = https://github.com/basvandijk/case-insensitive;
description = "Case insensitive string comparison";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -109,7 +109,7 @@
libraryHaskellDepends = [ base deepseq ];
testHaskellDepends = [ base Cabal QuickCheck ];
jailbreak = true;
homepage = "https://github.com/spl/dlist";
homepage = https://github.com/spl/dlist;
description = "Difference lists";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -143,7 +143,7 @@
test-framework-hunit test-framework-quickcheck2 text unix
];
jailbreak = true;
homepage = "http://github.com/tibbe/hashable";
homepage = http://github.com/tibbe/hashable;
description = "A class for types that can be converted to a hash value";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -156,7 +156,7 @@
doCheck = false;
libraryHaskellDepends = [ base transformers ];
jailbreak = true;
homepage = "http://github.com/ekmett/mtl";
homepage = http://github.com/ekmett/mtl;
description = "Monad classes, using functional dependencies";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -204,7 +204,7 @@
];
benchmarkHaskellDepends = [ base criterion ];
jailbreak = true;
homepage = "https://github.com/basvandijk/scientific";
homepage = https://github.com/basvandijk/scientific;
description = "Numbers represented using scientific notation";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -230,7 +230,7 @@
libraryHaskellDepends = [ base ];
testHaskellDepends = [ base containers HUnit mtl ];
jailbreak = true;
homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
homepage = http://www.cs.uu.nl/wiki/GenericProgramming/SYB;
description = "Scrap Your Boilerplate";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -247,7 +247,7 @@
base deepseq template-haskell transformers transformers-compat
];
jailbreak = true;
homepage = "http://github.com/ekmett/tagged";
homepage = http://github.com/ekmett/tagged;
description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -271,7 +271,7 @@
test-framework-hunit test-framework-quickcheck2
];
jailbreak = true;
homepage = "https://github.com/bos/text";
homepage = https://github.com/bos/text;
description = "An efficient packed Unicode text type";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -295,7 +295,7 @@
hashable hashmap mtl random
];
jailbreak = true;
homepage = "https://github.com/tibbe/unordered-containers";
homepage = https://github.com/tibbe/unordered-containers;
description = "Efficient hashing-based container types";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -318,7 +318,7 @@
base bytestring containers criterion deepseq random
];
jailbreak = true;
homepage = "https://github.com/aslatter/uuid";
homepage = https://github.com/aslatter/uuid;
description = "Type definitions for Universally Unique Identifiers";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -338,7 +338,7 @@
test-framework-quickcheck2 transformers
];
jailbreak = true;
homepage = "https://github.com/haskell/vector";
homepage = https://github.com/haskell/vector;
description = "Efficient Arrays";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -366,7 +366,7 @@
test-framework-hunit test-framework-quickcheck2 text
];
jailbreak = true;
homepage = "http://github.com/ghcjs/ghcjs-base";
homepage = http://github.com/ghcjs/ghcjs-base;
description = "Base library for GHCJS";
license = stdenv.lib.licenses.mit;
}) {};
@@ -392,7 +392,7 @@
test-framework-hunit test-framework-quickcheck2 unix
];
jailbreak = true;
homepage = "http://www.haskell.org/cabal/";
homepage = http://www.haskell.org/cabal/;
description = "A framework for packaging Haskell software";
license = stdenv.lib.licenses.bsd3;
}) {};

View File

@@ -15,7 +15,7 @@
base HUnit test-framework test-framework-hunit
];
jailbreak = true;
homepage = "https://github.com/simonmar/async";
homepage = https://github.com/simonmar/async;
description = "Run IO operations asynchronously and wait for their results";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -42,7 +42,7 @@
test-framework-quickcheck2 text time unordered-containers vector
];
jailbreak = true;
homepage = "https://github.com/bos/aeson";
homepage = https://github.com/bos/aeson;
description = "Fast JSON parsing and encoding";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -67,7 +67,7 @@
test-framework-quickcheck2 text transformers vector
];
jailbreak = true;
homepage = "https://github.com/bos/attoparsec";
homepage = https://github.com/bos/attoparsec;
description = "Fast combinator parsing for bytestrings and text";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -85,7 +85,7 @@
base bytestring HUnit test-framework test-framework-hunit text
];
jailbreak = true;
homepage = "https://github.com/basvandijk/case-insensitive";
homepage = https://github.com/basvandijk/case-insensitive;
description = "Case insensitive string comparison";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -99,7 +99,7 @@
libraryHaskellDepends = [ base deepseq ];
testHaskellDepends = [ base Cabal QuickCheck ];
jailbreak = true;
homepage = "https://github.com/spl/dlist";
homepage = https://github.com/spl/dlist;
description = "Difference lists";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -133,7 +133,7 @@
test-framework-hunit test-framework-quickcheck2 text unix
];
jailbreak = true;
homepage = "http://github.com/tibbe/hashable";
homepage = http://github.com/tibbe/hashable;
description = "A class for types that can be converted to a hash value";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -146,7 +146,7 @@
doCheck = false;
libraryHaskellDepends = [ base transformers ];
jailbreak = true;
homepage = "http://github.com/ekmett/mtl";
homepage = http://github.com/ekmett/mtl;
description = "Monad classes, using functional dependencies";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -193,7 +193,7 @@
tasty-hunit tasty-quickcheck tasty-smallcheck text
];
jailbreak = true;
homepage = "https://github.com/basvandijk/scientific";
homepage = https://github.com/basvandijk/scientific;
description = "Numbers represented using scientific notation";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -219,7 +219,7 @@
libraryHaskellDepends = [ base ];
testHaskellDepends = [ base containers HUnit mtl ];
jailbreak = true;
homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
homepage = http://www.cs.uu.nl/wiki/GenericProgramming/SYB;
description = "Scrap Your Boilerplate";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -243,7 +243,7 @@
test-framework-hunit test-framework-quickcheck2
];
jailbreak = true;
homepage = "https://github.com/bos/text";
homepage = https://github.com/bos/text;
description = "An efficient packed Unicode text type";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -263,7 +263,7 @@
test-framework test-framework-hunit test-framework-quickcheck2
];
jailbreak = true;
homepage = "https://github.com/tibbe/unordered-containers";
homepage = https://github.com/tibbe/unordered-containers;
description = "Efficient hashing-based container types";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -283,7 +283,7 @@
test-framework-quickcheck2 transformers
];
jailbreak = true;
homepage = "https://github.com/haskell/vector";
homepage = https://github.com/haskell/vector;
description = "Efficient Arrays";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -311,7 +311,7 @@
test-framework-hunit test-framework-quickcheck2 text
];
jailbreak = true;
homepage = "http://github.com/ghcjs/ghcjs-base";
homepage = http://github.com/ghcjs/ghcjs-base;
description = "Base library for GHCJS";
license = stdenv.lib.licenses.mit;
}) {};
@@ -337,7 +337,7 @@
test-framework-hunit test-framework-quickcheck2 unix
];
jailbreak = true;
homepage = "http://www.haskell.org/cabal/";
homepage = http://www.haskell.org/cabal/;
description = "A framework for packaging Haskell software";
license = stdenv.lib.licenses.bsd3;
}) {};

View File

@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = {
homepage = "http://sourceforge.net/p/ghdl-updates/wiki/Home/";
homepage = http://sourceforge.net/p/ghdl-updates/wiki/Home/;
description = "Free VHDL simulator";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; (if flavour == "llvm" then [ "i686-linux" "x86_64-linux" ]

View File

@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "An open-source COBOL compiler";
homepage = http://sourceforge.net/projects/open-cobol/;
homepage = https://sourceforge.net/projects/open-cobol/;
license = licenses.gpl3;
maintainers = with maintainers; [ ericsagnes ];
platforms = platforms.linux;

View File

@@ -113,6 +113,7 @@ stdenv.mkDerivation rec {
patches = [
./remove-tools-1.5.patch
./creds-test.patch
./fix-systime-1.6.patch
# This test checks for the wrong thing with recent tzdata. It's been fixed in master but the patch
# actually works on old versions too.
@@ -127,6 +128,7 @@ stdenv.mkDerivation rec {
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686

View File

@@ -123,6 +123,7 @@ stdenv.mkDerivation rec {
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686

View File

@@ -128,6 +128,7 @@ stdenv.mkDerivation rec {
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686

View File

@@ -0,0 +1,45 @@
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s
index e09b906ba5..fa8ff2f65c 100644
--- a/src/runtime/sys_darwin_amd64.s
+++ b/src/runtime/sys_darwin_amd64.s
@@ -157,6 +157,7 @@ systime:
// Fall back to system call (usually first call in this thread).
MOVQ SP, DI
MOVQ $0, SI
+ MOVQ $0, DX // required as of Sierra; Issue 16570
MOVL $(0x2000000+116), AX
SYSCALL
CMPQ AX, $0
diff --git a/src/syscall/syscall_darwin_amd64.go b/src/syscall/syscall_darwin_amd64.go
index 70b53b87f4..79083117b6 100644
--- a/src/syscall/syscall_darwin_amd64.go
+++ b/src/syscall/syscall_darwin_amd64.go
@@ -26,14 +26,21 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
}
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
+func Gettimeofday(tv *Timeval) error {
+ // The tv passed to gettimeofday must be non-nil.
+ // Before macOS Sierra (10.12), tv was otherwise unused and
+ // the answers came back in the two registers.
+ // As of Sierra, gettimeofday return zeros and populates
+ // tv itself.
sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
+ if err != nil {
+ return err
+ }
+ if sec != 0 || usec != 0 {
+ tv.Sec = sec
+ tv.Usec = usec
+ }
+ return nil
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {

View File

@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
doCheck = true;
meta = {
homepage = "http://www.gnu.org/software/gprolog/";
homepage = http://www.gnu.org/software/gprolog/;
description = "GNU Prolog, a free Prolog compiler with constraint solving over finite domains";
license = stdenv.lib.licenses.lgpl3Plus;

View File

@@ -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 ];

View File

@@ -1,40 +1,82 @@
{ stdenv, fetchgit, ocaml, zlib, pcre, neko, camlp4 }:
{ stdenv, fetchgit, bash, coreutils, ocaml, zlib, pcre, neko, camlp4 }:
stdenv.mkDerivation {
name = "haxe-3.4.2";
let
generic = { version, sha256, prePatch }:
stdenv.mkDerivation rec {
name = "haxe-${version}";
buildInputs = [ocaml zlib pcre neko camlp4];
buildInputs = [ocaml zlib pcre neko camlp4];
src = fetchgit {
url = "https://github.com/HaxeFoundation/haxe.git";
sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
fetchSubmodules = true;
src = fetchgit {
url = https://github.com/HaxeFoundation/haxe.git;
inherit sha256;
fetchSubmodules = true;
rev = "refs/tags/${version}";
};
# Tag 3.4.2
rev = "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7";
inherit prePatch;
buildFlags = [ "all" "tools" ];
installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
cp -vr haxe haxelib std "$out/lib/haxe"
# make wrappers which provide a temporary HAXELIB_PATH with symlinks to multiple repositories HAXELIB_PATH may point to
for name in haxe haxelib; do
cat > $out/bin/$name <<EOF
#!{bash}/bin/bash
if [[ "\$HAXELIB_PATH" =~ : ]]; then
NEW_HAXELIB_PATH="\$(${coreutils}/bin/mktemp -d)"
IFS=':' read -ra libs <<< "\$HAXELIB_PATH"
for libdir in "\''${libs[@]}"; do
for lib in "\$libdir"/*; do
if [ ! -e "\$NEW_HAXELIB_PATH/\$(${coreutils}/bin/basename "\$lib")" ]; then
${coreutils}/bin/ln -s "--target-directory=\$NEW_HAXELIB_PATH" "\$lib"
fi
done
done
export HAXELIB_PATH="\$NEW_HAXELIB_PATH"
$out/lib/haxe/$name "\$@"
rm -rf "\$NEW_HAXELIB_PATH"
else
exec $out/lib/haxe/$name "\$@"
fi
EOF
chmod +x $out/bin/$name
done
'';
setupHook = ./setup-hook.sh;
dontStrip = true;
meta = with stdenv.lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
homepage = https://haxe.org;
license = with licenses; [ gpl2 bsd2 /*?*/ ]; # -> docs/license.txt
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux ++ platforms.darwin;
};
};
in {
# this old version is required to compile some libraries
haxe_3_2 = generic {
version = "3.2.1";
sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' main.ml
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/tools/haxelib/Main.hx
'';
};
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
'';
buildFlags = [ "all" "tools" ];
installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
install -vt "$out/bin" haxe haxelib
cp -vr std "$out/lib/haxe"
'';
setupHook = ./setup-hook.sh;
dontStrip = true;
meta = with stdenv.lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
homepage = https://haxe.org;
license = with licenses; [ gpl2 bsd2 /*?*/ ]; # -> docs/license.txt
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux ++ platforms.darwin;
haxe_3_4 = generic {
version = "3.4.2";
sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
'';
};
}

View File

@@ -1,52 +0,0 @@
{ stdenv, fetchzip, haxe, neko, pcre, sqlite, zlib }:
stdenv.mkDerivation rec {
name = "hxcpp-3.2.27";
src = let
zipFile = stdenv.lib.replaceChars ["."] [","] name;
in fetchzip {
inherit name;
url = "http://lib.haxe.org/files/3.0/${zipFile}.zip";
sha256 = "1hw4kr1f8q7f4fkzis7kvkm7h1cxhv6cf5v1iq7rvxs2fxiys7fr";
};
NIX_LDFLAGS = "-lpcre -lz -lsqlite3";
outputs = [ "out" "lib" ];
patchPhase = ''
rm -rf bin lib project/thirdparty project/libs/sqlite/sqlite3.[ch]
find . -name '*.n' -delete
sed -i -re '/(PCRE|ZLIB)_DIR|\<sqlite3\.c\>/d' project/Build.xml
sed -i -e 's/mFromFile = "@";/mFromFile = "";/' tools/hxcpp/Linker.hx
sed -i -e '/dll_ext/s,HX_CSTRING("./"),HX_CSTRING("'"$lib"'/"),' \
src/hx/Lib.cpp
'';
buildInputs = [ haxe neko pcre sqlite zlib ];
targetArch = "linux-m${if stdenv.is64bit then "64" else "32"}";
buildPhase = ''
haxe -neko project/build.n -cp tools/build -main Build
haxe -neko run.n -cp tools/run -main RunMain
haxe -neko hxcpp.n -cp tools/hxcpp -main BuildTool
(cd project && neko build.n "ndll-$targetArch")
'';
installPhase = ''
for i in bin/Linux*/*.dso; do
install -vD "$i" "$lib/$(basename "$i")"
done
find *.n toolchain/*.xml build-tool/BuildCommon.xml src include \
-type f -exec install -vD -m 0644 {} "$out/lib/haxe/hxcpp/{}" \;
'';
meta = {
homepage = "http://lib.haxe.org/p/hxcpp";
description = "Runtime support library for the Haxe C++ backend";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.linux;
};
}

View File

@@ -1,5 +1,7 @@
addHaxeLibPath() {
if [ ! -d "$1/lib/haxe/std" ]; then
addToSearchPath HAXELIB_PATH "$1/lib/haxe"
fi
}
envHooks+=(addHaxeLibPath)

View File

@@ -1,4 +1,4 @@
{stdenv, fetchFromGitHub, bash, which, m4, python, bison, flex_2_6_1, llvmPackages, clangWrapSelf,
{stdenv, fetchFromGitHub, bash, which, m4, python, bison, flex, llvmPackages, clangWrapSelf,
testedTargets ? ["sse2" "host"] # the default test target is sse4, but that is not supported by all Hydra agents
}:
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
m4
python
bison
flex_2_6_1
flex
llvm
llvmPackages.clang-unwrapped # we need to link against libclang, so we need the unwrapped
];

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Whole-program, globally optimizing Haskell compiler";
homepage = "http://repetae.net/computer/jhc/";
homepage = http://repetae.net/computer/jhc/;
license = stdenv.lib.licenses.bsd3;
platforms = ["x86_64-linux"]; # 32 bit builds are broken
maintainers = with stdenv.lib.maintainers; [ aforemny thoughtpolice ];

View File

@@ -1,6 +1,6 @@
{ stdenv, lib, fetchFromGitHub, emscripten }:
let version = "0.8.9"; in
let version = "0.9.4"; in
stdenv.mkDerivation {
name = "jsonnet-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
rev = "v${version}";
owner = "google";
repo = "jsonnet";
sha256 = "0phk8dzby5v60r7fwd1qf4as2jdpmdmksjw3g4p3mkkr7sc81119";
sha256 = "1bh9x8d3mxnic31b6gh4drn5l6qpyqfgsn2l48sv0jknhinm1a7l";
};
buildInputs = [ emscripten ];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchgit, fetchurl
{ stdenv, fetchgit, fetchurl, fetchzip
# build tools
, gfortran, m4, makeWrapper, patchelf, perl, which, python2
, runCommand
@@ -54,12 +54,12 @@ in
stdenv.mkDerivation rec {
pname = "julia";
version = "0.5.1";
version = "0.5.2";
name = "${pname}-${version}";
src = fetchurl {
src = fetchzip {
url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz";
sha256 = "1a9m7hzzrwk71gvwwrd1p45s64yid61i41n95gm5pzbry6p9fpl0";
sha256 = "1616f53dj7xc0g2iys8qfbzal6dx55nswnws5g5r44dlbf4hcl0h";
};
prePatch = ''
mkdir deps/srccache
@@ -155,7 +155,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = true;
doCheck = !stdenv.isDarwin;
checkTarget = "testall";
# Julia's tests require read/write access to $HOME
preCheck = ''
@@ -166,6 +166,7 @@ stdenv.mkDerivation rec {
preBuild = ''
sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
'';
postInstall = ''
@@ -178,7 +179,7 @@ stdenv.mkDerivation rec {
meta = {
description = "High-level performance-oriented dynamical language for technical computing";
homepage = "http://julialang.org/";
homepage = https://julialang.org/;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ raskin ];
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];

View File

@@ -160,7 +160,7 @@ stdenv.mkDerivation rec {
meta = {
description = "High-level performance-oriented dynamical language for technical computing";
homepage = "http://julialang.org/";
homepage = https://julialang.org/;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ raskin ];
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];

View File

@@ -171,7 +171,7 @@ stdenv.mkDerivation rec {
meta = {
description = "High-level performance-oriented dynamical language for technical computing";
homepage = "http://julialang.org/";
homepage = https://julialang.org/;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ raskin ];
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];

View File

@@ -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 ] ;

View File

@@ -36,7 +36,7 @@ in stdenv.mkDerivation rec {
patches = stdenv.lib.optionals (!stdenv.isDarwin) [
# llvm-config --libfiles returns (non-existing) static libs
./fix-llvm-config.patch
../fix-llvm-config.patch
];
# hacky fix: created binaries need to be run before installation

View File

@@ -53,7 +53,8 @@ in stdenv.mkDerivation rec {
"-DCAN_TARGET_i386=false"
];
patches = [ ./fix-15974.patch ];
patches = [ ./fix-15974.patch ] ++
stdenv.lib.optionals (!stdenv.isDarwin) [../fix-llvm-config.patch ];
postBuild = ''
rm -fR $out

View File

@@ -1,13 +0,0 @@
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
index eacefdf60bf..40d25f5cef8 100644
--- a/utils/llvm-build/llvmbuild/main.py
+++ b/utils/llvm-build/llvmbuild/main.py
@@ -412,7 +412,7 @@ subdirectories = %s
if library_name is None:
library_name_as_cstr = '0'
else:
- library_name_as_cstr = '"lib%s.a"' % library_name
+ library_name_as_cstr = '"lib%s.so"' % library_name
f.write(' { "%s", %s, %d, { %s } },\n' % (
name, library_name_as_cstr, is_installed,
', '.join('"%s"' % dep

View File

@@ -55,7 +55,7 @@ in stdenv.mkDerivation rec {
patches = stdenv.lib.optionals (!stdenv.isDarwin) [
# llvm-config --libfiles returns (non-existing) static libs
./fix-llvm-config.patch
../fix-llvm-config.patch
];
cmakeFlags = with stdenv; [

View File

@@ -0,0 +1,11 @@
--- llvm.org/utils/llvm-build/llvmbuild/main.py 2015-10-07 00:24:35.000000000 +0100
+++ llvm/utils/llvm-build/llvmbuild/main.py 2017-06-16 17:08:39.866586578 +0100
@@ -413,7 +413,7 @@
if library_name is None:
library_name_as_cstr = 'nullptr'
else:
- library_name_as_cstr = '"lib%s.a"' % library_name
+ library_name_as_cstr = '"lib%s.so"' % library_name
if is_installed:
is_installed_as_cstr = 'true'
else:

View File

@@ -37,9 +37,10 @@ in stdenv.mkDerivation rec {
# Fix a segfault in llc
# See http://lists.llvm.org/pipermail/llvm-dev/2016-October/106500.html
patches = [ ./D17533-1.patch ];
patches = [ ./D17533-1.patch ] ++
stdenv.lib.optionals (!stdenv.isDarwin) [./fix-llvm-config.patch];
# hacky fix: New LLVM releases require a newer OS X SDK than
# hacky fix: New LLVM releases require a newer macOS SDK than
# 10.9. This is a temporary measure until nixpkgs darwin support is
# updated.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''

View File

@@ -58,6 +58,14 @@ in stdenv.mkDerivation rec {
propagatedBuildInputs = [ ncurses zlib ];
patches = [
# fix output of llvm-config (fixed in llvm 4.0)
(fetchpatch {
url = https://github.com/llvm-mirror/llvm/commit/5340b5b3d970069aebf3dde49d8964583742e01a.patch;
sha256 = "095f8knplwqbc2p7rad1kq8633i34qynni9jna93an7kyc80wdxl";
})
];
postPatch = ""
+ ''
patch -p1 --reverse < ${fetchpatch {

View File

@@ -1,6 +1,6 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
, fixDarwinDylibNames
, enableManpages ? true
, enableManpages ? false
}:
let
@@ -9,7 +9,7 @@ let
name = "clang-${version}";
unpackPhase = ''
unpackFile ${fetch "cfe" "12n99m60aa680cir3ql56s1jsv6lp61hq4w9rabf4c6vpn7gi9ff"}
unpackFile ${fetch "cfe" "16vnv3msnvx33dydd17k2cq0icndi1a06bg5vcxkrhjjb1rqlwv1"}
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}

View File

@@ -1,8 +1,8 @@
{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
{ lowPrio, newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
release_version = "4.0.0";
release_version = "4.0.1";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
@@ -10,17 +10,28 @@ let
inherit sha256;
};
compiler-rt_src = fetch "compiler-rt" "059ipqq27gd928ay06f1ck3vw6y5h5z4zd766x8k0k7jpqimpwnk";
clang-tools-extra_src = fetch "clang-tools-extra" "16bwckgcxfn56mbqjlxi7fxja0zm9hjfa6s3ncm3dz98n5zd7ds1";
compiler-rt_src = fetch "compiler-rt" "0h5lpv1z554szi4r4blbskhwrkd78ir50v3ng8xvk1s86fa7gj53";
clang-tools-extra_src = fetch "clang-tools-extra" "1dhmp7ccfpr42bmvk3kp37ngjpf3a9m5d4kkpsn7d00hzi7fdl9m";
# Add man output without introducing extra dependencies.
overrideManOutput = drv:
let drv-manpages = drv.override { enableManpages = true; }; in
drv // { man = drv-manpages.man; /*outputs = drv.outputs ++ ["man"];*/ };
llvm = callPackage ./llvm.nix {
inherit compiler-rt_src stdenv;
};
clang-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src stdenv;
};
self = {
llvm = callPackage ./llvm.nix {
inherit compiler-rt_src stdenv;
};
llvm = overrideManOutput llvm;
clang-unwrapped = overrideManOutput clang-unwrapped;
clang-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src stdenv;
};
llvm-manpages = lowPrio self.llvm.man;
clang-manpages = lowPrio self.clang-unwrapped.man;
clang = wrapCC self.clang-unwrapped;

View File

@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetch "libcxx" "15ngfcjc3pjakpwfq7d4n546jj0rgfdv5rpb1qv9xgv9mp236kag";
src = fetch "libcxx" "0k6cmjcxnp2pyl8xwy1wkyyckkmdrjddim94yf1gzjbjy9qi22jj";
postUnpack = ''
unpackFile ${libcxxabi.src}

View File

@@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "libc++abi-${version}";
src = fetch "libcxxabi" "1n416kv27anabg9jsw6331r28ic30xk46p381lx2vbb2jrhwpafw";
src = fetch "libcxxabi" "0cqvzallxh0nwiijsf6i4d5ds9m5ijfzywg7376ncv50i64if24g";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;

View File

@@ -10,7 +10,7 @@
stdenv.mkDerivation {
name = "lld-${version}";
src = fetch "lld" "00km1qawk146pyjqa6aphcdzgkzrmg6cgk0ikg4661ffp5bn9q1k";
src = fetch "lld" "1v9nkpr158j4yd4zmi6rpnfxkp78r1fapr8wji9s6v176gji1kk3";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm ];

View File

@@ -17,7 +17,7 @@
stdenv.mkDerivation {
name = "lldb-${version}";
src = fetch "lldb" "0g83hbw1r4gd0z8hlph9i34xs6dlcc69vz3h2bqwkhb2qq2qzg9d";
src = fetch "lldb" "0yy43a27zx3r51b6gkv3v2mdiqcq3mf0ngki47ya0i30v3gx4cl4";
patches = [ ./lldb-libedit.patch ];
postPatch = ''

View File

@@ -16,13 +16,13 @@
, compiler-rt_src
, libcxxabi
, debugVersion ? false
, enableManpages ? true
, enableManpages ? false
, enableSharedLibraries ? true
, darwin
}:
let
src = fetch "llvm" "1giklnw71wzsgbqg9wb5x7dxnbj39m6zpfvskvzvhwvfz4fm244d";
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
shlib = if stdenv.isDarwin then "dylib" else "so";
# Used when creating a version-suffixed symlink of libLLVM.dylib
@@ -64,13 +64,6 @@ in stdenv.mkDerivation rec {
+ stdenv.lib.optionalString (enableSharedLibraries) ''
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
patch -p1 < ./llvm-outputs.patch
''
# Remove broken tests: (https://bugs.llvm.org//show_bug.cgi?id=31610)
+ ''
rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll
rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll
rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll
rm test/CodeGen/AMDGPU/runtime-metadata.ll
'';
# hacky fix: created binaries need to be run before installation
@@ -123,11 +116,11 @@ in stdenv.mkDerivation rec {
+ stdenv.lib.optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM.${shlib}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
''
+ stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib
install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config

View File

@@ -10,7 +10,7 @@
stdenv.mkDerivation {
name = "openmp-${version}";
src = fetch "openmp" "09kf41zgv551fnv628kqhlwgqkd2bkiwii9gqi6q12djgdddhmfv";
src = fetch "openmp" "195dykamd39yhi5az7nqj3ksqhb3wq30l93jnfkxl0061qbknsgc";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

View File

@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--enable-mcpplib" ];
meta = with stdenv.lib; {
homepage = "http://mcpp.sourceforge.net/";
homepage = http://mcpp.sourceforge.net/;
description = "A portable c preprocessor";
license = licenses.bsd2;
platforms = platforms.unix;

Some files were not shown because too many files have changed in this diff Show More