Merge remote-tracking branch 'origin/master' into gcc-6

This commit is contained in:
Eelco Dolstra
2017-07-21 11:05:58 +02:00
1461 changed files with 36920 additions and 23576 deletions

View File

@@ -0,0 +1,7 @@
{ mkDerivation }:
mkDerivation rec {
version = "1.3.4";
sha256 = "01qqv1ghvfadcwcr5p88w8j217cgaf094pmpqllij3l0q1yg104l";
minimumOTPVersion = "18";
}

View File

@@ -0,0 +1,7 @@
{ mkDerivation }:
mkDerivation rec {
version = "1.4.5";
sha256 = "18ivcxmh5bak13k3rjy7jjzin57rgb2nffhwnqb2wl7bpi8mrarw";
minimumOTPVersion = "18";
}

View File

@@ -0,0 +1,7 @@
{ mkDerivation }:
mkDerivation rec {
version = "1.5.0-rc.2";
sha256 = "0wfxsfz1qbb6iapg8j1qskva6j4mccxqvv79xbz08fzzb6n1wvxa";
minimumOTPVersion = "18";
}

View File

@@ -1,71 +0,0 @@
{ stdenv, fetchFromGitHub, erlang, rebar, makeWrapper, coreutils, curl, bash,
debugInfo ? false }:
stdenv.mkDerivation rec {
name = "elixir-${version}";
version = "1.4.4";
src = fetchFromGitHub {
owner = "elixir-lang";
repo = "elixir";
rev = "v${version}";
sha256 = "0m51cirkv1dahw4z2jlmz58cwmpy0dya88myx4wykq0v5bh1xbq8";
};
buildInputs = [ erlang rebar makeWrapper ];
# Elixir expects that UTF-8 locale to be set (see https://github.com/elixir-lang/elixir/issues/3548).
# In other cases there is warnings during compilation.
LANG = "en_US.UTF-8";
LC_TYPE = "en_US.UTF-8";
setupHook = ./setup-hook.sh;
inherit debugInfo;
buildFlags = if debugInfo
then "ERL_COMPILER_OPTIONS=debug_info"
else "";
preBuild = ''
# The build process uses ./rebar. Link it to the nixpkgs rebar
rm -v rebar
ln -s ${rebar}/bin/rebar rebar
substituteInPlace Makefile \
--replace "/usr/local" $out
'';
postFixup = ''
# Elixir binaries are shell scripts which run erl. Add some stuff
# to PATH so the scripts can run without problems.
for f in $out/bin/*; do
b=$(basename $f)
if [ $b == "mix" ]; then continue; fi
wrapProgram $f \
--prefix PATH ":" "${stdenv.lib.makeBinPath [ erlang coreutils curl bash ]}" \
--set CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
done
substituteInPlace $out/bin/mix \
--replace "/usr/bin/env elixir" "${coreutils}/bin/env elixir"
'';
meta = with stdenv.lib; {
homepage = "http://elixir-lang.org/";
description = "A functional, meta-programming aware language built on top of the Erlang VM";
longDescription = ''
Elixir is a functional, meta-programming aware language built on
top of the Erlang VM. It is a dynamic language with flexible
syntax and macro support that leverages Erlang's abilities to
build concurrent, distributed and fault-tolerant applications
with hot code upgrades.
'';
license = licenses.epl10;
platforms = platforms.unix;
maintainers = with maintainers; [ the-kenny havvy couchemar ];
};
}

View File

@@ -0,0 +1,77 @@
{ pkgs, stdenv, fetchFromGitHub, erlang, rebar, makeWrapper,
coreutils, curl, bash, debugInfo ? false }:
{ baseName ? "elixir"
, version
, minimumOTPVersion
, sha256 ? null
, rev ? "v${version}"
, src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; }
}:
let
inherit (stdenv.lib) getVersion versionAtLeast;
in
assert versionAtLeast (getVersion erlang) minimumOTPVersion;
stdenv.mkDerivation ({
name = "${baseName}-${version}";
inherit src version;
buildInputs = [ erlang rebar makeWrapper ];
LANG = "en_US.UTF-8";
LC_TYPE = "en_US.UTF-8";
setupHook = ./setup-hook.sh;
inherit debugInfo;
buildFlags = if debugInfo
then "ERL_COMPILER_OPTIONS=debug_info"
else "";
preBuild = ''
# The build process uses ./rebar. Link it to the nixpkgs rebar
rm -v rebar
ln -s ${rebar}/bin/rebar rebar
substituteInPlace Makefile \
--replace "/usr/local" $out
'';
postFixup = ''
# Elixir binaries are shell scripts which run erl. Add some stuff
# to PATH so the scripts can run without problems.
for f in $out/bin/*; do
b=$(basename $f)
if [ "$b" = mix ]; then continue; fi
wrapProgram $f \
--prefix PATH ":" "${stdenv.lib.makeBinPath [ erlang coreutils curl bash ]}" \
--set CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
done
substituteInPlace $out/bin/mix \
--replace "/usr/bin/env elixir" "${coreutils}/bin/env elixir"
'';
meta = with stdenv.lib; {
homepage = "http://elixir-lang.org/";
description = "A functional, meta-programming aware language built on top of the Erlang VM";
longDescription = ''
Elixir is a functional, meta-programming aware language built on
top of the Erlang VM. It is a dynamic language with flexible
syntax and macro support that leverages Erlang's abilities to
build concurrent, distributed and fault-tolerant applications
with hot code upgrades.
'';
license = licenses.epl10;
platforms = platforms.unix;
maintainers = with maintainers; [ the-kenny havvy couchemar ankhers ];
};
})

View File

@@ -0,0 +1,10 @@
{ mkDerivation, fetchurl }:
mkDerivation rec {
version = "20.0";
sha256 = "12dbay254ivnakwknjn5h55wndb0a0wqx55p156h8hwjhykj2kn0";
prePatch = ''
substituteInPlace configure.in --replace '`sw_vers -productVersion`' '10.10'
'';
}

View File

@@ -1,5 +1,7 @@
{ fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring
, libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null }:
, libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null
, hostPlatform
}:
# Do either a coverage analysis build or a standard build.
(if coverageAnalysis != null
@@ -84,7 +86,7 @@
setupHook = ./setup-hook-2.0.sh;
crossAttrs.preConfigure =
stdenv.lib.optionalString (stdenv.cross.config == "i586-pc-gnu")
stdenv.lib.optionalString (hostPlatform.isHurd)
# On GNU, libgc depends on libpthread, but the cross linker doesn't
# know where to find libpthread, which leads to erroneous test failures
# in `configure', where `-pthread' and `-lpthread' aren't explicitly

View File

@@ -1,5 +1,7 @@
{ fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring
, libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null }:
, libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null
, hostPlatform
}:
# Do either a coverage analysis build or a standard build.
(if coverageAnalysis != null
@@ -80,7 +82,7 @@
setupHook = ./setup-hook-2.2.sh;
crossAttrs.preConfigure =
stdenv.lib.optionalString (stdenv.cross.config == "i586-pc-gnu")
stdenv.lib.optionalString (hostPlatform.isHurd)
# On GNU, libgc depends on libpthread, but the cross linker doesn't
# know where to find libpthread, which leads to erroneous test failures
# in `configure', where `-pthread' and `-lpthread' aren't explicitly

View File

@@ -1,13 +1,16 @@
{ stdenv, fetchurl, makeWrapper, jre }:
{ stdenv, callPackage, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
let
# The version number here is whatever is reported by the RUBY_VERSION string
rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "3" "3" "";
jruby = stdenv.mkDerivation rec {
name = "jruby-${version}";
version = "9.0.5.0";
version = "9.1.12.0";
src = fetchurl {
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz";
sha256 = "1wysymqzc7591743f2ycgwpm232y6i050izn72lck44nhnyr5wwy";
sha256 = "15x5w4awy8h6xfkbj0p4xnb68xzfrss1rf2prk0kzk5kyjakrcnx";
};
buildInputs = [ makeWrapper ];
@@ -18,16 +21,42 @@ stdenv.mkDerivation rec {
rm $out/bin/*.{bat,dll,exe,sh}
mv $out/COPYING $out/LICENSE* $out/docs
for i in $out/bin/*; do
for i in $out/bin/jruby{,.bash}; do
wrapProgram $i \
--set JAVA_HOME ${jre}
done
ln -s $out/bin/jruby $out/bin/ruby
# Bundler tries to create this directory
mkdir -pv $out/${passthru.gemPath}
mkdir -p $out/nix-support
cat > $out/nix-support/setup-hook <<EOF
addGemPath() {
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
}
envHooks+=(addGemPath)
EOF
'';
passthru = rec {
rubyEngine = "jruby";
gemPath = "lib/${rubyEngine}/gems/${rubyVersion.libDir}";
libPath = "lib/${rubyEngine}/${rubyVersion.libDir}";
};
meta = {
description = "Ruby interpreter written in Java";
homepage = http://jruby.org/;
license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ];
platforms = stdenv.lib.platforms.unix;
};
}
};
in jruby.overrideAttrs (oldAttrs: {
passthru = oldAttrs.passthru // {
devEnv = callPackage ../ruby/dev.nix {
ruby = jruby;
};
};
})

View File

@@ -0,0 +1,7 @@
{ mkDerivation }:
mkDerivation {
version = "1.2.1";
sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz";
maximumOTPVersion = "19";
}

View File

@@ -1,29 +1,38 @@
{ stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, beamPackages }:
{ stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, buildRebar3, buildHex }:
{ baseName ? "lfe"
, version
, maximumOTPVersion
, sha256 ? null
, rev ? version
, src ? fetchFromGitHub { inherit rev sha256; owner = "rvirding"; repo = "lfe"; }
}:
let
inherit (beamPackages) buildRebar3 buildHex;
proper = buildHex rec {
name = "proper";
inherit (stdenv.lib) getVersion versionAtLeast splitString head;
mainVersion = head (splitString "." (getVersion erlang));
proper = buildHex {
name = "proper";
version = "1.1.1-beta";
sha256 = "0hnkhs761yjynw9382w8wm4j3x0r7lllzavaq2kh9n7qy3zc1rdx";
configurePhase = ''
${erlang}/bin/escript write_compile_flags include/compile_flags.hrl
'';
};
in
buildRebar3 rec {
name = "lfe";
version = "1.2.1";
assert versionAtLeast maximumOTPVersion mainVersion;
src = fetchFromGitHub {
owner = "rvirding";
repo = name;
rev = version;
sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz";
};
buildRebar3 {
name = baseName;
buildInputs = [ makeWrapper ];
inherit src version;
buildInputs = [ erlang makeWrapper ];
beamDeps = [ proper ];
patches = [ ./no-test-deps.patch ];
doCheck = true;
@@ -41,6 +50,7 @@ buildRebar3 rec {
install -m644 _build/default/lib/lfe/ebin/* $ebindir
install -m755 -d $bindir
for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done
install -m755 -d $out/bin
@@ -70,7 +80,7 @@ buildRebar3 rec {
downloadPage = "https://github.com/rvirding/lfe/releases";
license = licenses.asl20;
maintainers = with maintainers; [ yurrriq ];
maintainers = with maintainers; [ yurrriq ankhers ];
platforms = platforms.unix;
};
}

View File

@@ -1,4 +1,6 @@
{ stdenv, fetchurl, readline, compat ? false }:
{ stdenv, fetchurl, readline, compat ? false
, hostPlatform
}:
let
dsoPatch = fetchurl {
@@ -55,21 +57,15 @@ stdenv.mkDerivation rec {
'';
crossAttrs = let
isMingw = stdenv.cross.libc == "msvcrt";
isDarwin = stdenv.cross.libc == "libSystem";
inherit (hostPlatform) isDarwin isMingw;
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
CC=${stdenv.cross.config}-gcc
STRIP=:
RANLIB=${stdenv.cross.config}-ranlib
V=${luaversion}
R=${version}
${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin ''
AR="${stdenv.cross.config}-ar rcu"
macosx
''}
)
'' + stdenv.lib.optionalString isMingw ''

View File

@@ -1,4 +1,6 @@
{ stdenv, fetchurl, readline, compat ? false }:
{ stdenv, fetchurl, readline, compat ? false
, hostPlatform
}:
stdenv.mkDerivation rec {
name = "lua-${version}";
@@ -54,21 +56,15 @@ stdenv.mkDerivation rec {
'';
crossAttrs = let
isMingw = stdenv.cross.libc == "msvcrt";
isDarwin = stdenv.cross.libc == "libSystem";
inherit (hostPlatform) isDarwin isMingw;
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
CC=${stdenv.cross.config}-gcc
STRIP=:
RANLIB=${stdenv.cross.config}-ranlib
V=${luaversion}
R=${version}
${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin ''
AR="${stdenv.cross.config}-ar rcu"
macosx
''}
)
'' + stdenv.lib.optionalString isMingw ''

View File

@@ -1,41 +1,72 @@
{ stdenv, fetchurl }:
{ stdenv, lib, fetchurl, hostPlatform }:
rec {
stdenv.mkDerivation rec {
name = "luajit-${version}";
version = "2.1.0-beta3";
luaversion = "5.1";
luajit = luajit_2_1;
src = fetchurl {
url = "http://luajit.org/download/LuaJIT-${version}.tar.gz";
luajit_2_0 = generic {
version = "2.0.5";
isStable = true;
sha256 = "0yg9q4q6v028bgh85317ykc9whgxgysp76qzaqgq55y6jy11yjw7";
} // {
# 64-bit ARM isn't supported upstream
meta = meta // {
platforms = lib.filter (p: p != "aarch64-linux") meta.platforms;
};
};
luajit_2_1 = generic {
version = "2.1.0-beta3";
isStable = false;
sha256 = "1hyrhpkwjqsv54hnnx4cl8vk44h9d6c9w0fz1jfjz00w255y7lhs";
};
enableParallelBuilding = true;
patchPhase = ''
substituteInPlace Makefile \
--replace /usr/local $out
substituteInPlace src/Makefile --replace gcc cc
'' + stdenv.lib.optionalString (stdenv.cc.libc != null)
''
substituteInPlace Makefile \
--replace ldconfig ${stdenv.cc.libc.bin or stdenv.cc.libc}/bin/ldconfig
'';
configurePhase = false;
buildFlags = [ "amalg" ]; # Build highly optimized version
installPhase = ''
make install INSTALL_INC=$out/include PREFIX=$out
ln -s $out/bin/luajit* $out/bin/lua
ln -s $out/bin/luajit* $out/bin/luajit
'';
meta = with stdenv.lib; {
description = "High-performance JIT compiler for Lua 5.1";
homepage = http://luajit.org;
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers ; [ thoughtpolice smironov ];
maintainers = with maintainers ; [ thoughtpolice smironov vcunat ];
};
generic =
{ version, sha256 ? null, isStable
, name ? "luajit-${version}"
, src ?
(fetchurl {
url = "http://luajit.org/download/LuaJIT-${version}.tar.gz";
inherit sha256;
})
}:
stdenv.mkDerivation rec {
inherit name version src meta;
luaversion = "5.1";
patchPhase = ''
substituteInPlace Makefile \
--replace /usr/local "$out"
substituteInPlace src/Makefile --replace gcc cc
'' + stdenv.lib.optionalString (stdenv.cc.libc != null)
''
substituteInPlace Makefile \
--replace ldconfig ${stdenv.cc.libc.bin or stdenv.cc.libc}/bin/ldconfig
'';
configurePhase = false;
buildFlags = [ "amalg" ]; # Build highly optimized version
enableParallelBuilding = true;
installPhase = ''
make install INSTALL_INC="$out"/include PREFIX="$out"
ln -s "$out"/bin/luajit-* "$out"/bin/lua
''
+ stdenv.lib.optionalString (!isStable)
''
ln -s "$out"/bin/luajit-* "$out"/bin/luajit
'';
};
}

View File

@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
rewriting logic computation.
'';
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.peti ];
};
}

View File

@@ -36,7 +36,8 @@ let
./no-sys-dirs.patch
]
++ optional stdenv.isSunOS ./ld-shared.patch
++ optional stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ];
++ optional stdenv.isDarwin ./cpp-precomp.patch
++ optional (stdenv.isDarwin && versionAtLeast version "5.24") ./sw_vers.patch;
postPatch = ''
pwd="$(type -P pwd)"

View File

@@ -325,17 +325,17 @@ let
in {
php56 = generic {
version = "5.6.30";
sha256 = "01krq8r9xglq59x376zlg261yikckq179jmhnlcg3gqxza9w41d1";
version = "5.6.31";
sha256 = "03xixkvfp64bqp97p8vlj3hp63bpjw7hc16b7fgm7w35rdlp2fcg";
};
php70 = generic {
version = "7.0.19";
sha256 = "0nbxgx5fkj1bcach97a3169kwic7jbd4b435n7v25v1aq2pw0fhg";
version = "7.0.21";
sha256 = "07r3qqyyvf16k4xk5b2070fwilggmph5937drjm8cvyyjb1k789b";
};
php71 = generic {
version = "7.1.5";
sha256 = "15w60nrickdi0rlsy5yw6aa1j42m6z2chv90f7fbgn0v9xwa9si8";
version = "7.1.7";
sha256 = "1y0z5n0kyd15wzmn1lprjgaysbg0z428q9cjbx4dqf3zk296g6q7";
};
}

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl
{ stdenv, hostPlatform, fetchurl
, bzip2
, gdbm
, fetchpatch
@@ -69,7 +69,7 @@ let
./glibc-2.25-enosys.patch
] ++ optionals stdenv.isCygwin [
] ++ optionals hostPlatform.isCygwin [
./2.5.2-ctypes-util-find_library.patch
./2.5.2-tkinter-x11.patch
./2.6.2-ssl-threads.patch
@@ -110,7 +110,7 @@ let
"--enable-shared"
"--with-threads"
"--enable-unicode=ucs4"
] ++ optionals stdenv.isCygwin [
] ++ optionals hostPlatform.isCygwin [
"--with-system-ffi"
"--with-system-expat"
"ac_cv_func_bind_textdomain_codeset=yes"
@@ -118,14 +118,14 @@ let
"--disable-toolbox-glue"
];
postConfigure = if stdenv.isCygwin then ''
postConfigure = if hostPlatform.isCygwin then ''
sed -i Makefile -e 's,PYTHONPATH="$(srcdir),PYTHONPATH="$(abs_srcdir),'
'' else null;
buildInputs =
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
[ bzip2 openssl zlib ]
++ optionals stdenv.isCygwin [ expat libffi ]
++ optionals hostPlatform.isCygwin [ expat libffi ]
++ [ db gdbm ncurses sqlite readline ]
++ optionals x11Support [ tcl tk xlibsWrapper libX11 ]
++ optionals stdenv.isDarwin [ CF configd ];
@@ -190,6 +190,8 @@ in stdenv.mkDerivation {
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'' + optionalString hostPlatform.isCygwin ''
cp libpython2.7.dll.a $out/lib
'';
passthru = let

View File

@@ -59,7 +59,7 @@ let
srcs = [ rubySrc rubygemsSrc ];
sourceRoot =
if useRailsExpress then
"ruby-${tag}-src"
rubySrc.name
else
unpackdir rubySrc;