Merge staging into master

This commit is contained in:
Frederik Rietdijk 2018-05-27 17:44:08 +02:00
commit b22cc53db1
511 changed files with 3910 additions and 3158 deletions

View File

@ -109,8 +109,8 @@ buildPerlPackage rec {
};
preConfigure = ''
echo "LIB = ${db}/lib" > config.in
echo "INCLUDE = ${db}/include" >> config.in
echo "LIB = ${db.out}/lib" > config.in
echo "INCLUDE = ${db.dev}/include" >> config.in
'';
}
</programlisting>

View File

@ -1163,6 +1163,14 @@ passthru = {
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>checkInputs</varname>
</term>
<listitem><para>
A list of dependencies used by the phase. This gets included in
<varname>buildInputs</varname> when <varname>doCheck</varname> is set.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>makeFlags</varname>
</term>
@ -1646,6 +1654,15 @@ set debug-file-directory ~/.nix-profile/lib/debug
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>installCheckInputs</varname>
</term>
<listitem><para>
A list of dependencies used by the phase. This gets included in
<varname>buildInputs</varname> when <varname>doInstallCheck</varname>
is set.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>preInstallCheck</varname>
</term>

View File

@ -21,7 +21,11 @@ in rec {
darwin = [ patterns.isDarwin ];
freebsd = [ patterns.isFreeBSD ];
# Should be better, but MinGW is unclear, and HURD is bit-rotted.
gnu = [ { kernel = parse.kernels.linux; abi = abis.gnu; } ];
gnu = [
{ kernel = parse.kernels.linux; abi = parse.abis.gnu; }
{ kernel = parse.kernels.linux; abi = parse.abis.gnueabi; }
{ kernel = parse.kernels.linux; abi = parse.abis.gnueabihf; }
];
illumos = [ patterns.isSunOS ];
linux = [ patterns.isLinux ];
netbsd = [ patterns.isNetBSD ];

View File

@ -33,7 +33,7 @@ let
sh = pkgs.runtimeShell;
binshDeps = pkgs.writeReferencesToFile sh;
in
pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } ''
pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } (''
${optionalString (!isNix20) ''
extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
''}
@ -62,7 +62,11 @@ let
''}
$extraOptions
END
'';
'' + optionalString cfg.checkConfig ''
echo "Checking that Nix can read nix.conf..."
ln -s $out ./nix.conf
NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null
'');
in
@ -351,6 +355,13 @@ in
'';
};
checkConfig = mkOption {
type = types.bool;
default = true;
description = ''
If enabled (the default), checks that Nix can parse the generated nix.conf.
'';
};
};
};

View File

@ -288,6 +288,7 @@ in rec {
tests.flatpak = callTest tests/flatpak.nix {};
tests.firewall = callTest tests/firewall.nix {};
tests.fwupd = callTest tests/fwupd.nix {};
tests.gdk-pixbuf = callTest tests/gdk-pixbuf.nix {};
#tests.gitlab = callTest tests/gitlab.nix {};
tests.gitolite = callTest tests/gitolite.nix {};
tests.gjs = callTest tests/gjs.nix {};

View File

@ -0,0 +1,19 @@
# run installed tests
import ./make-test.nix ({ pkgs, ... }: {
name = "gdk-pixbuf";
meta = {
maintainers = pkgs.gdk_pixbuf.meta.maintainers;
};
machine = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
environment.variables.XDG_DATA_DIRS = [ "${pkgs.gdk_pixbuf.installedTests}/share" ];
virtualisation.memorySize = 4096; # Tests allocate a lot of memory trying to exploit a CVE
};
testScript = ''
$machine->succeed("gnome-desktop-testing-runner");
'';
})

View File

