Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk
2019-12-10 19:00:06 +01:00
603 changed files with 20189 additions and 5350 deletions

View File

@@ -0,0 +1,55 @@
{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }:
let
version = "6.2.1";
ocaml-version = "4.06.1";
src = fetchFromGitHub {
owner = "BuckleScript";
repo = "bucklescript";
rev = "${version}";
sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y";
fetchSubmodules = true;
};
ocaml = import ./ocaml.nix {
bs-version = version;
version = ocaml-version;
inherit stdenv;
src = "${src}/ocaml";
};
in
stdenv.mkDerivation {
inherit src version;
pname = "bs-platform";
BS_RELEASE_BUILD = "true";
buildInputs = [ nodejs python3 ];
patchPhase = ''
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
mkdir -p ./native/${ocaml-version}/bin
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
rm -f vendor/ninja/snapshot/ninja.linux
cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
'';
configurePhase = ''
node scripts/ninja.js config
'';
buildPhase = ''
node scripts/ninja.js build
'';
installPhase = ''
node scripts/install.js
mkdir -p $out/bin
cp -rf jscomp lib vendor odoc_gen native $out
cp bsconfig.json package.json $out
ln -s $out/lib/bsb $out/bin/bsb
ln -s $out/lib/bsc $out/bin/bsc
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
'';
}

View File

@@ -0,0 +1,15 @@
{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }:
let
meta = with stdenv.lib; {
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
homepage = https://bucklescript.github.io;
license = licenses.lgpl3;
maintainers = with maintainers; [ turbomack gamb ];
platforms = platforms.all;
};
in
{
bs-platform-621 = import ./bs-platform-62.nix {
inherit stdenv fetchFromGitHub ninja nodejs python3;
} // { inherit meta; };
}

View File

@@ -0,0 +1,16 @@
{ stdenv, src, version, bs-version }:
stdenv.mkDerivation rec {
inherit src version;
name = "ocaml-${version}+bs-${bs-version}";
configurePhase = ''
./configure -prefix $out
'';
buildPhase = ''
make -j9 world.opt
'';
meta = with stdenv.lib; {
branch = "4.06";
platforms = platforms.all;
};
}

View File

@@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
--replace '#!/usr/bin/env bash' '#!${runtimeShell}'
# Patch the mimetype database location which is missing on NixOS.
substituteInPlace src/mime/type_unix.go \
--replace '/etc/mime.types' '${mailcap}/etc/mime.types'
# but also allow static binaries built with NixOS to run outside nix
sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
@@ -97,7 +97,10 @@ stdenv.mkDerivation rec {
rm src/net/cgo_unix_test.go
'' + optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isAarch32 ''
echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''

View File

@@ -61,7 +61,9 @@ stdenv.mkDerivation rec {
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
'' + lib.optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
# Find the loader dynamically
LOADER="$(find ${lib.getLib libc}/lib -name ld-linux\* | head -n 1)"

View File

@@ -10,13 +10,13 @@ let
in
stdenv.mkDerivation rec {
pname = "souffle";
version = "1.7.0";
version = "1.7.1";
src = fetchFromGitHub {
owner = "souffle-lang";
repo = "souffle";
rev = version;
sha256 = "0q6cwfy3pwmaw3j1hhfk1ivcf03ijyvchyf92wdgrpj6q626kcpj";
sha256 = "0px8kh5875q2iyza4ylpa6vxpy6qxg0qvn2idk1j6dcdf5pdryph";
};
nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];