Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk
2019-01-15 16:59:03 +01:00
167 changed files with 6971 additions and 4962 deletions
+37 -13
View File
@@ -1,10 +1,15 @@
{ stdenv, lib, fetchurl, fetchpatch
{ stdenv, lib, fetchurl, fetchpatch, makeWrapper
, coq, ocamlPackages, coq2html
, tools ? stdenv.cc
}:
assert lib.versionAtLeast ocamlPackages.ocaml.version "4.02";
assert lib.versionAtLeast coq.coq-version "8.6.1";
let
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
in
stdenv.mkDerivation rec {
name = "compcert-${version}";
version = "3.4";
@@ -14,34 +19,53 @@ stdenv.mkDerivation rec {
sha256 = "12gchwvkzhd2bhrnwzfb4a06wc4hgv98z987k06vj7ga31ii763h";
};
buildInputs = [ coq coq2html ]
++ (with ocamlPackages; [ ocaml findlib menhir ]);
nativeBuildInputs = [ makeWrapper ];
buildInputs = ocaml-pkgs ++ [ coq coq2html ];
enableParallelBuilding = true;
patchPhase = ''
substituteInPlace ./configure \
--replace '{toolprefix}gcc' '{toolprefix}cc'
'';
configurePhase = ''
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
./configure -clightgen -prefix $out -toolprefix ${tools}/bin/ '' +
(if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux");
./configure -clightgen \
-prefix $out \
-toolprefix ${tools}/bin/ \
${ccomp-platform}
'';
installTargets = "documentation install";
postInstall = ''
mkdir -p $lib/share/doc/compcert
mv doc/html $lib/share/doc/compcert/
# move man into place
mkdir -p $man/share
mv $out/share/man/ $man/share/
# move docs into place
mkdir -p $doc/share/doc/compcert
mv doc/html $doc/share/doc/compcert/
# install compcert lib files; remove copy from $out, too
mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
mv backend cfrontend common cparser driver flocq x86 x86_64 lib \
$lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
rm -rf $out/lib/compcert/coq
# wrap ccomp to undefine _FORTIFY_SOURCE; ccomp invokes cc1 which sets
# _FORTIFY_SOURCE=2 by default, but undefines __GNUC__ (as it should),
# which causes a warning in libc. this suppresses it.
for x in ccomp clightgen; do
wrapProgram $out/bin/$x --add-flags "-U_FORTIFY_SOURCE"
done
'';
outputs = [ "out" "lib" ];
outputs = [ "out" "lib" "doc" "man" ];
meta = with stdenv.lib; {
description = "Formally verified C compiler";
homepage = "http://compcert.inria.fr";
license = licenses.inria-compcert;
platforms = platforms.linux ++
platforms.darwin;
platforms = [ "x86_64-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
};
}
+2 -2
View File
@@ -3,11 +3,11 @@
stdenvNoCC.mkDerivation rec {
name = "fasm-bin-${version}";
version = "1.73.04";
version = "1.73.05";
src = fetchurl {
url = "https://flatassembler.net/fasm-${version}.tgz";
sha256 = "0y0xkf9fzcm5gklhdi61wjpd1p8islpbcnkv5k16aqci3qsd0ia1";
sha256 = "0qpj6cs9rp1bg2rqxg1k8j71918rh86hplyw4n82n11ndwk23ni5";
};
installPhase = ''
+1 -1
View File
@@ -112,7 +112,7 @@ stdenv.mkDerivation (rec {
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch
++ stdenv.lib.optional (targetPlatform.isAarch32 || targetPlatform.isAarch64) (fetchpatch {
url = "https://git.haskell.org/ghc.git/patch/d8495549ba9d194815c2d0eaee6797fc7c00756a";
sha256 = "1czx12qcl088vjn7mqxvyja4b2ia2n09c28br8c777fd0xk069pm";
sha256 = "1yjcma507c609bcim4rnxq0gaj2dg4d001jklmbpbqpzqzxkn5sz";
});
postPatch = "patchShebangs .";
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake
{ stdenv, fetchFromGitHub, cmake, makeWrapper
, boost, python3
, icestorm, trellis
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
sha256 = "082ac03s6164s7dwz1l9phshl8m1lizn45jykabrhks5jcccchbh";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs
= [ boostPython python3 ]
++ (stdenv.lib.optional enableGui qtbase);
@@ -55,6 +55,13 @@ stdenv.mkDerivation rec {
--replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
'';
postInstall = stdenv.lib.optionalString enableGui ''
for x in generic ice40 ecp5; do
wrapProgram $out/bin/nextpnr-$x \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtbase.qtCompatVersion}/plugins
done
'';
meta = with stdenv.lib; {
description = "Place and route tool for FPGAs";
homepage = https://github.com/yosyshq/nextpnr;