@ -25,6 +25,10 @@ stdenv.mkDerivation rec{
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
# Fails with "This application failed to start because it could not
# find or load the Qt platform plugin "minimal""
doCheck = false;
meta = {
description = "Peer-to-peer electronic cash system";
longDescription= ''

View File

@ -2,7 +2,7 @@
, seth, git, solc, shellcheck, nodejs, hevm }:
stdenv.mkDerivation rec {
name = "dapp";
name = "dapp-${version}";
version = "0.5.7";
src = fetchFromGitHub {

View File

@ -25,7 +25,7 @@ let
categories = "Network;";
};
mist = stdenv.mkDerivation {
mist = stdenv.lib.appendToName "unwrapped" (stdenv.mkDerivation {
inherit name version;
src = {
@ -53,10 +53,10 @@ let
--set-rpath "${atomEnv.libPath}:$out/lib/mist" \
$out/lib/mist/mist
'';
};
});
in
buildFHSUserEnv {
name = "mist";
name = "mist-${stdenv.lib.getVersion mist}";
targetPkgs = pkgs: with pkgs; [
mist

View File

@ -22,6 +22,8 @@ in stdenv.mkDerivation rec {
gsettings-desktop-schemas gnome3.defaultIconTheme
];
doCheck = false; # fails 1 out of 9 tests
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;

View File

@ -1,4 +1,6 @@
{ stdenv, lib, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsaLib, releasePath ? null }:
{ stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsaLib, releasePath ? null }:
with stdenv.lib;
# To use the full release version:
# 1) Sign into https://backstage.renoise.com and download the appropriate (x86 or x86_64) version
@ -6,17 +8,19 @@
# 2) Override the releasePath attribute to point to the location of the newly downloaded bundle.
# Note: Renoise creates an individual build for each license which screws somewhat with the
# use of functions like requireFile as the hash will be different for every user.
let fileversion = "3_1_0";
let
urlVersion = replaceStrings [ "." ] [ "_" ];
in
stdenv.mkDerivation rec {
name = "renoise";
buildInputs = [ libX11 libXext libXcursor libXrandr alsaLib libjack2 ];
name = "renoise-${version}";
version = "3.1.0";
src =
if stdenv.system == "x86_64-linux" then
if builtins.isNull releasePath then
fetchurl {
url = "http://files.renoise.com/demo/Renoise_${fileversion}_Demo_x86_64.tar.bz2";
url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2";
sha256 = "0pan68fr22xbj7a930y29527vpry3f07q3i9ya4fp6g7aawffsga";
}
else
@ -24,13 +28,15 @@ stdenv.mkDerivation rec {
else if stdenv.system == "i686-linux" then
if builtins.isNull releasePath then
fetchurl {
url = "http://files.renoise.com/demo/Renoise_${fileversion}_Demo_x86.tar.bz2";
url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2";
sha256 = "1lccjj4k8hpqqxxham5v01v2rdwmx3c5kgy1p9lqvzqma88k4769";
}
else
releasePath
else throw "Platform is not supported by Renoise";
buildInputs = [ libX11 libXext libXcursor libXrandr alsaLib libjack2 ];
installPhase = ''
cp -r Resources $out
@ -55,6 +61,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Modern tracker-based DAW";
homepage = http://www.renoise.com/;
license = stdenv.lib.licenses.unfree;
license = licenses.unfree;
maintainers = [];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}

View File

@ -51,7 +51,7 @@ let
in
stdenv.mkDerivation {
inherit name;
name = "neovim-${stdenv.lib.getVersion neovim}";
buildCommand = let bin="${neovim}/bin/nvim"; in ''
if [ ! -x "${bin}" ]
then

View File

@ -1,27 +1,34 @@
{
mkDerivation, lib, fetchurl,
extra-cmake-modules, kdoctools,
qtscript, kconfig, kinit, karchive, kcrash,
kcmutils, kconfigwidgets, knewstuff, kparts, qca-qt5,
shared-mime-info
}:
{ stdenv, fetchurl, extra-cmake-modules, kdoctools, qtscript, kconfig
, kinit, karchive, kcrash, kcmutils, kconfigwidgets, knewstuff, kparts
, qca-qt5, shared-mime-info }:
let
stdenv.mkDerivation rec {
name = "okteta-${version}";
version = "17.12.3";
in mkDerivation rec {
name = "okteta";
src = fetchurl {
url = "mirror://kde/stable/applications/${version}/src/${name}-${version}.tar.xz";
url = "mirror://kde/stable/applications/${version}/src/${name}.tar.xz";
sha256 = "03wsv83l1cay2dpcsksad124wzan7kh8zxdw1h0yicn398kdbck4";
};
meta = {
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ peterhoeg bkchr ];
};
nativeBuildInputs = [ qtscript extra-cmake-modules kdoctools ];
buildInputs = [ shared-mime-info ];
propagatedBuildInputs = [
kconfig kinit kcmutils kconfigwidgets knewstuff kparts qca-qt5
karchive kcrash
kconfig
kinit
kcmutils
kconfigwidgets
knewstuff
kparts
qca-qt5
karchive
kcrash
];
meta = with stdenv.lib; {
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg bkchr ];
platforms = platforms.linux;
};
}

View File

@ -78,6 +78,8 @@ stdenv.mkDerivation rec {
[ libX11 libXext libXt libwebp ]
;
doCheck = false; # fails 6 out of 76 tests
postInstall = ''
(cd "$dev/include" && ln -s ImageMagick* ImageMagick)
moveToOutput "bin/*-config" "$dev"

View File

@ -22,9 +22,8 @@ let
'';
}
// a
# don't call this gimp-* unless you want nix replace gimp by a plugin :-)
// {
name = "${a.name}-${gimp.name}-plugin";
name = "gimp-plugin-${a.name}";
buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []);
nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []);
}

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake }:
stdenv.mkDerivation rec {
name = "soxr-0.1.2";
name = "soxr-0.1.3";
src = fetchurl {
url = "mirror://sourceforge/soxr/${name}-Source.tar.xz";
sha256 = "0xf2w3piwz9gfr1xqyrj4k685q5dy53kq3igv663i4f4y4sg9rjl";
sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di";
};
outputs = [ "out" "doc" ]; # headers are just two and very small

View File

@ -28,7 +28,9 @@
# WARNING: NEVER set any of the options below to `true` by default.
# Set to `privacySupport` or `false`.
, webrtcSupport ? !privacySupport
# webrtcSupport breaks the aarch64 build on version >= 60.
# https://bugzilla.mozilla.org/show_bug.cgi?id=1434589
, webrtcSupport ? (if lib.versionAtLeast version "60" && stdenv.isAarch64 then false else !privacySupport)
, geolocationSupport ? !privacySupport
, googleAPISupport ? geolocationSupport
, crashreporterSupport ? false
@ -213,6 +215,7 @@ stdenv.mkDerivation (rec {
++ extraMakeFlags;
enableParallelBuilding = true;
doCheck = false; # "--disable-tests" above
preInstall = ''
# The following is needed for startup cache creation on grsecurity kernels.

View File

@ -1,7 +1,7 @@
diff -ru -x '*~' firefox-55.0.3-orig/docshell/base/nsAboutRedirector.cpp firefox-55.0.3/docshell/base/nsAboutRedirector.cpp
--- firefox-55.0.3-orig/docshell/base/nsAboutRedirector.cpp 2017-07-31 18:20:51.000000000 +0200
+++ firefox-55.0.3/docshell/base/nsAboutRedirector.cpp 2017-09-26 22:02:00.814151731 +0200
@@ -40,10 +40,6 @@
@@ -36,10 +36,6 @@
nsIAboutModule::ALLOW_SCRIPT
},
{
@ -20,6 +20,6 @@ diff -ru -x '*~' firefox-55.0.3-orig/toolkit/content/jar.mn firefox-55.0.3/toolk
content/global/browser-child.js
content/global/browser-content.js
-* content/global/buildconfig.html
content/global/buildconfig.css
content/global/contentAreaUtils.js
#ifndef MOZ_FENNEC
content/global/customizeToolbar.css
content/global/datepicker.xhtml

View File

@ -12,21 +12,27 @@ let
./fix-pa-context-connect-retval.patch
];
firefox60_aarch64_skia_patch = fetchpatch {
name = "aarch64-skia.patch";
url = https://src.fedoraproject.org/rpms/firefox/raw/8cff86d95da3190272d1beddd45b41de3148f8ef/f/build-aarch64-skia.patch;
sha256 = "11acb0ms4jrswp7268nm2p8g8l4lv8zc666a5bqjbb09x9k6b78k";
};
in
rec {
firefox = common rec {
pname = "firefox";
version = "59.0.2";
version = "60.0.1";
src = fetchurl {
url = "https://hg.mozilla.org/releases/mozilla-release/archive/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2";
sha512 = "3kfh224sfc9ig4733frnskcs49xzjkrs00lxllsvx1imm6f4sf117mqlvc7bhgrn8ldiqn6vaa5g6gd9b7awkk1g975bbzk9namb3yv";
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "083bhfh32dy1cz4c4wn92i2lnl9mqikkd9dlkwd5i6clyjb9pc6d5g87kvb8si0n6jll4alyhw792j56a7gmzny3d93068hr4zyh3qn";
};
patches = nixpkgsPatches ++ [
./no-buildconfig.patch
];
] ++ lib.optional stdenv.isAarch64 firefox60_aarch64_skia_patch;
meta = {
description = "A web browser built from Firefox source tree";
@ -39,12 +45,12 @@ rec {
};
} {};
firefox-esr = common rec {
firefox-esr-52 = common rec {
pname = "firefox-esr";
version = "52.7.3esr";
version = "52.8.0esr";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "31y3qrslg61724vmly6gr1lqcrqgpkh3zsl8riax45gizfcp3qbgkvmd5wwfn9fiwjqi6ww3i08j51wxrfxcxznv7c6qzsvzzc30mgw";
sha512 = "4136fa582e4ffd754d46a79bdb562bd12da4d013d87dfe40fa92addf377e95f5f642993c8b783edd5290089619beeb5a907a0810b68b8808884f087986977df1";
};
patches = nixpkgsPatches;
@ -53,7 +59,28 @@ rec {
description = "A web browser built from Firefox Extended Support Release source tree";
};
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-unwrapped";
attrPath = "firefox-esr-52-unwrapped";
versionSuffix = "esr";
};
} {};
firefox-esr-60 = common rec {
pname = "firefox-esr";
version = "60.0.1esr";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "2kswaf2d8qbhx1ry4ai7y2hr8cprpm00wwdr9qwpdr31m7w0jzndh0fn7jn1f57s42j6jk0jg78d34x10p2rvdii8hrbbr9q9sw8v4b";
};
patches = nixpkgsPatches ++ [
./no-buildconfig.patch
] ++ lib.optional stdenv.isAarch64 firefox60_aarch64_skia_patch;
meta = firefox.meta // {
description = "A web browser built from Firefox Extended Support Release source tree";
};
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-60-unwrapped";
versionSuffix = "esr";
};
} {};

View File

@ -28,9 +28,5 @@ writeScript "update-${attrPath}" ''
sort --version-sort | \
tail -n 1`
source_url=`curl --silent $url$version/SOURCE | grep -o 'https://.*\.tar\.bz2'`
shasum=`curl --silent $url$version/SHA512SUMS | grep 'source\.tar\.xz' | cut -d ' ' -f 1`
update-source-version ${attrPath} "$version" "$shasum" "$source_url"
update-source-version ${attrPath} "$version"
''

View File

@ -7,7 +7,6 @@
, trezor-bridge, bluejeans, djview4, adobe-reader
, google_talk_plugin, fribid, gnome3/*.gnome-shell*/
, esteidfirefoxplugin
, vlc_npapi
, browserpass, chrome-gnome-shell, uget-integrator
, libudev
, kerberos
@ -57,7 +56,6 @@ let
++ lib.optional (cfg.enableBluejeans or false) bluejeans
++ lib.optional (cfg.enableAdobeReader or false) adobe-reader
++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin
++ lib.optional (cfg.enableVLC or false) vlc_npapi
++ extraPlugins
);
nativeMessagingHosts =

View File

@ -60,8 +60,8 @@ let
# of plugins, which might be counterintuitive if someone just wants a vanilla Terraform.
if actualPlugins == []
then terraform.overrideAttrs (orig: { passthru = orig.passthru // passthru; })
else stdenv.mkDerivation {
name = "${terraform.name}-with-plugins";
else lib.appendToName "with-plugins "(stdenv.mkDerivation {
inherit (terraform) name;
buildInputs = [ makeWrapper ];
buildCommand = ''
@ -72,7 +72,7 @@ let
'';
inherit passthru;
};
});
in withPlugins (_: []);
plugins = import ./providers { inherit stdenv lib buildGoPackage fetchFromGitHub; };

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonApplication rec {
name = "gmailieer";
name = "gmailieer-${version}";
version = "0.6";
src = fetchFromGitHub {

View File

@ -21,10 +21,13 @@ stdenv.mkDerivation rec {
pkgconfig intltool autoconf-archive
appstream-glib
];
buildInputs = [ gtk3 json-glib curl glib hicolor-icon-theme ];
meta = with stdenv.lib;
{ description = "GTK remote control for the Transmission BitTorrent client";
doCheck = false; # fails with style validation error
meta = with stdenv.lib; {
description = "GTK remote control for the Transmission BitTorrent client";
homepage = https://github.com/ajf8/transmission-remote-gtk;
license = licenses.gpl2;
maintainers = [ maintainers.ehmry ];

View File

@ -23,7 +23,7 @@
, alsaLib
, libidn
, zlib
, version ? null
, version ? "13.9.0"
}:
let

View File

@ -1,14 +1,30 @@
{ stdenv, fetchzip, jre }:
stdenv.mkDerivation {
name = "atlassian-cli";
stdenv.mkDerivation rec {
name = "atlassian-cli-${version}";
version = "7.8.0";
src = fetchzip {
url = https://bobswift.atlassian.net/wiki/download/attachments/16285777/atlassian-cli-7.8.0-distribution.zip;
url = "https://bobswift.atlassian.net/wiki/download/attachments/16285777/${name}-distribution.zip";
sha256 = "111s4d9m6vxq8jwh1d6ar1f4n5zmyjg7gi2vl3aq63kxbfld9vw7";
extraPostFetch = "chmod go-w $out";
};
tools = [ "agile" "bamboo" "bitbucket" "confluence" "csv"
"hipchat" "jira" "servicedesk" "structure" "tempo" "trello" "upm" ];
tools = [
"agile"
"bamboo"
"bitbucket"
"confluence"
"csv"
"hipchat"
"jira"
"servicedesk"
"structure"
"tempo"
"trello"
"upm"
];
installPhase = ''
mkdir -p $out/{bin,share/doc/atlassian-cli}
cp -r lib $out/share/java
@ -22,10 +38,12 @@ stdenv.mkDerivation {
chmod +x $out/bin/$tool
done
'';
meta = with stdenv.lib; {
description = "An integrated family of CLIs for various Atlassian applications";
homepage = https://bobswift.atlassian.net/wiki/spaces/ACLI/overview;
maintainers = [ maintainers.twey ];
license = [ licenses.unfreeRedistributable ];
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ twey ];
inherit (jre.meta) platforms;
};
}

View File

@ -57,6 +57,8 @@ let
in
stdenv.mkDerivation (args // {
name = "${args.name}-${lua.luaversion}";
inherit preBuild postInstall;
inherit luadeps runtimeDeps;

View File

@ -10,40 +10,35 @@
, moreTests ? false
}:
# helpers for options
let optionals = stdenv.lib.optionals;
optionalString = stdenv.lib.optionalString;
with stdenv.lib;
let
optionOnOff = option: "${if option then "on" else "off"}";
urlVersion = replaceStrings ["."] ["_"];
in
stdenv.mkDerivation rec {
major_version = "3";
minor_version = "17";
version = "v${major_version}.${minor_version}";
tagged_version = "${major_version}_${minor_version}";
name = "simgrid";
name = "simgrid-${version}";
version = "3.17";
src = fetchFromGitHub {
owner = "simgrid";
repo = "simgrid";
rev = "v3_17";
rev = "v${urlVersion version}";
sha256 = "0ffs9w141qhw571jsa9sch1cnr332vs4sgj6dsiij2mc24m6wpb4";
#rev = "master";
#sha256 = "0qvh1jzc2lpnp8234kjx1x4g1a5kfdn6kb15vhk160qgvj98nyqm";
};
nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind]
++ optionals fortranSupport [gfortran]
++ optionals buildJavaBindings [openjdk]
++ optionals buildDocumentation [transfig ghostscript doxygen]
++ optionals modelCheckingSupport [libunwind libevent];
nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind ]
++ optionals fortranSupport [ gfortran ]
++ optionals buildJavaBindings [ openjdk ]
++ optionals buildDocumentation [ transfig ghostscript doxygen ]
++ optionals modelCheckingSupport [ libunwind libevent ];
#buildInputs = optional luaSupport lua5;
preConfigure =
# Make it so that libsimgrid.so will be found when running programs from
# the build dir.
''
preConfigure = ''
export LD_LIBRARY_PATH="$PWD/build/lib"
'';
@ -77,32 +72,31 @@ stdenv.mkDerivation rec {
-Denable_compile_optimizations=${optionOnOff (!debug)}
-Denable_lto=${optionOnOff (!debug)}
'';
#-Denable_lua=${optionOnOff luaSupport}
#-Denable_smpi_papi=${optionOnOff moreTests}
# -Denable_lua=${optionOnOff luaSupport}
# -Denable_smpi_papi=${optionOnOff moreTests}
makeFlags = optionalString debug "VERBOSE=1";
preBuild =
''
# Some perl scripts are called to generate test during build which
# is before the fixupPhase of nix, so do this manualy here:
# Some Perl scripts are called to generate test during build which
# is before the fixupPhase, so do this manualy here:
preBuild = ''
patchShebangs ..
'';
doCheck = true;
checkPhase = ''
runHook preCheck
ctest --output-on-failure -E smpi-replay-multiple
runHook postCheck
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = {
description = "Framework for the simulation of distributed applications";
longDescription =
'' SimGrid is a toolkit that provides core functionalities for the
longDescription = ''
SimGrid is a toolkit that provides core functionalities for the
simulation of distributed applications in heterogeneous distributed
environments. The specific goal of the project is to facilitate
research in the area of distributed and parallel application
@ -110,8 +104,8 @@ stdenv.mkDerivation rec {
network of workstations to Computational Grids.
'';
homepage = http://simgrid.gforge.inria.fr/;
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ mickours ];
platforms = platforms.x86_64;
license = licenses.lgpl2Plus;
};
}

View File

@ -30,6 +30,8 @@ stdenv.mkDerivation {
buildInputs = [ nano ];
doCheck = false; # fails 1 of 1 tests
meta = {
homepage = http://cvs.nongnu.org;
description = "Concurrent Versions System - a source control system";

View File

@ -8,7 +8,7 @@ in
stdenv.mkDerivation {
inherit version jarName;
name = "bfg-repo-cleaner";
name = "bfg-repo-cleaner-${version}";
src = fetchurl {
url = mavenUrl;

View File

@ -18,7 +18,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;
let
version = "2.16.3";
version = "2.17.0";
svn = subversionClient.override { perlBindings = perlSupport; };
in
@ -27,19 +27,24 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "0j1dwvg5llnj3g0fp8hdgpms4hp90qw9f6509vqw30dhwplrjpfn";
sha256 = "1ismz7nsz8dgjmk782xr9s0mr2qh06f72pdcgbxfmnw1bvlya5p9";
};
outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
hardeningDisable = [ "format" ];
enableParallelBuilding = true;
## Patch
patches = [
./docbook2texi.patch
./symlinks-in-bin.patch
./git-sh-i18n.patch
./ssh-path.patch
./git-send-email-honor-PATH.patch
./installCheck-path.patch
];
postPatch = ''
@ -47,6 +52,10 @@ stdenv.mkDerivation {
substituteInPlace "$x" \
--subst-var-by ssh "${openssh}/bin/ssh"
done
# Fix references to gettext introduced by ./git-sh-i18n.patch
substituteInPlace git-sh-i18n.sh \
--subst-var-by gettext ${gettext}
'';
nativeBuildInputs = [ gettext perl ]
@ -58,7 +67,6 @@ stdenv.mkDerivation {
++ stdenv.lib.optionals withpcre2 [ pcre2 ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ];
# required to support pthread_cancel()
NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s"
+ stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr";
@ -68,6 +76,10 @@ stdenv.mkDerivation {
"ac_cv_snprintf_returns_bogus=no"
];
preBuild = ''
makeFlagsArray+=( perllibdir=$out/$(perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}') )
'';
makeFlags = [
"prefix=\${out}"
"SHELL_PATH=${stdenv.shell}"
@ -86,15 +98,17 @@ stdenv.mkDerivation {
popd
'';
# FIXME: "make check" requires Sparse; the Makefile must be tweaked
# so that `SPARSE_FLAGS' corresponds to the current architecture...
#doCheck = true;
## Install
# WARNING: Do not `rm` or `mv` files from the source tree; use `cp` instead.
# We need many of these files during the installCheckPhase.
installFlags = "NO_INSTALL_HARDLINKS=1";
preInstall = stdenv.lib.optionalString stdenv.isDarwin ''
mkdir -p $out/bin
mv $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin
cp -a $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin
'';
postInstall =
@ -112,7 +126,7 @@ stdenv.mkDerivation {
# Install contrib stuff.
mkdir -p $out/share/git
mv contrib $out/share/git/
cp -a contrib $out/share/git/
ln -s "$out/share/git/contrib/credential/netrc/git-credential-netrc" $out/bin/
mkdir -p $out/share/emacs/site-lisp
ln -s "$out/share/git/contrib/emacs/"*.el $out/share/emacs/site-lisp/
@ -145,9 +159,6 @@ stdenv.mkDerivation {
perl -0777 -i -pe "$SCRIPT" \
$out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,stash,submodule,subtree,web--browse}
# Fix references to gettext.
substituteInPlace $out/libexec/git-core/git-sh-i18n \
--subst-var-by gettext ${gettext}
# Also put git-http-backend into $PATH, so that we can use smart
# HTTP(s) transports for pushing
@ -225,7 +236,52 @@ EOF
'';
enableParallelBuilding = true;
## InstallCheck
doInstallCheck = true;
installCheckTarget = "test";
# see also installCheckFlagsArray
installCheckFlags = "DEFAULT_TEST_TARGET=prove";
preInstallCheck = ''
installCheckFlagsArray+=(
GIT_PROVE_OPTS="--jobs $NIX_BUILD_CORES --failures --state=failed,save"
GIT_TEST_INSTALLED=$out/bin
${stdenv.lib.optionalString (!svnSupport) "NO_SVN_TESTS=y"}
)
function disable_test {
local test=$1 pattern=$2
if [ $# -eq 1 ]; then
mv t/{,skip-}$test.sh || true
else
sed -i t/$test.sh \
-e "/^ *test_expect_.*$pattern/,/^ *' *\$/{s/^/#/}"
fi
}
# Shared permissions are forbidden in sandbox builds.
disable_test t0001-init shared
disable_test t1301-shared-repo
# Our patched gettext never fallbacks
disable_test t0201-gettext-fallbacks
${stdenv.lib.optionalString (!sendEmailSupport) ''
# Disable sendmail tests
disable_test t9001-send-email
''}
# XXX: I failed to understand why this one fails.
# Could someone try to re-enable it on the next release ?
disable_test t1700-split-index "null sha1"
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
# Test fails (as of 2.17.0, musl 1.1.19)
disable_test t3900-i18n-commit
'';
meta = {
homepage = https://git-scm.com/;

View File

@ -2,19 +2,19 @@ This patch does two things: (1) use the right name for `docbook2texi',
and (2) make sure `gitman.info' isn't produced since it's broken (duplicate
node names).
diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile
--- git-1.8.4-orig/Documentation/Makefile 2013-08-23 21:38:43.000000000 +0200
+++ git-1.8.4/Documentation/Makefile 2013-09-30 14:48:51.532890378 +0200
@@ -101,7 +101,7 @@
diff --git a/Documentation/Makefile b/Documentation/Makefile
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -122,7 +122,7 @@
MAKEINFO = makeinfo
INSTALL_INFO = install-info
-DOCBOOK2X_TEXI = docbook2x-texi
+DOCBOOK2X_TEXI = docbook2texi
DBLATEX = dblatex
ifndef PERL_PATH
PERL_PATH = /usr/bin/perl
@@ -205,7 +205,7 @@
ASCIIDOC_DBLATEX_DIR = /etc/asciidoc/dblatex
DBLATEX_COMMON = -p $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.sty
@@ -240,7 +240,7 @@
man5: $(DOC_MAN5)
man7: $(DOC_MAN7)
@ -23,7 +23,7 @@ diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile
pdf: user-manual.pdf
@@ -221,10 +221,9 @@
@@ -256,10 +256,9 @@
install-info: info
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)

View File

@ -1,8 +1,7 @@
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 8060ea35c..c81067a19 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -203,8 +203,7 @@ a password is obtained using 'git-credential'.
@@ -208,8 +208,7 @@ a password is obtained using 'git-credential'.
specify a full pathname of a sendmail-like program instead;
the program must support the `-i` option. Default value can
be specified by the `sendemail.smtpServer` configuration
@ -13,10 +12,9 @@ index 8060ea35c..c81067a19 100644
--smtp-server-port=<port>::
diff --git a/git-send-email.perl b/git-send-email.perl
index edcc6d346..8e357aeab 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -885,8 +885,7 @@ if (defined $initial_reply_to) {
@@ -944,8 +944,7 @@ if (defined $reply_to) {
}
if (!defined $smtp_server) {

View File

@ -0,0 +1,12 @@
diff --git a/t/test-lib.sh b/t/test-lib.sh
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -923,7 +923,7 @@
then
GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path) ||
error "Cannot run git from $GIT_TEST_INSTALLED."
- PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR:$PATH
+ PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$GIT_BUILD_DIR:$PATH
GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH}
else # normal case, use ../bin-wrappers only unless $with_dashes:
git_bin_dir="$GIT_BUILD_DIR/bin-wrappers"

View File

@ -1,7 +1,7 @@
diff -ru -x '*~' git-1.8.2.1-orig/Makefile git-1.8.2.1/Makefile
--- git-1.8.2.1-orig/Makefile 2013-04-08 00:52:04.000000000 +0200
+++ git-1.8.2.1/Makefile 2013-04-22 15:46:42.906026940 +0200
@@ -2319,8 +2319,7 @@
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -2609,8 +2609,7 @@
{ test "$$bindir/" = "$$execdir/" || \
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
$(RM) "$$execdir/$$p" && \

View File

@ -10,7 +10,7 @@ let
sha256 = "0wksqma41z36dbv6w6iplkjfdm0ha3njp222fakyh4lismajr71p";
};
in stdenv.mkDerivation {
name = "gitweb";
name = "gitweb-${stdenv.lib.getVersion git}";
src = git.gitweb;

View File

@ -88,6 +88,8 @@ let
enableParallelBuilding = true;
doCheck = false; # fails 10 out of ~2300 tests
meta = {
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
homepage = http://subversion.apache.org/;

View File

@ -77,7 +77,7 @@ let
# Lightworks expects some files in /usr/share/lightworks
in buildFHSUserEnv rec {
name = "lightworks";
name = "lightworks-${stdenv.lib.getVersion lightworks}";
targetPkgs = pkgs: [
lightworks

View File

@ -12,9 +12,13 @@ let
sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
};
configurePlatforms = [];
configureFlags = [
"--arch=arm"
"--arch=${hostPlatform.parsed.cpu.name}"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [
# TODO be better with condition
"--cpu=arm1176jzf-s"
] ++ [
"--disable-muxers"
"--enable-muxer=spdif"
"--enable-muxer=adts"
@ -42,20 +46,15 @@ let
"--enable-hardcoded-tables"
"--disable-runtime-cpudetect"
"--disable-debug"
"--arch=${hostPlatform.parsed.cpu.name}"
"--target_os=${hostPlatform.parsed.kernel.name}"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
];
enableParallelBuilding = true;
crossAttrs = {
configurePlatforms = [];
configureFlags = configureFlags ++ [
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
"--target_os=linux"
"--arch=${hostPlatform.parsed.cpu.name}"
];
};
meta = {
homepage = http://www.ffmpeg.org/;
description = "A complete, cross-platform solution to record, convert and stream audio and video";
@ -83,5 +82,6 @@ stdenv.mkDerivation rec {
homepage = https://github.com/huceke/omxplayer;
description = "Commandline OMX player for the Raspberry Pi";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.arm;
};
}

View File

@ -1,86 +1,81 @@
{ stdenv, fetchurl, xz, bzip2, perl, xorg, libdvdnav, libbluray
{ stdenv, fetchurl, autoreconfHook
, libarchive, perl, xorg, libdvdnav, libbluray
, zlib, a52dec, libmad, faad2, ffmpeg, alsaLib
, pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska
, libvorbis, libtheora, speex, lua5, libgcrypt, libupnp
, libvorbis, libtheora, speex, lua5, libgcrypt, libgpgerror, libupnp
, libcaca, libpulseaudio, flac, schroedinger, libxml2, librsvg
, mpeg2dec, udev, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
, mpeg2dec, systemd, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
, libvdpau, libsamplerate, live555, fluidsynth
, qt4 ? null
, withQt5 ? false, qtbase ? null, qtx11extras ? null
, libass, libva-full, libdvbpsi, libdc1394, libraw1394, libopus
, libvdpau, libsamplerate, live555, fluidsynth, wayland, wayland-protocols
, onlyLibVLC ? false
, withQt5 ? true, qtbase ? null, qtsvg ? null, qtx11extras ? null
, jackSupport ? false
, fetchpatch
}:
with stdenv.lib;
assert (withQt5 -> qtbase != null && qtx11extras != null);
assert (!withQt5 -> qt4 != null);
assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null);
stdenv.mkDerivation rec {
name = "vlc-${version}";
version = "2.2.8";
version = "3.0.1";
src = fetchurl {
url = "http://get.videolan.org/vlc/${version}/${name}.tar.xz";
sha256 = "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v";
sha256 = "008krfhykm9447wc1kkw82bsw3f6ikljgrqyb1sinwlxnkghqw6f";
};
# Comment-out the Qt 5.5 version check, as we do apply the relevant patch.
# https://trac.videolan.org/vlc/ticket/16497
postPatch = if (!withQt5) then null else
"sed '/I78ef29975181ee22429c9bd4b11d96d9e68b7a9c/s/^/: #/' -i configure";
buildInputs =
[ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread
libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt
# VLC uses a *ton* of libraries for various pieces of functionality, many of
# which are not included here for no other reason that nobody has mentioned
# needing them
buildInputs = [
zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread
libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt libgpgerror
libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
udev gnutls avahi libcddb SDL SDL_image libmtp unzip taglib
libkate libtiger libv4l samba liboggz libass libdvbpsi libva
systemd gnutls avahi libcddb SDL SDL_image libmtp unzip taglib libarchive
libkate libtiger libv4l samba liboggz libass libdvbpsi libva-full
xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate live555
fluidsynth
]
++ [(if withQt5 then qtbase else qt4)]
++ optional withQt5 qtx11extras
fluidsynth wayland wayland-protocols
] ++ optionals withQt5 [ qtbase qtsvg qtx11extras ]
++ optional jackSupport libjack2;
nativeBuildInputs = [ pkgconfig ];
LIVE555_PREFIX = live555;
preConfigure = ''
sed -e "s@/bin/echo@echo@g" -i configure
'' + optionalString withQt5 ''
# Make sure we only *add* "-std=c++11" to CXXFLAGS instead of overriding the
# values figured out by configure (for example "-g -O2").
sed -i -re '/^ *CXXFLAGS=("[^$"]+")? *$/s/CXXFLAGS="?/&-std=c++11 /' \
configure
'';
configureFlags =
[ "--enable-alsa"
"--with-kde-solid=$out/share/apps/solid/actions"
"--enable-dc1394"
"--enable-ncurses"
"--enable-vdpau"
"--enable-dvdnav"
"--enable-samplerate"
];
nativeBuildInputs = [ autoreconfHook perl pkgconfig ];
enableParallelBuilding = true;
preBuild = ''
substituteInPlace modules/text_renderer/freetype.c --replace \
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf \
${freefont_ttf}/share/fonts/truetype/FreeSerifBold.ttf
LIVE555_PREFIX = live555;
# vlc depends on a c11-gcc wrapper script which we don't have so we need to
# set the path to the compiler
BUILDCC = "${stdenv.cc}/bin/gcc";
postPatch = ''
substituteInPlace configure \
--replace /bin/echo echo
substituteInPlace modules/text_renderer/freetype/platform_fonts.h --replace \
/usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype
'';
# https://github.com/NixOS/nixpkgs/pull/35124#issuecomment-370552830
postFixup = ''
find $out/lib/vlc/plugins -exec touch -d @1 '{}' ';'
$out/lib/vlc/vlc-cache-gen $out/vlc/plugins
'';
# Most of the libraries are auto-detected so we don't need to set a bunch of
# "--enable-foo" flags here
configureFlags = [
"--with-kde-solid=$out/share/apps/solid/actions"
] ++ optional onlyLibVLC "--disable-vlc";
meta = with stdenv.lib; {
description = "Cross-platform media player and streaming server";
homepage = http://www.videolan.org/vlc/;
platforms = platforms.linux;
license = licenses.lgpl21Plus;
platforms = platforms.linux;
};
}

View File

@ -1,34 +0,0 @@
{ stdenv, fetchgit, vlc, autoconf, automake, libtool, pkgconfig, npapi_sdk,
libxcb, xlibsWrapper, gtk}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "vlc-plugin-${version}";
version = "2.2.2"; # This 2.2.2 builds fine with vlc 2.2.4
src = fetchgit {
url = "https://code.videolan.org/videolan/npapi-vlc.git";
rev = "5fa6fbc11cf5bad983f57656c0085e47e18fbf20";
sha256 = "0k4s0657kv1mx1md8vj87scs0hz59xy7syqdsxb48w3w8gnfljs0";
};
preConfigure = "sh autogen.sh";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ vlc autoconf automake libtool npapi_sdk libxcb
xlibsWrapper gtk ];
enableParallelBuilding = true;
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
};
meta = with stdenv.lib; {
description = "Webplugins based on libVLC (for firefox, npapi)";
homepage = https://code.videolan.org/videolan/npapi-vlc;
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
}

View File

@ -119,6 +119,8 @@ stdenv.mkDerivation rec {
++ optional openGLSupport "--enable-opengl"
++ optional virglSupport "--enable-virglrenderer";
doCheck = false; # tries to access /dev
postFixup =
''
for exe in $out/bin/qemu-system-* ; do

View File

@ -5,28 +5,20 @@ var_templates_list=(
NIX+LDFLAGS_BEFORE
NIX+LDFLAGS_AFTER
NIX+LDFLAGS_HARDEN
NIX+HARDENING_ENABLE
)
var_templates_bool=(
NIX+SET_BUILD_ID
NIX+DONT_SET_RPATH
)
declare -a role_infixes=()
if [ "${NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]; then
role_infixes+=(_BUILD_)
fi
if [ "${NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]; then
role_infixes+=(_)
fi
if [ "${NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]; then
role_infixes+=(_TARGET_)
fi
accumulateRoles
for var in "${var_templates_list[@]}"; do
mangleVarList "$var" "${role_infixes[@]}"
mangleVarList "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done
for var in "${var_templates_bool[@]}"; do
mangleVarBool "$var" "${role_infixes[@]}"
mangleVarBool "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done
if [ -e @out@/nix-support/libc-ldflags ]; then

View File

@ -1,33 +1,40 @@
hardeningFlags=(relro bindnow)
# Intentionally word-split in case 'hardeningEnable' is defined in
# Nix. Also, our bootstrap tools version of bash is old enough that
# undefined arrays trip `set -u`.
if [[ -v hardeningEnable[@] ]]; then
hardeningFlags+=(${hardeningEnable[@]})
fi
hardeningLDFlags=()
declare -a hardeningLDFlags=()
declare -A hardeningDisableMap
declare -A hardeningEnableMap=()
# Intentionally word-split in case 'hardeningDisable' is defined in Nix.
for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@
do
hardeningDisableMap[$flag]=1
# Intentionally word-split in case 'NIX_HARDENING_ENABLE' is defined in Nix. The
# array expansion also prevents undefined variables from causing trouble with
# `set -u`.
for flag in ${NIX_@infixSalt@_HARDENING_ENABLE-}; do
hardeningEnableMap["$flag"]=1
done
# Remove unsupported flags.
for flag in @hardening_unsupported_flags@; do
unset -v "hardeningEnableMap[$flag]"
done
if (( "${NIX_DEBUG:-0}" >= 1 )); then
declare -a allHardeningFlags=(pie relro bindnow)
declare -A hardeningDisableMap=()
# Determine which flags were effectively disabled so we can report below.
for flag in "${allHardeningFlags[@]}"; do
if [[ -z "${hardeningEnableMap[$flag]-}" ]]; then
hardeningDisableMap[$flag]=1
fi
done
printf 'HARDENING: disabled flags:' >&2
(( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2
echo >&2
fi
if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
if (( "${#hardeningEnableMap[@]}" )); then
echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2;
fi
for flag in "${hardeningFlags[@]}"
do
if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then
fi
for flag in "${!hardeningEnableMap[@]}"; do
case $flag in
pie)
if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then
@ -48,6 +55,4 @@ if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
# tool supports each flag.
;;
esac
fi
done
fi
done

View File

@ -74,7 +74,7 @@ in
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${bintoolsName}-wrapper")
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${bintoolsName}-wrapper")
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
preferLocalBuild = true;
@ -188,9 +188,15 @@ stdenv.mkDerivation {
else throw "unknown emulation for platform: " + targetPlatform.config;
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
strictDeps = true;
depsTargetTargetPropagated = extraPackages;
setupHook = ./setup-hook.sh;
wrapperName = "BINTOOLS_WRAPPER";
setupHooks = [
../setup-hooks/role.bash
./setup-hook.sh
];
postFixup =
''
@ -289,7 +295,7 @@ stdenv.mkDerivation {
set +u
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
substituteAll ${../cc-wrapper/utils.sh} $out/nix-support/utils.sh
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
##
## Extra custom steps
@ -300,7 +306,7 @@ stdenv.mkDerivation {
inherit dynamicLinker expand-response-params;
# for substitution in utils.sh
# for substitution in utils.bash
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
meta =

View File

@ -14,7 +14,7 @@ if [ -n "@coreutils_bin@" ]; then
PATH="@coreutils_bin@/bin"
fi
source @out@/nix-support/utils.sh
source @out@/nix-support/utils.bash
if [ -z "${NIX_BINTOOLS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then
source @out@/nix-support/add-flags.sh
@ -57,8 +57,8 @@ fi
source @out@/nix-support/add-hardening.sh
extraAfter=("${hardeningLDFlags[@]}")
extraBefore=()
extraAfter=()
extraBefore=(${hardeningLDFlags[@]+"${hardeningLDFlags[@]}"})
if [ -z "${NIX_@infixSalt@_LDFLAGS_SET:-}" ]; then
extraAfter+=($NIX_@infixSalt@_LDFLAGS)

View File

@ -8,47 +8,25 @@ set -u
# native compile.
#
# TODO(@Ericson2314): No native exception
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
bintoolsWrapper_addLDVars () {
case $depHostOffset in
-1) local role='BUILD_' ;;
0) local role='' ;;
1) local role='TARGET_' ;;
*) echo "bintools-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
return 1 ;;
esac
# See ../setup-hooks/role.bash
local role_post role_pre
getTargetRoleEnvHook
if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
export NIX_${role}LDFLAGS+=" -L$1/lib64"
export NIX_${role_pre}LDFLAGS+=" -L$1/lib64"
fi
if [[ -d "$1/lib" ]]; then
export NIX_${role}LDFLAGS+=" -L$1/lib"
export NIX_${role_pre}LDFLAGS+=" -L$1/lib"
fi
}
case $targetOffset in
-1)
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_BUILD=1
role_pre='BUILD_'
role_post='_FOR_BUILD'
;;
0)
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_HOST=1
role_pre=''
role_post=''
;;
1)
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_TARGET=1
role_pre='TARGET_'
role_post='_FOR_TARGET'
;;
*)
echo "cc-wrapper: used as improper sort of dependency" >2;
return 1
;;
esac
# See ../setup-hooks/role.bash
getTargetRole
getTargetRoleWrapper
addEnvHooks "$targetOffset" bintoolsWrapper_addLDVars
@ -83,6 +61,10 @@ do
fi
done
# If unset, assume the default hardening flags.
: ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"}
export NIX_HARDENING_ENABLE
# No local scope in sourced file
unset -v role_pre role_post cmd upper_case
set +u

View File

@ -14,26 +14,15 @@ var_templates_bool=(
NIX+ENFORCE_NO_NATIVE
)
# Accumulate infixes for taking in the right input parameters. See setup-hook
# for details.
declare -a role_infixes=()
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]; then
role_infixes+=(_BUILD_)
fi
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]; then
role_infixes+=(_)
fi
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]; then
role_infixes+=(_TARGET_)
fi
accumulateRoles
# We need to mangle names for hygiene, but also take parameters/overrides
# from the environment.
for var in "${var_templates_list[@]}"; do
mangleVarList "$var" "${role_infixes[@]}"
mangleVarList "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done
for var in "${var_templates_bool[@]}"; do
mangleVarBool "$var" "${role_infixes[@]}"
mangleVarBool "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done
# `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld.

View File

@ -1,33 +1,40 @@
hardeningFlags=(fortify stackprotector pic strictoverflow format relro bindnow)
# Intentionally word-split in case 'hardeningEnable' is defined in
# Nix. Also, our bootstrap tools version of bash is old enough that
# undefined arrays trip `set -u`.
if [[ -v hardeningEnable[@] ]]; then
hardeningFlags+=(${hardeningEnable[@]})
fi
hardeningCFlags=()
declare -a hardeningCFlags=()
declare -A hardeningDisableMap
declare -A hardeningEnableMap=()
# Intentionally word-split in case 'hardeningDisable' is defined in Nix.
for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@
do
hardeningDisableMap[$flag]=1
# Intentionally word-split in case 'NIX_HARDENING_ENABLE' is defined in Nix. The
# array expansion also prevents undefined variables from causing trouble with
# `set -u`.
for flag in ${NIX_@infixSalt@_HARDENING_ENABLE-}; do
hardeningEnableMap["$flag"]=1
done
# Remove unsupported flags.
for flag in @hardening_unsupported_flags@; do
unset -v "hardeningEnableMap[$flag]"
done
if (( "${NIX_DEBUG:-0}" >= 1 )); then
declare -a allHardeningFlags=(fortify stackprotector pie pic strictoverflow format)
declare -A hardeningDisableMap=()
# Determine which flags were effectively disabled so we can report below.
for flag in "${allHardeningFlags[@]}"; do
if [[ -z "${hardeningEnableMap[$flag]-}" ]]; then
hardeningDisableMap["$flag"]=1
fi
done
printf 'HARDENING: disabled flags:' >&2
(( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2
echo >&2
fi
if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
if (( "${#hardeningEnableMap[@]}" )); then
echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2;
fi
for flag in "${hardeningFlags[@]}"
do
if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then
fi
for flag in "${!hardeningEnableMap[@]}"; do
case $flag in
fortify)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling fortify >&2; fi
@ -62,6 +69,4 @@ if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
# tool supports each flag.
;;
esac
fi
done
fi
done

View File

@ -15,7 +15,7 @@ if [[ -n "@coreutils_bin@" && -n "@gnugrep_bin@" ]]; then
PATH="@coreutils_bin@/bin:@gnugrep_bin@/bin"
fi
source @out@/nix-support/utils.sh
source @out@/nix-support/utils.bash
# Flirting with a layer violation here.
if [ -z "${NIX_BINTOOLS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then
@ -134,8 +134,8 @@ fi
source @out@/nix-support/add-hardening.sh
# Add the flags for the C compiler proper.
extraAfter=($NIX_@infixSalt@_CFLAGS_COMPILE "${hardeningCFlags[@]}")
extraBefore=()
extraAfter=($NIX_@infixSalt@_CFLAGS_COMPILE)
extraBefore=(${hardeningCFlags[@]+"${hardeningCFlags[@]}"})
if [ "$dontLink" != 1 ]; then

View File

@ -71,7 +71,7 @@ assert nativePrefix == bintools.nativePrefix;
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${ccName}-wrapper")
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${ccName}-wrapper")
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
preferLocalBuild = true;
@ -188,10 +188,16 @@ stdenv.mkDerivation {
wrap ${targetPrefix}gccgo ${./cc-wrapper.sh} $ccPath/${targetPrefix}gccgo
'';
strictDeps = true;
propagatedBuildInputs = [ bintools ];
depsTargetTargetPropagated = extraPackages;
setupHook = ./setup-hook.sh;
wrapperName = "CC_WRAPPER";
setupHooks = [
../setup-hooks/role.bash
./setup-hook.sh
];
postFixup =
''
@ -277,7 +283,7 @@ stdenv.mkDerivation {
+ ''
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
substituteAll ${./utils.sh} $out/nix-support/utils.sh
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
##
## Extra custom steps
@ -288,7 +294,7 @@ stdenv.mkDerivation {
inherit expand-response-params;
# for substitution in utils.sh
# for substitution in utils.bash
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
meta =

View File

@ -60,61 +60,28 @@ set -u
# native compile.
#
# TODO(@Ericson2314): No native exception
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
# It's fine that any other cc-wrapper will redefine this. Bash functions close
# over no state, and there's no @-substitutions within, so any redefined
# function is guaranteed to be exactly the same.
ccWrapper_addCVars () {
# The `depHostOffset` describes how the host platform of the dependencies
# are slid relative to the depending package. It is brought into scope of
# the environment hook defined as the role of the dependency being applied.
case $depHostOffset in
-1) local role='BUILD_' ;;
0) local role='' ;;
1) local role='TARGET_' ;;
*) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
return 1 ;;
esac
# See ../setup-hooks/role.bash
local role_post role_pre
getTargetRoleEnvHook
if [[ -d "$1/include" ]]; then
export NIX_${role}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"
export NIX_${role_pre}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"
fi
if [[ -d "$1/Library/Frameworks" ]]; then
export NIX_${role}CFLAGS_COMPILE+=" -F$1/Library/Frameworks"
export NIX_${role_pre}CFLAGS_COMPILE+=" -F$1/Library/Frameworks"
fi
}
# Since the same cc-wrapper derivation can be depend on in multiple ways, we
# need to accumulate *each* role (i.e. target platform relative the depending
# derivation) in which the cc-wrapper derivation is used.
# `NIX_CC_WRAPPER_@infixSalt@_TARGET_*` tracks this (needs to be an exported env
# var so can't use fancier data structures).
#
# We also need to worry about what role is being added on *this* invocation of
# setup-hook, which `role` tracks.
case $targetOffset in
-1)
export NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD=1
role_pre='BUILD_'
role_post='_FOR_BUILD'
;;
0)
export NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST=1
role_pre=''
role_post=''
;;
1)
export NIX_CC_WRAPPER_@infixSalt@_TARGET_TARGET=1
role_pre='TARGET_'
role_post='_FOR_TARGET'
;;
*)
echo "cc-wrapper: used as improper sort of dependency" >2;
return 1
;;
esac
# See ../setup-hooks/role.bash
getTargetRole
getTargetRoleWrapper
# We use the `targetOffset` to choose the right env hook to accumulate the right
# sort of deps (those with that offset).
@ -147,6 +114,10 @@ export ${role_pre}CXX=@named_cxx@
export CC${role_post}=@named_cc@
export CXX${role_post}=@named_cxx@
# If unset, assume the default hardening flags.
: ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"}
export NIX_HARDENING_ENABLE
# No local scope in sourced file
unset -v role_pre role_post
set +u

