Merge branch 'master' into staging
Hydra nixpkgs: ?compare=1279790
This commit is contained in:
36
pkgs/development/compilers/avian/default.nix
Normal file
36
pkgs/development/compilers/avian/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ stdenv, fetchFromGitHub, zlib, jdk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "avian-${version}";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "readytalk";
|
||||
repo = "avian";
|
||||
rev = "v${version}";
|
||||
sha256 = "1j2y45cpqk3x6a743mgpg7z3ivwm7qc9jy6xirvay7ah1qyxmm48";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
jdk
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp build/*/avian $out/bin/
|
||||
cp build/*/avian-dynamic $out/bin/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Lightweight Java virtual machine";
|
||||
longDescription = ''
|
||||
Avian is a lightweight virtual machine and class library designed
|
||||
to provide a useful subset of Java’s features, suitable for
|
||||
building self-contained applications.
|
||||
'';
|
||||
homepage = https://readytalk.github.io/avian/;
|
||||
license = stdenv.lib.licenses.isc;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -89,6 +89,6 @@ stdenv.mkDerivation rec {
|
||||
description = "A concatenative, stack-based programming language";
|
||||
|
||||
maintainers = [ maintainers.vrthra ];
|
||||
platforms = platforms.linux;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
preConfigure = ''
|
||||
echo >mk/build.mk "${buildMK}"
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
@@ -43,6 +45,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
];
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
|
||||
@@ -30,6 +30,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
@@ -42,6 +44,7 @@ stdenv.mkDerivation rec {
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ stdenv.lib.optional stdenv.isDarwin [
|
||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||
];
|
||||
|
||||
@@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
@@ -35,6 +37,7 @@ stdenv.mkDerivation rec {
|
||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ stdenv.lib.optional stdenv.isDarwin [
|
||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||
];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchurl, tzdata, iana_etc, go_1_4, runCommand
|
||||
{ stdenv, lib, fetchFromGitHub, tzdata, iana_etc, go_1_4, runCommand
|
||||
, perl, which, pkgconfig, patch
|
||||
, pcre
|
||||
, Security, Foundation }:
|
||||
@@ -15,11 +15,13 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-${version}";
|
||||
version = "1.5.3";
|
||||
version = "1.5.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/golang/go/archive/go${version}.tar.gz";
|
||||
sha256 = "1n2niq0147pqflqh8j1s5wv8aq3vlh58ni3bp9add261z5q1g50k";
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "go";
|
||||
rev = "go${version}";
|
||||
sha256 = "1lvk9awmkjbz5z4snv3q3b3r7ijfz97kig2wkqz6jmr7b0lp1fcy";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# build tools
|
||||
, gfortran, m4, makeWrapper, patchelf, perl, which, python2
|
||||
# libjulia dependencies
|
||||
, libunwind, llvm, readline, utf8proc, zlib
|
||||
, libunwind, readline, utf8proc, zlib
|
||||
# standard library dependencies
|
||||
, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
|
||||
# linear algebra
|
||||
@@ -22,16 +22,22 @@ let
|
||||
in
|
||||
|
||||
let
|
||||
llvmVersion = "3.7.1";
|
||||
llvm = fetchurl {
|
||||
url = "http://llvm.org/releases/${llvmVersion}/llvm-${llvmVersion}.src.tar.xz";
|
||||
sha256 = "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy";
|
||||
};
|
||||
|
||||
dsfmtVersion = "2.2.3";
|
||||
dsfmt = fetchurl {
|
||||
url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz";
|
||||
sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42";
|
||||
};
|
||||
|
||||
libuvVersion = "07730c4bd595b4d45a498a8ee0bcd53878ff7c10";
|
||||
libuvVersion = "a1d9166a440e4a0664c0e6de6ebe25350de56a42";
|
||||
libuv = fetchurl {
|
||||
url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}";
|
||||
sha256 = "19nk8vdvx2mxyrwpndb7888c3b237ja5xvxr3jk5ah77ix3srr3h";
|
||||
sha256 = "1sjvly4ylfyj8kxnx0gsjj2f70cg17h302h1i08gfndrqam68za5";
|
||||
};
|
||||
|
||||
rmathVersion = "0.1";
|
||||
@@ -40,26 +46,27 @@ let
|
||||
sha256 = "0ai5dhjc43zcvangz123ryxmlbm51s21rg13bllwyn98w67arhb4";
|
||||
};
|
||||
|
||||
virtualenvVersion = "1.11.6";
|
||||
virtualenvVersion = "15.0.0";
|
||||
virtualenv = fetchurl {
|
||||
url = "mirror://pypi/v/virtualenv/virtualenv-${virtualenvVersion}.tar.gz";
|
||||
sha256 = "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy";
|
||||
sha256 = "06fw4liazpx5vf3am45q2pdiwrv0id7ckv7n6zmpml29x6vkzmkh";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "julia";
|
||||
version = "0.4.4-pre-2016-02-08";
|
||||
version = "0.5.0-dev-2016-06-10";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/JuliaLang/${pname}";
|
||||
rev = "cb93e6b70b4b1313b4de8c54e55e85c8eb43daa3";
|
||||
sha256 = "1xihq66il4wlxfm5fsgcirh76dq936fm887v2ynqkm3kz7ahhssw";
|
||||
rev = "56d7d6672c7db717dacb5e34f485180c2eba83b2";
|
||||
sha256 = "1wbrzdrxp94i7yxdgf3qgrjshmqxi0c4bqz7wy0c0c0kjlg6flmx";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
mkdir deps/srccache
|
||||
cp "${llvm}" "./deps/srccache/llvm-${llvmVersion}.src.tar.xz"
|
||||
cp "${dsfmt}" "./deps/srccache/dsfmt-${dsfmtVersion}.tar.gz"
|
||||
cp "${rmath-julia}" "./deps/srccache/Rmath-julia-${rmathVersion}.tar.gz"
|
||||
cp "${libuv}" "./deps/srccache/libuv-${libuvVersion}.tar.gz"
|
||||
@@ -76,7 +83,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
arpack fftw fftwSinglePrec gmp libgit2 libunwind llvm mpfr
|
||||
arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
|
||||
pcre2 openblas openlibm openspecfun readline suitesparse utf8proc
|
||||
zlib
|
||||
];
|
||||
@@ -117,7 +124,8 @@ stdenv.mkDerivation rec {
|
||||
"USE_SYSTEM_GMP=1"
|
||||
"USE_SYSTEM_LIBGIT2=1"
|
||||
"USE_SYSTEM_LIBUNWIND=1"
|
||||
"USE_SYSTEM_LLVM=1"
|
||||
# 'replutil' test failure with LLVM 3.8.0, invalid libraries with 3.7.1
|
||||
"USE_SYSTEM_LLVM=0"
|
||||
"USE_SYSTEM_MPFR=1"
|
||||
"USE_SYSTEM_OPENLIBM=1"
|
||||
"USE_SYSTEM_OPENSPECFUN=1"
|
||||
@@ -155,7 +163,7 @@ stdenv.mkDerivation rec {
|
||||
postInstall = ''
|
||||
for prog in "$out/bin/julia" "$out/bin/julia-debug"; do
|
||||
wrapProgram "$prog" \
|
||||
--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \
|
||||
--prefix LD_LIBRARY_PATH : "$out/lib/julia:$LD_LIBRARY_PATH" \
|
||||
--prefix PATH : "${curl}/bin"
|
||||
done
|
||||
'';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nim-0.13.0";
|
||||
name = "nim-0.14.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://nim-lang.org/download/${name}.tar.xz";
|
||||
sha256 = "1adiij20n1cigsc44dbp60jdbydmkfp7ixbddmcn6h4dfvjzaqfd";
|
||||
sha256 = "14jy7wza54jawja21r6v676qyj0i9kg1jpn5bxwn8wfm1vbki3cg";
|
||||
};
|
||||
|
||||
buildPhase = "sh build.sh";
|
||||
|
||||
@@ -18,42 +18,42 @@ let
|
||||
else
|
||||
throw "openjdk requires i686-linux or x86_64 linux";
|
||||
|
||||
update = "92";
|
||||
build = "14";
|
||||
update = "102";
|
||||
build = "04";
|
||||
baseurl = "http://hg.openjdk.java.net/jdk8u/jdk8u";
|
||||
repover = "jdk8u${update}-b${build}";
|
||||
paxflags = if stdenv.isi686 then "msp" else "m";
|
||||
jdk8 = fetchurl {
|
||||
url = "${baseurl}/archive/${repover}.tar.gz";
|
||||
sha256 = "05ly2v3b6vr3sxa27m7ahlp8w4w1q68rki2dfczrklcdq4l61g0r";
|
||||
sha256 = "1qwpkg169zrgx58iw8kzgr6l6chyh9n7ngkyabdfcp60i0qpga93";
|
||||
};
|
||||
langtools = fetchurl {
|
||||
url = "${baseurl}/langtools/archive/${repover}.tar.gz";
|
||||
sha256 = "1zb7gvj1b1q3pvq5x7ac98k5dk83m7849ngcy1swfwj18g8i4k9p";
|
||||
sha256 = "0nj9h0651ks9rssy58ma2fvnc05viwbfc91a6dxhkr1935bmzh3p";
|
||||
};
|
||||
hotspot = fetchurl {
|
||||
url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
|
||||
sha256 = "057qrhm9gbz672qgb85al9p3qvgvbviadppf5a9b8hp5sg322f35";
|
||||
sha256 = "07719n5bxi4yhqisnj77h4w6psih75ja3v7nx7j623ynbb7xjb07";
|
||||
};
|
||||
corba = fetchurl {
|
||||
url = "${baseurl}/corba/archive/${repover}.tar.gz";
|
||||
sha256 = "0s9h61jw42nbvrw24qaizp7pp063ala37sjgl547zfglhk1dlzi8";
|
||||
sha256 = "0gf1gy4xbzxda8pwm10lh0kbjrh5icz4pxzlbhnkxq44xvl29vd3";
|
||||
};
|
||||
jdk = fetchurl {
|
||||
url = "${baseurl}/jdk/archive/${repover}.tar.gz";
|
||||
sha256 = "0sgyjdmxsrdj8b8y2ri3c70x9l9m777v559cq8rmaz1jpc9lld4s";
|
||||
sha256 = "0k5kzp9r3zny8kg9m6jad3gckf8dshlss5dd5v28njpzcsfrsd2v";
|
||||
};
|
||||
jaxws = fetchurl {
|
||||
url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
|
||||
sha256 = "12aajlswn5nkm4nbrdh3jff2sz81wdczrgliwd5lnqfnh73sbbkp";
|
||||
sha256 = "1jw5w88yi59xarvak8rx4951090ri7jihkd17f29j1hbk6fzv052";
|
||||
};
|
||||
jaxp = fetchurl {
|
||||
url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
|
||||
sha256 = "133r5wicgva6mklrlnvb09p9izyw0fj281s51kndf3ba3zzggvv3";
|
||||
sha256 = "151fwhz1x947a1bw0wgdrkzqw6hzfrlgn682jrjn8dvyjz7inka4";
|
||||
};
|
||||
nashorn = fetchurl {
|
||||
url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
|
||||
sha256 = "1rmk868qg7kgv7f5lhj1b7wdnql0bj2bfqd2lg9ci64418j8x8bn";
|
||||
sha256 = "1vacw1hg1vgz5ydgw1m57bynq0zl5glxpgzznrajnqbwd9yq6rzp";
|
||||
};
|
||||
openjdk8 = stdenv.mkDerivation {
|
||||
name = "openjdk-8u${update}b${build}";
|
||||
|
||||
27
pkgs/development/compilers/rust/beta.nix
Normal file
27
pkgs/development/compilers/rust/beta.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ stdenv, callPackage, rustPlatform,
|
||||
targets ? [], targetToolchains ? [], targetPatches ? [] }:
|
||||
|
||||
rec {
|
||||
rustc = callPackage ./rustc.nix {
|
||||
shortVersion = "beta-1.10.0";
|
||||
forceBundledLLVM = false;
|
||||
configureFlags = [ "--release-channel=beta" ];
|
||||
srcRev = "d18e321abeecc69e4d1bf9cafba4fba53ddf267d";
|
||||
srcSha = "1ck8mbjrq0bzq5xzwgaqdilakwm2ab0xpzqibjycds62ad4yw774";
|
||||
patches = [ ./patches/disable-lockfile-check.patch ]
|
||||
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||
inherit targets;
|
||||
inherit targetPatches;
|
||||
inherit targetToolchains;
|
||||
inherit rustPlatform;
|
||||
};
|
||||
|
||||
cargo = callPackage ./cargo.nix rec {
|
||||
version = "0.10.0";
|
||||
srcRev = "refs/tags/${version}";
|
||||
srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
|
||||
depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
|
||||
inherit rustc; # the rustc that will be wrapped by cargo
|
||||
inherit rustPlatform; # used to build cargo
|
||||
};
|
||||
}
|
||||
78
pkgs/development/compilers/rust/bootstrap.nix
Normal file
78
pkgs/development/compilers/rust/bootstrap.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{ stdenv, fetchurl, makeWrapper, cacert, zlib }:
|
||||
|
||||
let
|
||||
platform =
|
||||
if stdenv.system == "i686-linux"
|
||||
then "i686-unknown-linux-gnu"
|
||||
else if stdenv.system == "x86_64-linux"
|
||||
then "x86_64-unknown-linux-gnu"
|
||||
else if stdenv.system == "i686-darwin"
|
||||
then "i686-apple-darwin"
|
||||
else if stdenv.system == "x86_64-darwin"
|
||||
then "x86_64-apple-darwin"
|
||||
else abort "missing boostrap url for platform ${stdenv.system}";
|
||||
|
||||
# fetch hashes by running `print-hashes.sh 1.9.0`
|
||||
bootstrapHash =
|
||||
if stdenv.system == "i686-linux"
|
||||
then "dd4d9bf1b9393867eb18d00431e8fb733894984f2c7b5154bc1b64d045077b45"
|
||||
else if stdenv.system == "x86_64-linux"
|
||||
then "288ff13efa2577e81c77fc2cb6e2b49b1ed0ceab51b4fa12f7efb87039ac49b7"
|
||||
else if stdenv.system == "i686-darwin"
|
||||
then "4d4d4b256d6bd6ae2527cf61007b2553de200f0a1910b7ad41e4f51d2b21e536"
|
||||
else if stdenv.system == "x86_64-darwin"
|
||||
then "d59b5509e69c1cace20a57072e3b3ecefdbfd8c7e95657b0ff2ac10aa1dfebe6"
|
||||
else throw "missing boostrap hash for platform ${stdenv.system}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
|
||||
sha256 = bootstrapHash;
|
||||
};
|
||||
|
||||
version = "1.9.0";
|
||||
in
|
||||
|
||||
rec {
|
||||
rustc = stdenv.mkDerivation rec {
|
||||
name = "rustc-bootstrap-${version}";
|
||||
|
||||
inherit version;
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
phases = ["unpackPhase" "installPhase"];
|
||||
|
||||
installPhase = ''
|
||||
./install.sh --prefix=$out \
|
||||
--components=rustc,rust-std-${platform},rust-docs
|
||||
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
"$out/bin/rustc"
|
||||
|
||||
wrapProgram "$out/bin/rustc"
|
||||
'';
|
||||
};
|
||||
|
||||
cargo = stdenv.mkDerivation rec {
|
||||
name = "cargo-bootstrap-${version}";
|
||||
|
||||
inherit version;
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ makeWrapper zlib rustc ];
|
||||
phases = ["unpackPhase" "installPhase"];
|
||||
|
||||
installPhase = ''
|
||||
./install.sh --prefix=$out \
|
||||
--components=cargo
|
||||
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
"$out/bin/cargo"
|
||||
|
||||
wrapProgram "$out/bin/cargo" \
|
||||
--suffix PATH : "${rustc}/bin"
|
||||
'';
|
||||
};
|
||||
}
|
||||
64
pkgs/development/compilers/rust/cargo.nix
Normal file
64
pkgs/development/compilers/rust/cargo.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{ stdenv, fetchgit, file, curl, pkgconfig, python, openssl, cmake, zlib
|
||||
, makeWrapper, libiconv, cacert, rustPlatform, rustc
|
||||
, version, srcRev, srcSha, depsSha256 }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
name = "cargo-${version}";
|
||||
inherit version;
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/rust-lang/cargo";
|
||||
rev = srcRev;
|
||||
sha256 = srcSha;
|
||||
};
|
||||
|
||||
inherit depsSha256;
|
||||
|
||||
passthru.rustc = rustc;
|
||||
|
||||
buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
configurePhase = ''
|
||||
./configure --enable-optimize --prefix=$out --local-cargo=${rustPlatform.rust.cargo}/bin/cargo
|
||||
'';
|
||||
|
||||
buildPhase = "make";
|
||||
|
||||
installPhase = ''
|
||||
make install
|
||||
${postInstall}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm "$out/lib/rustlib/components" \
|
||||
"$out/lib/rustlib/install.log" \
|
||||
"$out/lib/rustlib/rust-installer-version" \
|
||||
"$out/lib/rustlib/uninstall.sh" \
|
||||
"$out/lib/rustlib/manifest-cargo"
|
||||
|
||||
wrapProgram "$out/bin/cargo" \
|
||||
--suffix PATH : "${rustc}/bin" \
|
||||
--run "export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" \
|
||||
${stdenv.lib.optionalString stdenv.isDarwin ''--suffix DYLD_LIBRARY_PATH : "${rustc}/lib"''}
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
# Export SSL_CERT_FILE as without it one test fails with SSL verification error
|
||||
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
# Disable cross compilation tests
|
||||
export CFG_DISABLE_CROSS_TESTS=1
|
||||
cargo test
|
||||
'';
|
||||
|
||||
# Disable check phase as there are failures (author_prefers_cargo test fails)
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://crates.io;
|
||||
description = "Downloads your Rust project's dependencies and builds your project";
|
||||
maintainers = with maintainers; [ wizeman retrry ];
|
||||
license = [ licenses.mit licenses.asl20 ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
33
pkgs/development/compilers/rust/default.nix
Normal file
33
pkgs/development/compilers/rust/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform,
|
||||
targets ? [], targetToolchains ? [], targetPatches ? [] }:
|
||||
|
||||
let
|
||||
rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}) rustPlatform);
|
||||
rustSnapshotPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./snapshot.nix {}) rustPlatform);
|
||||
in
|
||||
|
||||
rec {
|
||||
rustc = callPackage ./rustc.nix {
|
||||
shortVersion = "1.9.0";
|
||||
isRelease = true;
|
||||
forceBundledLLVM = false;
|
||||
configureFlags = [ "--release-channel=stable" ];
|
||||
srcRev = "e4e8b666850a763fdf1c3c2c142856ab51e32779";
|
||||
srcSha = "1pz4qx70mqv78fxm4w1mq7csk5pssq4qmr2vwwb5v8hyx03caff8";
|
||||
patches = [ ./patches/remove-uneeded-git.patch ]
|
||||
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||
inherit targets;
|
||||
inherit targetPatches;
|
||||
inherit targetToolchains;
|
||||
rustPlatform = rustSnapshotPlatform;
|
||||
};
|
||||
|
||||
cargo = callPackage ./cargo.nix rec {
|
||||
version = "0.10.0";
|
||||
srcRev = "refs/tags/${version}";
|
||||
srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
|
||||
depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
|
||||
inherit rustc; # the rustc that will be wrapped by cargo
|
||||
inherit rustPlatform; # used to build cargo
|
||||
};
|
||||
}
|
||||
27
pkgs/development/compilers/rust/head.nix
Normal file
27
pkgs/development/compilers/rust/head.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ stdenv, callPackage, rustPlatform,
|
||||
targets ? [], targetToolchains ? [], targetPatches ? [] }:
|
||||
|
||||
rec {
|
||||
rustc = callPackage ./rustc.nix {
|
||||
shortVersion = "master-1.11.0";
|
||||
forceBundledLLVM = false;
|
||||
srcRev = "298730e7032cd55809423773da397cd5c7d827d4";
|
||||
srcSha = "0hyz5j1z75sjkgsifzgxviv3b1lhgaz8wqwvmq80xx5vd78yd0c1";
|
||||
patches = [ ./patches/disable-lockfile-check.patch
|
||||
./patches/use-rustc-1.9.0.patch ]
|
||||
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||
inherit targets;
|
||||
inherit targetPatches;
|
||||
inherit targetToolchains;
|
||||
inherit rustPlatform;
|
||||
};
|
||||
|
||||
cargo = callPackage ./cargo.nix rec {
|
||||
version = "2016.06.07";
|
||||
srcRev = "3e70312a2a4ebedace131fc63bb8f27463c5db28";
|
||||
srcSha = "0nibzyfjkiqfnq0c00hhqvs856l5qls8wds252p97q5q92yvp40f";
|
||||
depsSha256 = "1xbb33aqnf5yyws6gjys9w8kznbh9rh6hw8mpg1hhq1ahipc2j1f";
|
||||
inherit rustc; # the rustc that will be wrapped by cargo
|
||||
inherit rustPlatform; # used to build cargo
|
||||
};
|
||||
}
|
||||
17
pkgs/development/compilers/rust/print-hashes.sh
Executable file
17
pkgs/development/compilers/rust/print-hashes.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
PLATFORMS="i686-unknown-linux-gnu x86_64-unknown-linux-gnu i686-apple-darwin x86_64-apple-darwin"
|
||||
BASEURL="https://static.rust-lang.org/dist"
|
||||
VERSION=$1
|
||||
|
||||
if [[ -z $VERSION ]]
|
||||
then
|
||||
echo "No version supplied"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
for PLATFORM in $PLATFORMS
|
||||
do
|
||||
URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256"
|
||||
curl $URL
|
||||
done
|
||||
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps
|
||||
, llvm, jemalloc, ncurses, darwin, binutils, rustc
|
||||
, llvm, jemalloc, ncurses, darwin, binutils, rustPlatform, git
|
||||
|
||||
, isRelease ? false
|
||||
, shortVersion
|
||||
@@ -7,22 +7,11 @@
|
||||
, srcSha, srcRev
|
||||
, configureFlags ? []
|
||||
, patches
|
||||
, targets
|
||||
, targetPatches
|
||||
, targetToolchains
|
||||
} @ args:
|
||||
|
||||
/* Rust's build process has a few quirks :
|
||||
|
||||
- The Rust compiler is written is Rust, so it requires a bootstrap
|
||||
compiler, which is downloaded during the build. To make the build
|
||||
pure, we download it ourself before and put it where it is
|
||||
expected. Once the language is stable (1.0) , we might want to
|
||||
switch it to use nix's packaged rust compiler. This might not be possible
|
||||
as the compiler is highly coupled to the bootstrap.
|
||||
|
||||
NOTE : some derivation depend on rust. When updating this, please make
|
||||
sure those derivations still compile. (racer, for example).
|
||||
|
||||
*/
|
||||
|
||||
let
|
||||
version = if isRelease then
|
||||
"${shortVersion}"
|
||||
@@ -35,15 +24,7 @@ let
|
||||
|
||||
llvmShared = llvm.override { enableSharedLibraries = true; };
|
||||
|
||||
target = if stdenv.system == "i686-linux"
|
||||
then "i686-unknown-linux-gnu"
|
||||
else if stdenv.system == "x86_64-linux"
|
||||
then "x86_64-unknown-linux-gnu"
|
||||
else if stdenv.system == "i686-darwin"
|
||||
then "i686-apple-darwin"
|
||||
else if stdenv.system == "x86_64-darwin"
|
||||
then "x86_64-apple-darwin"
|
||||
else abort "no snapshot to bootstrap for this platform (missing target triple)";
|
||||
target = builtins.replaceStrings [" "] [","] (builtins.toString targets);
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.rust-lang.org/;
|
||||
@@ -71,13 +52,15 @@ stdenv.mkDerivation {
|
||||
|
||||
# We need rust to build rust. If we don't provide it, configure will try to download it.
|
||||
configureFlags = configureFlags
|
||||
++ [ "--enable-local-rust" "--local-rust-root=${rustc}" "--enable-rpath" ]
|
||||
++ [ "--enable-local-rust" "--local-rust-root=${rustPlatform.rust.rustc}" "--enable-rpath" ]
|
||||
# ++ [ "--jemalloc-root=${jemalloc}/lib"
|
||||
++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils.out}/bin/ar" ]
|
||||
++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang"
|
||||
++ stdenv.lib.optional (targets != []) "--target=${target}"
|
||||
++ stdenv.lib.optional (!forceBundledLLVM) "--llvm-root=${llvmShared}";
|
||||
|
||||
inherit patches;
|
||||
patches = patches ++ targetPatches;
|
||||
passthru.target = target;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/rust-installer/gen-install-script.sh \
|
||||
@@ -112,8 +95,8 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
# ps is needed for one of the test cases
|
||||
nativeBuildInputs = [ file python2 procps rustc ];
|
||||
buildInputs = [ ncurses ]
|
||||
nativeBuildInputs = [ file python2 procps rustPlatform.rust.rustc git ];
|
||||
buildInputs = [ ncurses ] ++ targetToolchains
|
||||
++ stdenv.lib.optional (!forceBundledLLVM) llvmShared;
|
||||
|
||||
# https://github.com/rust-lang/rust/issues/30181
|
||||
@@ -125,4 +108,5 @@ stdenv.mkDerivation {
|
||||
preCheck = "export TZDIR=${tzdata}/share/zoneinfo";
|
||||
|
||||
doCheck = true;
|
||||
dontSetConfigureCross = true;
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
{ stdenv, fetchurl }:
|
||||
/* NOTE: Rust 1.9.0 is the last version that uses snapshots
|
||||
This file can be deleted after the 1.10.0 release and bootstrap.nix
|
||||
can be used instead
|
||||
*/
|
||||
{ stdenv, fetchurl, callPackage }:
|
||||
|
||||
let
|
||||
platform = if stdenv.system == "i686-linux"
|
||||
@@ -17,7 +21,6 @@ let
|
||||
https://github.com/rust-lang/rust/blob/{$shortVersion}/src/snapshots.txt
|
||||
with the set you want at the top. Make sure this is the latest snapshot
|
||||
for the tagged release and not a snapshot in the current HEAD.
|
||||
NOTE: Rust 1.9.0 is the last version that uses snapshots
|
||||
*/
|
||||
|
||||
snapshotHashLinux686 = "0e0e4448b80d0a12b75485795244bb3857a0a7ef";
|
||||
@@ -40,19 +43,23 @@ let
|
||||
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rust-bootstrap";
|
||||
src = fetchurl {
|
||||
url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
|
||||
sha1 = snapshotHash;
|
||||
rec {
|
||||
rustc = stdenv.mkDerivation {
|
||||
name = "rustc-snapshot";
|
||||
src = fetchurl {
|
||||
url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
|
||||
sha1 = snapshotHash;
|
||||
};
|
||||
dontStrip = true;
|
||||
installPhase = ''
|
||||
mkdir -p "$out"
|
||||
cp -r bin "$out/bin"
|
||||
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
||||
patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \
|
||||
"$out/bin/rustc"
|
||||
'';
|
||||
};
|
||||
dontStrip = true;
|
||||
installPhase = ''
|
||||
mkdir -p "$out"
|
||||
cp -r bin "$out/bin"
|
||||
'' + stdenv.lib.optionalString stdenv.isLinux ''
|
||||
patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/" \
|
||||
"$out/bin/rustc"
|
||||
'';
|
||||
|
||||
cargo = null;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{ stdenv, callPackage, rustcStable }:
|
||||
|
||||
callPackage ./generic.nix {
|
||||
shortVersion = "beta-1.10.0";
|
||||
forceBundledLLVM = false;
|
||||
configureFlags = [ "--release-channel=beta" ];
|
||||
srcRev = "39f3c16cca889ef3f1719d9177e3315258222a65";
|
||||
srcSha = "01bx6616lslp2mbj4h8bb6m042fs0y1z8g0jgpxvbk3fbhzwafrx";
|
||||
patches = [ ./patches/disable-lockfile-check.patch ] ++
|
||||
stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||
rustc = rustcStable;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# Please make sure to check if rustfmt still builds when updating nightly
|
||||
{ stdenv, callPackage, rustcStable }:
|
||||
|
||||
callPackage ./generic.nix {
|
||||
shortVersion = "master-1.11.0";
|
||||
forceBundledLLVM = false;
|
||||
srcRev = "298730e7032cd55809423773da397cd5c7d827d4";
|
||||
srcSha = "0hyz5j1z75sjkgsifzgxviv3b1lhgaz8wqwvmq80xx5vd78yd0c1";
|
||||
patches = [ ./patches/disable-lockfile-check.patch
|
||||
./patches/use-rustc-1.9.0.patch ] ++
|
||||
stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||
rustc = rustcStable;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{ stdenv, callPackage }:
|
||||
|
||||
callPackage ./generic.nix {
|
||||
shortVersion = "1.9.0";
|
||||
isRelease = true;
|
||||
forceBundledLLVM = false;
|
||||
configureFlags = [ "--release-channel=stable" ];
|
||||
srcRev = "e4e8b666850a763fdf1c3c2c142856ab51e32779";
|
||||
srcSha = "1pz4qx70mqv78fxm4w1mq7csk5pssq4qmr2vwwb5v8hyx03caff8";
|
||||
patches = [ ./patches/remove-uneeded-git.patch ]
|
||||
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
||||
rustc = callPackage ./bootstrap.nix {};
|
||||
}
|
||||
@@ -1,37 +1,52 @@
|
||||
{ stdenv, lua, fetchFromGitHub, fetchurl, which, llvm, clang, ncurses }:
|
||||
{ stdenv, fetchFromGitHub, fetchurl, which, llvmPackages, ncurses, lua }:
|
||||
|
||||
let luajitArchive = "LuaJIT-2.0.4.tar.gz";
|
||||
luajitSrc = fetchurl {
|
||||
url = "http://luajit.org/download/${luajitArchive}";
|
||||
sha256 = "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2";
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
let
|
||||
luajitArchive = "LuaJIT-2.0.4.tar.gz";
|
||||
luajitSrc = fetchurl {
|
||||
url = "http://luajit.org/download/${luajitArchive}";
|
||||
sha256 = "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "terra-git-${version}";
|
||||
version = "2016-01-06";
|
||||
version = "2016-06-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zdevito";
|
||||
repo = "terra";
|
||||
rev = "914cb98b8adcd50b2ec8205ef5d6914d3547e281";
|
||||
sha256 = "1q0dm9gkx2lh2d2sfgly6j5nw32qigmlj3phdvjp26bz99cvxq46";
|
||||
rev = "22696f178be8597af555a296db804dba820638ba";
|
||||
sha256 = "1c2i9ih331304bh31c5gh94fx0qa49rsn70pvczvdfhi8pmcms6g";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
outputs = [ "dev" "out" "bin" "static" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace \
|
||||
'-lcurses' '-lncurses'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
preBuild = ''
|
||||
mkdir -p build
|
||||
cp ${luajitSrc} build/${luajitArchive}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r "release/"* $out
|
||||
'';
|
||||
mkdir -pv $out/lib
|
||||
cp -v release/lib/terra.so $out/lib
|
||||
|
||||
buildInputs = [ which lua llvm clang ncurses ];
|
||||
mkdir -pv $bin/bin
|
||||
cp -v release/bin/terra $bin/bin
|
||||
|
||||
mkdir -pv $static/lib
|
||||
cp -v release/lib/libterra.a $static/lib
|
||||
|
||||
mkdir -pv $dev/include
|
||||
cp -rv release/include/terra $dev/include
|
||||
''
|
||||
;
|
||||
|
||||
buildInputs = with llvmPackages; [ which lua llvm clang-unwrapped ncurses ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit (src.meta) homepage;
|
||||
|
||||
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
checkTarget = "test";
|
||||
|
||||
postFixup = ''
|
||||
paxmark m $out/bin/tcc
|
||||
paxmark m $bin/bin/tcc
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user