View File

@ -91,7 +91,7 @@ in stdenv.mkDerivation (args // {
installPhase = args.installPhase or ''
runHook preInstall
mkdir -p $out/bin
find target/release -maxdepth 1 -executable -exec cp "{}" $out/bin \;
find target/release -maxdepth 1 -executable -type f -exec cp "{}" $out/bin \;
runHook postInstall
'';

View File

@ -0,0 +1,75 @@
# Since the same derivation can be depend on in multiple ways, we need to
# accumulate *each* role (i.e. host and target platforms relative the depending
# derivation) in which the derivation is used.
#
# The role is intened to be use as part of other variables names like
# - $NIX_${role_pre}_SOMETHING
# - $NIX_SOMETHING_${role_post}
function getRole() {
case $1 in
-1)
role_pre='BUILD_'
role_post='_FOR_BUILD'
;;
0)
role_pre=''
role_post=''
;;
1)
role_pre='TARGET_'
role_post='_FOR_TARGET'
;;
*)
echo "@name@: used as improper sort of dependency" >2
return 1
;;
esac
}
# `hostOffset` describes how the host platform of the package is slid relative
# to the depending package. `targetOffset` likewise describes the target
# platform of the package. Both are brought into scope of the setup hook defined
# for dependency whose setup hook is being processed relative to the package
# being built.
function getHostRole() {
getRole "$hostOffset"
}
function getTargetRole() {
getRole "$targetOffset"
}
# `depHostOffset` describes how the host platform of the dependencies are slid
# relative to the depending package. `depTargetOffset` likewise describes the
# target platform of dependenices. Both are brought into scope of the
# environment hook defined for the dependency being applied relative to the
# package being built.
function getHostRoleEnvHook() {
getRole "$depHostOffset"
}
function getTargetRoleEnvHook() {
getRole "$depTargetOffset"
}
# This variant is inteneded specifically for code-prodocing tool wrapper scripts
# `NIX_@wrapperName@_@infixSalt@_TARGET_*` tracks this (needs to be an exported
# env var so can't use fancier data structures).
function getTargetRoleWrapper() {
case $targetOffset in
-1)
export NIX_@wrapperName@_@infixSalt@_TARGET_BUILD=1
;;
0)
export NIX_@wrapperName@_@infixSalt@_TARGET_HOST=1
;;
1)
export NIX_@wrapperName@_@infixSalt@_TARGET_TARGET=1
;;
*)
echo "@name@: used as improper sort of dependency" >2
return 1
;;
esac
}

View File

@ -1,3 +1,18 @@
# Accumulate infixes for taking in the right input parameters with the `mangle*`
# functions below. See setup-hook for details.
accumulateRoles() {
declare -ga role_infixes=()
if [ "${NIX_@wrapperName@_@infixSalt@_TARGET_BUILD:-}" ]; then
role_infixes+=(_BUILD_)
fi
if [ "${NIX_@wrapperName@_@infixSalt@_TARGET_HOST:-}" ]; then
role_infixes+=(_)
fi
if [ "${NIX_@wrapperName@_@infixSalt@_TARGET_TARGET:-}" ]; then
role_infixes+=(_TARGET_)
fi
}
mangleVarList() {
local var="$1"
shift

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
pname = "liberationsansnarrow";
version = "1.07.3";
name = "${pname}";
name = "${pname}-${version}";
src = fetchurl {
url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
version = "1.2.1";
name = "meslo-lg";
name = "meslo-lg-${version}";
meslo-lg = fetchurl {
url="https://github.com/andreberg/Meslo-Font/blob/master/dist/v${version}/Meslo%20LG%20v${version}.zip?raw=true";

View File

@ -1,7 +1,7 @@
{stdenv, fetchzip}:
fetchzip {
name = "MPH-2B-Damase";
name = "MPH-2B-Damase-2";
url = http://www.wazu.jp/downloads/damase_v.2.zip;

View File

@ -1,11 +1,11 @@
{ fetchurl, stdenv, cmake, ninja }:
stdenv.mkDerivation rec {
name = "poppler-data-0.4.8";
name = "poppler-data-0.4.9";
src = fetchurl {
url = "http://poppler.freedesktop.org/${name}.tar.gz";
sha256 = "0wi8yyynladny51r4q53z7ygh7y491ayp8nqqv6wqqzjc60s35hh";
sha256 = "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z";
};
nativeBuildInputs = [ cmake ninja ];

View File

@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
depsBuildBuild = [ buildPackages.stdenv.cc ];
doCheck = false; # needs more tools
installFlags = [ "ZIC=./zic-native" ];
preInstall = ''

View File

@ -38,4 +38,6 @@ stdenv.mkDerivation rec {
preConfigure = optionalString stdenv.isDarwin ''
intltoolize --force
'';
doCheck = false; # requires X11 daemon
}

View File

@ -13,4 +13,6 @@ stdenv.mkDerivation {
buildInputs = [ gtk libglade libxml2 libxslt libX11 docbook_xml_dtd_412 ];
nativeBuildInputs = [ pkgconfig intltool gnome-doc-utils which ];
doCheck = false; # fails, tries to access the net
}

View File

@ -21,4 +21,6 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ GConf glib ];
postPatch = "find . -name Makefile.in | xargs sed 's/-DG_DISABLE_DEPRECATED//g' -i ";
doCheck = false; # needs dbus daemon
}

View File

@ -24,6 +24,9 @@ in stdenv.mkDerivation rec {
meson ninja vala pkgconfig gettext itstool wrapGAppsHook gobjectIntrospection desktop-file-utils
];
# Required for USB redirection PolicyKit rules file
propagatedUserEnvPkgs = [ spice-gtk ];
buildInputs = [
libvirt-glib glib gtk3 gtkvnc libxml2
libvirt spice-gtk spice-protocol libsoup json-glib webkitgtk libosinfo systemd

View File

@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ meson ninja vala pkgconfig python3 libxslt libxml2 docbook_xsl ];
buildInputs = [ glib dbus-glib ];
doCheck = false; # fails 2 out of 9 tests, maybe needs dbus daemon?
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;

View File

@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
buildInputs = [ intltool glib libxfce4util ];
propagatedBuildInputs = [ dbus-glib ];
doCheck = false; # requires dbus daemon
meta = with stdenv.lib; {
homepage = http://docs.xfce.org/xfce/xfconf/start;
description = "Simple client-server configuration storage and query system for Xfce";
@ -26,4 +28,3 @@ stdenv.mkDerivation rec {
platforms = platforms.linux;
};
}

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, unzip }:
stdenv.mkDerivation rec {
name = "adobe-flex-sdk-4.0.0.14159-mpl";
name = "adobe-flex-sdk-4.0.0.14159";
src = fetchurl {
# This is the open source distribution

View File

@ -15,7 +15,7 @@ let
'';
};
emscriptenfastcomp = symlinkJoin {
name = "emscriptenfastcomp";
name = "emscriptenfastcomp-${stdenv.lib.getVersion self.emscriptenfastcomp-unwrapped}";
paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
preferLocalBuild = false;
allowSubstitutes = true;

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, darwin ? null
, buildPlatform, hostPlatform, targetPlatform
@ -154,7 +155,7 @@ let version = "4.8.5";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -164,7 +165,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;
@ -267,11 +268,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -351,21 +348,19 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -467,8 +462,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, darwin ? null
, buildPlatform, hostPlatform, targetPlatform
@ -162,7 +163,7 @@ let version = "4.9.4";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -172,7 +173,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;
@ -290,11 +291,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -373,21 +370,19 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -485,9 +480,6 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
// optionalAttrs (langJava) {

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -148,7 +149,7 @@ let version = "5.5.0";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -158,7 +159,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;
@ -292,11 +293,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -372,21 +369,19 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -484,8 +479,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -25,7 +25,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -151,7 +152,7 @@ let version = "6.4.0";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
@ -161,7 +162,7 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;
@ -300,11 +301,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -380,20 +377,19 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags =
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -491,9 +487,6 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
// optionalAttrs (langJava) {

View File

@ -2,30 +2,24 @@
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin
, langJava ? false
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
, enableShared ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java
, perl ? null # optional, for texi2pod (then pod2man)
, gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO)
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null
, zip ? null, unzip ? null, pkgconfig ? null
, gtk2 ? null, libart_lgpl ? null
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, x11Support ? langJava
, zlib ? null
, enableMultilib ? false
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -33,10 +27,6 @@
, buildPackages
}:
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null
&& perl != null; # for `--enable-java-home'
# LTO needs libelf and zlib.
assert libelf != null -> zlib != null;
@ -70,29 +60,6 @@ let version = "7.3.0";
})
++ optional langFortran ../gfortran-driving.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
# `configure' time.
# XXX: Eventually we might want to take it from upstream.
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
};
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
# binary distribution here to allow the whole chain to be bootstrapped.
javaAntlr = fetchurl {
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
};
xlibs = [
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
xproto renderproto xextproto inputproto randrproto
];
javaAwtGtk = langJava && x11Support;
/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
@ -156,17 +123,14 @@ let version = "7.3.0";
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
bootstrap = targetPlatform == hostPlatform;
in
# We need all these X libraries when building AWT with GTK+.
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh;
@ -262,13 +226,12 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
++ (optional (perl != null) perl);
# For building runtime libs
depsBuildTarget =
@ -283,8 +246,6 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
@ -305,11 +266,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -336,7 +293,6 @@ stdenv.mkDerivation ({
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langGo "go"
++ optional langObjC "objc"
++ optional langObjCpp "obj-c++"
@ -357,18 +313,6 @@ stdenv.mkDerivation ({
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
# Java options
optionals langJava [
"--with-ecj-jar=${javaEcj}"
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
"--enable-java-home"
"--with-java-home=\${prefix}/lib/jvm/jre"
] ++
optional javaAwtGtk "--enable-java-awt=gtk" ++
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
(import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
optional (!bootstrap) "--disable-bootstrap" ++
@ -386,31 +330,25 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags =
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
# library headers and binaries, regarless of the language being compiled.
#
# Note: When building the Java AWT GTK+ peer, the build system doesn't honor
# `--with-gmp' et al., e.g., when building
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
# them to $CPATH and $LIBRARY_PATH in this case.
#
# Likewise, the LTO code doesn't find zlib.
#
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
@ -419,9 +357,6 @@ stdenv.mkDerivation ({
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread
++ optional (libpthreadCross != null) libpthreadCross
@ -433,9 +368,6 @@ stdenv.mkDerivation ({
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread)
);
@ -476,8 +408,8 @@ stdenv.mkDerivation ({
longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
as libraries for these languages (libstdc++, libgcj, libgomp,...).
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
libraries for these languages (libstdc++, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant.
@ -497,8 +429,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -18,7 +18,8 @@
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -260,11 +261,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -327,20 +324,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags =
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags = optional
(bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -427,8 +421,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -1,2 +1,5 @@
export NIX_CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)"
export NIX_CXXSTDLIB_LINK=" -stdlib=libstdc++"
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libstdc++"

View File

@ -2,30 +2,24 @@
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin
, langJava ? false
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
, enableShared ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java
, perl ? null # optional, for texi2pod (then pod2man)
, gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO)
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null
, zip ? null, unzip ? null, pkgconfig ? null
, gtk2 ? null, libart_lgpl ? null
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, x11Support ? langJava
, zlib ? null
, enableMultilib ? false
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, # Strip kills static libs of other archs (hence no cross)
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null
@ -34,10 +28,6 @@
, buildPackages
}:
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null
&& perl != null; # for `--enable-java-home'
# LTO needs libelf and zlib.
assert libelf != null -> zlib != null;
@ -63,29 +53,6 @@ let version = "7-20170409";
++ optional noSysDirs ../no-sys-dirs.patch
++ optional langFortran ../gfortran-driving.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
# `configure' time.
# XXX: Eventually we might want to take it from upstream.
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
};
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
# binary distribution here to allow the whole chain to be bootstrapped.
javaAntlr = fetchurl {
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
};
xlibs = [
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
xproto renderproto xextproto inputproto randrproto
];
javaAwtGtk = langJava && x11Support;
/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
@ -150,9 +117,6 @@ let version = "7-20170409";
in
# We need all these X libraries when building AWT with GTK+.
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
@ -225,13 +189,12 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
++ (optional (perl != null) perl);
# For building runtime libs
depsBuildTarget =
@ -246,8 +209,6 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
@ -268,11 +229,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
# Basic dependencies
@ -299,7 +256,6 @@ stdenv.mkDerivation ({
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langGo "go"
++ optional langObjC "objc"
++ optional langObjCpp "obj-c++"
@ -320,17 +276,6 @@ stdenv.mkDerivation ({
# Optional features
optional (isl != null) "--with-isl=${isl}" ++
# Java options
optionals langJava [
"--with-ecj-jar=${javaEcj}"
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
"--enable-java-home"
"--with-java-home=\${prefix}/lib/jvm/jre"
] ++
optional javaAwtGtk "--enable-java-awt=gtk" ++
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
(import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
@ -351,28 +296,20 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
dontStrip = !stripped;
NIX_STRIP_DEBUG = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
# library headers and binaries, regarless of the language being compiled.
#
# Note: When building the Java AWT GTK+ peer, the build system doesn't honor
# `--with-gmp' et al., e.g., when building
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
# them to $CPATH and $LIBRARY_PATH in this case.
#
# Likewise, the LTO code doesn't find zlib.
#
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
@ -381,9 +318,6 @@ stdenv.mkDerivation ({
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread
++ optional (libpthreadCross != null) libpthreadCross
@ -395,9 +329,6 @@ stdenv.mkDerivation ({
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread)
);
@ -438,8 +369,8 @@ stdenv.mkDerivation ({
longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
as libraries for these languages (libstdc++, libgcj, libgomp,...).
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
libraries for these languages (libstdc++, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant.
@ -461,8 +392,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc";
}
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)

View File

@ -138,10 +138,8 @@ stdenv.mkDerivation rec {
"--disable-large-address-space"
];
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
# compatability. This will be replaced with something clearer in a future
# masss-rebuild.
crossConfig = true;
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [
perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42

View File

@ -139,10 +139,8 @@ stdenv.mkDerivation rec {
"--disable-large-address-space"
];
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
# compatability. This will be replaced with something clearer in a future
# masss-rebuild.
crossConfig = true;
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [
perl sphinx

View File

@ -152,10 +152,8 @@ stdenv.mkDerivation rec {
"--disable-large-address-space"
];
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
# compatability. This will be replaced with something clearer in a future
# masss-rebuild.
crossConfig = true;
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [
autoconf autoreconfHook automake perl python3 sphinx
@ -178,6 +176,9 @@ stdenv.mkDerivation rec {
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
checkTarget = "test";
doCheck = false; # fails with "testsuite/tests: No such file or directory. Stop."
hardeningDisable = [ "format" ];
postInstall = ''
for bin in "$out"/lib/${name}/bin/*; do

View File

@ -147,10 +147,8 @@ stdenv.mkDerivation rec {
"--disable-large-address-space"
];
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
# compatability. This will be replaced with something clearer in a future
# masss-rebuild.
crossConfig = true;
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [
perl autoconf automake m4 python3

View File

@ -145,10 +145,8 @@ stdenv.mkDerivation rec {
"--disable-large-address-space"
];
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
# compatability. This will be replaced with something clearer in a future
# masss-rebuild.
crossConfig = true;
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [
perl autoconf automake m4 python3

View File

@ -25,13 +25,13 @@ in
stdenv.mkDerivation rec {
name = "go-${version}";
version = "1.10.1";
version = "1.10.2";
src = fetchFromGitHub {
owner = "golang";
repo = "go";
rev = "go${version}";
sha256 = "1wqwy52ibb343a4v7b9q26xa6r5jk4khfxd90wbpcayws8cxly8m";
sha256 = "1lbxnlj5l9i8k1dg33dh8ndx9vspk9dkpcbg06jbbswy6kadmx6f";
};
# perl is used for testing go vet

View File

@ -29,7 +29,10 @@ stdenv.mkDerivation {
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src }:
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
in stdenv.mkDerivation {
@ -12,7 +12,7 @@ in stdenv.mkDerivation {
mv clang-tools-extra-* $sourceRoot/tools/extra
'';
buildInputs = [ cmake libedit libxml2 llvm ];
buildInputs = [ cmake libxml2 llvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
@ -31,7 +31,10 @@ in stdenv.mkDerivation {
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp
'';

View File

@ -39,7 +39,10 @@ stdenv.mkDerivation rec {
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh;
setupHooks = [
../../../../../build-support/setup-hooks/role.bash
./setup-hook.sh
];
meta = {
homepage = http://libcxx.llvm.org/;

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src }:
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
@ -13,7 +13,7 @@ let
mv clang-tools-extra-* $sourceRoot/tools/extra
'';
buildInputs = [ cmake libedit libxml2 llvm ];
buildInputs = [ cmake libxml2 llvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
@ -32,7 +32,10 @@ let
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp
'';

View File

@ -33,7 +33,10 @@ stdenv.mkDerivation rec {
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh;
setupHooks = [
../../../../../build-support/setup-hooks/role.bash
./setup-hook.sh
];
meta = {
homepage = http://libcxx.llvm.org/;

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src, python }:
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python }:
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
@ -13,7 +13,7 @@ let
mv clang-tools-extra-* $sourceRoot/tools/extra
'';
buildInputs = [ cmake libedit libxml2 llvm python ];
buildInputs = [ cmake libxml2 llvm python ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
@ -34,7 +34,10 @@ let
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp

View File

@ -31,7 +31,10 @@ stdenv.mkDerivation rec {
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh;
setupHooks = [
../../../../../build-support/setup-hooks/role.bash
./setup-hook.sh
];
meta = {
homepage = http://libcxx.llvm.org/;

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src, python }:
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python }:
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
@ -15,7 +15,7 @@ let
nativeBuildInputs = [ cmake ];
buildInputs = [ libedit libxml2 llvm python ];
buildInputs = [ libxml2 llvm python ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
@ -36,7 +36,10 @@ let
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp

View File

@ -31,7 +31,10 @@ stdenv.mkDerivation rec {
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh;
setupHooks = [
../../../../../build-support/setup-hooks/role.bash
./setup-hook.sh
];
meta = {
homepage = http://libcxx.llvm.org/;

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
{ stdenv, fetch, cmake, libxml2, llvm, version, release_version, clang-tools-extra_src, python
, fixDarwinDylibNames
, enableManpages ? false
}:
@ -19,7 +19,7 @@ let
nativeBuildInputs = [ cmake python ]
++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
buildInputs = [ libedit libxml2 llvm ]
buildInputs = [ libxml2 llvm ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
@ -52,7 +52,10 @@ let
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp

View File

@ -44,7 +44,10 @@ stdenv.mkDerivation rec {
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh;
setupHooks = [
../../../../../build-support/setup-hooks/role.bash
./setup-hook.sh
];
meta = {
homepage = http://libcxx.llvm.org/;

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
{ stdenv, fetch, cmake, libxml2, llvm, version, release_version, clang-tools-extra_src, python
, fixDarwinDylibNames
, enableManpages ? false
}:
@ -9,7 +9,7 @@ let
name = "clang-${version}";
unpackPhase = ''
unpackFile ${fetch "cfe" "1zyh4dggxd55lnfg73c8fybnkssqcaa6bq2h4bzimnnj1jdnqpqk"}
unpackFile ${fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s"}
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
@ -19,7 +19,7 @@ let
nativeBuildInputs = [ cmake python ]
++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
buildInputs = [ libedit libxml2 llvm ]
buildInputs = [ libxml2 llvm ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
@ -50,10 +50,12 @@ let
outputs = [ "out" "lib" "python" ];
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
# Clang expects to find LLVMgold in its own prefix
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
# Clang expects to find sanitizer libraries in its own prefix
ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp

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