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 = '' preConfigure = ''
echo "LIB = ${db}/lib" > config.in echo "LIB = ${db.out}/lib" > config.in
echo "INCLUDE = ${db}/include" >> config.in echo "INCLUDE = ${db.dev}/include" >> config.in
''; '';
} }
</programlisting> </programlisting>

View File

@ -1163,6 +1163,14 @@ passthru = {
</para> </para>
</listitem> </listitem>
</varlistentry> </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> <varlistentry>
<term><varname>makeFlags</varname> <term><varname>makeFlags</varname>
</term> </term>
@ -1646,6 +1654,15 @@ set debug-file-directory ~/.nix-profile/lib/debug
</para> </para>
</listitem> </listitem>
</varlistentry> </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> <varlistentry>
<term><varname>preInstallCheck</varname> <term><varname>preInstallCheck</varname>
</term> </term>

View File

@ -21,7 +21,11 @@ in rec {
darwin = [ patterns.isDarwin ]; darwin = [ patterns.isDarwin ];
freebsd = [ patterns.isFreeBSD ]; freebsd = [ patterns.isFreeBSD ];
# Should be better, but MinGW is unclear, and HURD is bit-rotted. # 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 ]; illumos = [ patterns.isSunOS ];
linux = [ patterns.isLinux ]; linux = [ patterns.isLinux ];
netbsd = [ patterns.isNetBSD ]; netbsd = [ patterns.isNetBSD ];

View File

@ -33,7 +33,7 @@ let
sh = pkgs.runtimeShell; sh = pkgs.runtimeShell;
binshDeps = pkgs.writeReferencesToFile sh; binshDeps = pkgs.writeReferencesToFile sh;
in in
pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } '' pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } (''
${optionalString (!isNix20) '' ${optionalString (!isNix20) ''
extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done) extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
''} ''}
@ -62,7 +62,11 @@ let
''} ''}
$extraOptions $extraOptions
END 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 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.flatpak = callTest tests/flatpak.nix {};
tests.firewall = callTest tests/firewall.nix {}; tests.firewall = callTest tests/firewall.nix {};
tests.fwupd = callTest tests/fwupd.nix {}; tests.fwupd = callTest tests/fwupd.nix {};
tests.gdk-pixbuf = callTest tests/gdk-pixbuf.nix {};
#tests.gitlab = callTest tests/gitlab.nix {}; #tests.gitlab = callTest tests/gitlab.nix {};
tests.gitolite = callTest tests/gitolite.nix {}; tests.gitolite = callTest tests/gitolite.nix {};
tests.gjs = callTest tests/gjs.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" "--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 = { meta = {
description = "Peer-to-peer electronic cash system"; description = "Peer-to-peer electronic cash system";
longDescription= '' longDescription= ''

View File

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

View File

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

View File

@ -22,6 +22,8 @@ in stdenv.mkDerivation rec {
gsettings-desktop-schemas gnome3.defaultIconTheme gsettings-desktop-schemas gnome3.defaultIconTheme
]; ];
doCheck = false; # fails 1 out of 9 tests
passthru = { passthru = {
updateScript = gnome3.updateScript { updateScript = gnome3.updateScript {
packageName = pname; 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: # To use the full release version:
# 1) Sign into https://backstage.renoise.com and download the appropriate (x86 or x86_64) version # 1) Sign into https://backstage.renoise.com and download the appropriate (x86 or x86_64) version
@ -6,31 +8,35 @@
# 2) Override the releasePath attribute to point to the location of the newly downloaded bundle. # 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 # 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. # use of functions like requireFile as the hash will be different for every user.
let fileversion = "3_1_0"; let
urlVersion = replaceStrings [ "." ] [ "_" ];
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "renoise"; name = "renoise-${version}";
buildInputs = [ libX11 libXext libXcursor libXrandr alsaLib libjack2 ]; version = "3.1.0";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.system == "x86_64-linux" then
if builtins.isNull releasePath then if builtins.isNull releasePath then
fetchurl { 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"; sha256 = "0pan68fr22xbj7a930y29527vpry3f07q3i9ya4fp6g7aawffsga";
} }
else else
releasePath releasePath
else if stdenv.system == "i686-linux" then else if stdenv.system == "i686-linux" then
if builtins.isNull releasePath then if builtins.isNull releasePath then
fetchurl { 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"; sha256 = "1lccjj4k8hpqqxxham5v01v2rdwmx3c5kgy1p9lqvzqma88k4769";
} }
else else
releasePath releasePath
else throw "Platform is not supported by Renoise"; else throw "Platform is not supported by Renoise";
buildInputs = [ libX11 libXext libXcursor libXrandr alsaLib libjack2 ];
installPhase = '' installPhase = ''
cp -r Resources $out cp -r Resources $out
@ -55,6 +61,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Modern tracker-based DAW"; description = "Modern tracker-based DAW";
homepage = http://www.renoise.com/; 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 in
stdenv.mkDerivation { stdenv.mkDerivation {
inherit name; name = "neovim-${stdenv.lib.getVersion neovim}";
buildCommand = let bin="${neovim}/bin/nvim"; in '' buildCommand = let bin="${neovim}/bin/nvim"; in ''
if [ ! -x "${bin}" ] if [ ! -x "${bin}" ]
then then

View File

@ -1,27 +1,34 @@
{ { stdenv, fetchurl, extra-cmake-modules, kdoctools, qtscript, kconfig
mkDerivation, lib, fetchurl, , kinit, karchive, kcrash, kcmutils, kconfigwidgets, knewstuff, kparts
extra-cmake-modules, kdoctools, , qca-qt5, shared-mime-info }:
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"; version = "17.12.3";
in mkDerivation rec {
name = "okteta";
src = fetchurl { 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"; sha256 = "03wsv83l1cay2dpcsksad124wzan7kh8zxdw1h0yicn398kdbck4";
}; };
meta = {
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ peterhoeg bkchr ];
};
nativeBuildInputs = [ qtscript extra-cmake-modules kdoctools ]; nativeBuildInputs = [ qtscript extra-cmake-modules kdoctools ];
buildInputs = [ shared-mime-info ]; buildInputs = [ shared-mime-info ];
propagatedBuildInputs = [ propagatedBuildInputs = [
kconfig kinit kcmutils kconfigwidgets knewstuff kparts qca-qt5 kconfig
karchive kcrash 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 ] [ libX11 libXext libXt libwebp ]
; ;
doCheck = false; # fails 6 out of 76 tests
postInstall = '' postInstall = ''
(cd "$dev/include" && ln -s ImageMagick* ImageMagick) (cd "$dev/include" && ln -s ImageMagick* ImageMagick)
moveToOutput "bin/*-config" "$dev" moveToOutput "bin/*-config" "$dev"

View File

@ -22,9 +22,8 @@ let
''; '';
} }
// a // 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 []); buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []);
nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []); nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []);
} }

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake }: { stdenv, fetchurl, cmake }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "soxr-0.1.2"; name = "soxr-0.1.3";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/soxr/${name}-Source.tar.xz"; url = "mirror://sourceforge/soxr/${name}-Source.tar.xz";
sha256 = "0xf2w3piwz9gfr1xqyrj4k685q5dy53kq3igv663i4f4y4sg9rjl"; sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di";
}; };
outputs = [ "out" "doc" ]; # headers are just two and very small 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. # WARNING: NEVER set any of the options below to `true` by default.
# Set to `privacySupport` or `false`. # 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 , geolocationSupport ? !privacySupport
, googleAPISupport ? geolocationSupport , googleAPISupport ? geolocationSupport
, crashreporterSupport ? false , crashreporterSupport ? false
@ -213,6 +215,7 @@ stdenv.mkDerivation (rec {
++ extraMakeFlags; ++ extraMakeFlags;
enableParallelBuilding = true; enableParallelBuilding = true;
doCheck = false; # "--disable-tests" above
preInstall = '' preInstall = ''
# The following is needed for startup cache creation on grsecurity kernels. # 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 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-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 +++ 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 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-child.js
content/global/browser-content.js content/global/browser-content.js
-* content/global/buildconfig.html -* content/global/buildconfig.html
content/global/buildconfig.css
content/global/contentAreaUtils.js content/global/contentAreaUtils.js
#ifndef MOZ_FENNEC content/global/datepicker.xhtml
content/global/customizeToolbar.css

View File

@ -12,21 +12,27 @@ let
./fix-pa-context-connect-retval.patch ./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 in
rec { rec {
firefox = common rec { firefox = common rec {
pname = "firefox"; pname = "firefox";
version = "59.0.2"; version = "60.0.1";
src = fetchurl { src = fetchurl {
url = "https://hg.mozilla.org/releases/mozilla-release/archive/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2"; url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "3kfh224sfc9ig4733frnskcs49xzjkrs00lxllsvx1imm6f4sf117mqlvc7bhgrn8ldiqn6vaa5g6gd9b7awkk1g975bbzk9namb3yv"; sha512 = "083bhfh32dy1cz4c4wn92i2lnl9mqikkd9dlkwd5i6clyjb9pc6d5g87kvb8si0n6jll4alyhw792j56a7gmzny3d93068hr4zyh3qn";
}; };
patches = nixpkgsPatches ++ [ patches = nixpkgsPatches ++ [
./no-buildconfig.patch ./no-buildconfig.patch
]; ] ++ lib.optional stdenv.isAarch64 firefox60_aarch64_skia_patch;
meta = { meta = {
description = "A web browser built from Firefox source tree"; 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"; pname = "firefox-esr";
version = "52.7.3esr"; version = "52.8.0esr";
src = fetchurl { src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz"; url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "31y3qrslg61724vmly6gr1lqcrqgpkh3zsl8riax45gizfcp3qbgkvmd5wwfn9fiwjqi6ww3i08j51wxrfxcxznv7c6qzsvzzc30mgw"; sha512 = "4136fa582e4ffd754d46a79bdb562bd12da4d013d87dfe40fa92addf377e95f5f642993c8b783edd5290089619beeb5a907a0810b68b8808884f087986977df1";
}; };
patches = nixpkgsPatches; patches = nixpkgsPatches;
@ -53,7 +59,28 @@ rec {
description = "A web browser built from Firefox Extended Support Release source tree"; description = "A web browser built from Firefox Extended Support Release source tree";
}; };
updateScript = callPackage ./update.nix { 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"; versionSuffix = "esr";
}; };
} {}; } {};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,14 +1,30 @@
{ stdenv, fetchzip, jre }: { stdenv, fetchzip, jre }:
stdenv.mkDerivation {
name = "atlassian-cli"; stdenv.mkDerivation rec {
name = "atlassian-cli-${version}";
version = "7.8.0"; version = "7.8.0";
src = fetchzip { 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"; sha256 = "111s4d9m6vxq8jwh1d6ar1f4n5zmyjg7gi2vl3aq63kxbfld9vw7";
extraPostFetch = "chmod go-w $out"; 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 = '' installPhase = ''
mkdir -p $out/{bin,share/doc/atlassian-cli} mkdir -p $out/{bin,share/doc/atlassian-cli}
cp -r lib $out/share/java cp -r lib $out/share/java
@ -22,10 +38,12 @@ stdenv.mkDerivation {
chmod +x $out/bin/$tool chmod +x $out/bin/$tool
done done
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An integrated family of CLIs for various Atlassian applications"; description = "An integrated family of CLIs for various Atlassian applications";
homepage = https://bobswift.atlassian.net/wiki/spaces/ACLI/overview; 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 in
stdenv.mkDerivation (args // { stdenv.mkDerivation (args // {
name = "${args.name}-${lua.luaversion}";
inherit preBuild postInstall; inherit preBuild postInstall;
inherit luadeps runtimeDeps; inherit luadeps runtimeDeps;

View File

@ -10,42 +10,37 @@
, moreTests ? false , moreTests ? false
}: }:
# helpers for options with stdenv.lib;
let optionals = stdenv.lib.optionals;
optionalString = stdenv.lib.optionalString; let
optionOnOff = option: "${if option then "on" else "off"}"; optionOnOff = option: "${if option then "on" else "off"}";
urlVersion = replaceStrings ["."] ["_"];
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
major_version = "3"; name = "simgrid-${version}";
minor_version = "17"; version = "3.17";
version = "v${major_version}.${minor_version}";
tagged_version = "${major_version}_${minor_version}";
name = "simgrid";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "simgrid"; owner = "simgrid";
repo = "simgrid"; repo = "simgrid";
rev = "v3_17"; rev = "v${urlVersion version}";
sha256 = "0ffs9w141qhw571jsa9sch1cnr332vs4sgj6dsiij2mc24m6wpb4"; sha256 = "0ffs9w141qhw571jsa9sch1cnr332vs4sgj6dsiij2mc24m6wpb4";
#rev = "master";
#sha256 = "0qvh1jzc2lpnp8234kjx1x4g1a5kfdn6kb15vhk160qgvj98nyqm";
}; };
nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind] nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind ]
++ optionals fortranSupport [gfortran] ++ optionals fortranSupport [ gfortran ]
++ optionals buildJavaBindings [openjdk] ++ optionals buildJavaBindings [ openjdk ]
++ optionals buildDocumentation [transfig ghostscript doxygen] ++ optionals buildDocumentation [ transfig ghostscript doxygen ]
++ optionals modelCheckingSupport [libunwind libevent]; ++ optionals modelCheckingSupport [ libunwind libevent ];
#buildInputs = optional luaSupport lua5; #buildInputs = optional luaSupport lua5;
preConfigure = # Make it so that libsimgrid.so will be found when running programs from
# Make it so that libsimgrid.so will be found when running programs from # the build dir.
# the build dir. preConfigure = ''
''
export LD_LIBRARY_PATH="$PWD/build/lib" export LD_LIBRARY_PATH="$PWD/build/lib"
''; '';
# Release mode is not supported in SimGrid # Release mode is not supported in SimGrid
cmakeBuildType = "Debug"; cmakeBuildType = "Debug";
@ -60,58 +55,57 @@ stdenv.mkDerivation rec {
# For more information see: # For more information see:
# http://simgrid.gforge.inria.fr/simgrid/latest/doc/install.html#install_cmake_list # http://simgrid.gforge.inria.fr/simgrid/latest/doc/install.html#install_cmake_list
cmakeFlags= '' cmakeFlags= ''
-Denable_documentation=${optionOnOff buildDocumentation} -Denable_documentation=${optionOnOff buildDocumentation}
-Denable_java=${optionOnOff buildJavaBindings} -Denable_java=${optionOnOff buildJavaBindings}
-Denable_fortran=${optionOnOff fortranSupport} -Denable_fortran=${optionOnOff fortranSupport}
-Denable_model-checking=${optionOnOff modelCheckingSupport} -Denable_model-checking=${optionOnOff modelCheckingSupport}
-Denable_ns3=off -Denable_ns3=off
-Denable_lua=off -Denable_lua=off
-Denable_lib_in_jar=off -Denable_lib_in_jar=off
-Denable_maintainer_mode=off -Denable_maintainer_mode=off
-Denable_mallocators=on -Denable_mallocators=on
-Denable_debug=on -Denable_debug=on
-Denable_smpi=on -Denable_smpi=on
-Denable_smpi_ISP_testsuite=${optionOnOff moreTests} -Denable_smpi_ISP_testsuite=${optionOnOff moreTests}
-Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests} -Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}
-Denable_compile_warnings=${optionOnOff debug} -Denable_compile_warnings=${optionOnOff debug}
-Denable_compile_optimizations=${optionOnOff (!debug)} -Denable_compile_optimizations=${optionOnOff (!debug)}
-Denable_lto=${optionOnOff (!debug)} -Denable_lto=${optionOnOff (!debug)}
''; '';
#-Denable_lua=${optionOnOff luaSupport} # -Denable_lua=${optionOnOff luaSupport}
#-Denable_smpi_papi=${optionOnOff moreTests} # -Denable_smpi_papi=${optionOnOff moreTests}
makeFlags = optionalString debug "VERBOSE=1"; makeFlags = optionalString debug "VERBOSE=1";
preBuild = # Some Perl scripts are called to generate test during build which
'' # is before the fixupPhase, so do this manualy here:
# Some perl scripts are called to generate test during build which preBuild = ''
# is before the fixupPhase of nix, so do this manualy here: patchShebangs ..
patchShebangs .. '';
'';
doCheck = true; doCheck = true;
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
ctest --output-on-failure -E smpi-replay-multiple ctest --output-on-failure -E smpi-replay-multiple
runHook postCheck runHook postCheck
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
meta = with stdenv.lib; { meta = {
description = "Framework for the simulation of distributed applications"; description = "Framework for the simulation of distributed applications";
longDescription = longDescription = ''
'' SimGrid is a toolkit that provides core functionalities for the SimGrid is a toolkit that provides core functionalities for the
simulation of distributed applications in heterogeneous distributed simulation of distributed applications in heterogeneous distributed
environments. The specific goal of the project is to facilitate environments. The specific goal of the project is to facilitate
research in the area of distributed and parallel application research in the area of distributed and parallel application
scheduling on distributed computing platforms ranging from simple scheduling on distributed computing platforms ranging from simple
network of workstations to Computational Grids. network of workstations to Computational Grids.
''; '';
homepage = http://simgrid.gforge.inria.fr/; homepage = http://simgrid.gforge.inria.fr/;
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ mickours ]; maintainers = with maintainers; [ mickours ];
platforms = platforms.x86_64; platforms = platforms.x86_64;
license = licenses.lgpl2Plus;
}; };
} }

View File

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

View File

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

View File

@ -18,7 +18,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport; assert svnSupport -> perlSupport;
let let
version = "2.16.3"; version = "2.17.0";
svn = subversionClient.override { perlBindings = perlSupport; }; svn = subversionClient.override { perlBindings = perlSupport; };
in in
@ -27,19 +27,24 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "0j1dwvg5llnj3g0fp8hdgpms4hp90qw9f6509vqw30dhwplrjpfn"; sha256 = "1ismz7nsz8dgjmk782xr9s0mr2qh06f72pdcgbxfmnw1bvlya5p9";
}; };
outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb"; outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
enableParallelBuilding = true;
## Patch
patches = [ patches = [
./docbook2texi.patch ./docbook2texi.patch
./symlinks-in-bin.patch ./symlinks-in-bin.patch
./git-sh-i18n.patch ./git-sh-i18n.patch
./ssh-path.patch ./ssh-path.patch
./git-send-email-honor-PATH.patch ./git-send-email-honor-PATH.patch
./installCheck-path.patch
]; ];
postPatch = '' postPatch = ''
@ -47,6 +52,10 @@ stdenv.mkDerivation {
substituteInPlace "$x" \ substituteInPlace "$x" \
--subst-var-by ssh "${openssh}/bin/ssh" --subst-var-by ssh "${openssh}/bin/ssh"
done done
# Fix references to gettext introduced by ./git-sh-i18n.patch
substituteInPlace git-sh-i18n.sh \
--subst-var-by gettext ${gettext}
''; '';
nativeBuildInputs = [ gettext perl ] nativeBuildInputs = [ gettext perl ]
@ -58,7 +67,6 @@ stdenv.mkDerivation {
++ stdenv.lib.optionals withpcre2 [ pcre2 ] ++ stdenv.lib.optionals withpcre2 [ pcre2 ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ]; ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ];
# required to support pthread_cancel() # required to support pthread_cancel()
NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s" NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s"
+ stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr"; + stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr";
@ -68,6 +76,10 @@ stdenv.mkDerivation {
"ac_cv_snprintf_returns_bogus=no" "ac_cv_snprintf_returns_bogus=no"
]; ];
preBuild = ''
makeFlagsArray+=( perllibdir=$out/$(perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}') )
'';
makeFlags = [ makeFlags = [
"prefix=\${out}" "prefix=\${out}"
"SHELL_PATH=${stdenv.shell}" "SHELL_PATH=${stdenv.shell}"
@ -86,15 +98,17 @@ stdenv.mkDerivation {
popd popd
''; '';
# FIXME: "make check" requires Sparse; the Makefile must be tweaked
# so that `SPARSE_FLAGS' corresponds to the current architecture... ## Install
#doCheck = true;
# 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"; installFlags = "NO_INSTALL_HARDLINKS=1";
preInstall = stdenv.lib.optionalString stdenv.isDarwin '' preInstall = stdenv.lib.optionalString stdenv.isDarwin ''
mkdir -p $out/bin 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 = postInstall =
@ -112,7 +126,7 @@ stdenv.mkDerivation {
# Install contrib stuff. # Install contrib stuff.
mkdir -p $out/share/git 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/ ln -s "$out/share/git/contrib/credential/netrc/git-credential-netrc" $out/bin/
mkdir -p $out/share/emacs/site-lisp mkdir -p $out/share/emacs/site-lisp
ln -s "$out/share/git/contrib/emacs/"*.el $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" \ 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} $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 # Also put git-http-backend into $PATH, so that we can use smart
# HTTP(s) transports for pushing # 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 = { meta = {
homepage = https://git-scm.com/; 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 and (2) make sure `gitman.info' isn't produced since it's broken (duplicate
node names). node names).
diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile diff --git a/Documentation/Makefile b/Documentation/Makefile
--- git-1.8.4-orig/Documentation/Makefile 2013-08-23 21:38:43.000000000 +0200 --- a/Documentation/Makefile
+++ git-1.8.4/Documentation/Makefile 2013-09-30 14:48:51.532890378 +0200 +++ b/Documentation/Makefile
@@ -101,7 +101,7 @@ @@ -122,7 +122,7 @@
MAKEINFO = makeinfo MAKEINFO = makeinfo
INSTALL_INFO = install-info INSTALL_INFO = install-info
-DOCBOOK2X_TEXI = docbook2x-texi -DOCBOOK2X_TEXI = docbook2x-texi
+DOCBOOK2X_TEXI = docbook2texi +DOCBOOK2X_TEXI = docbook2texi
DBLATEX = dblatex DBLATEX = dblatex
ifndef PERL_PATH ASCIIDOC_DBLATEX_DIR = /etc/asciidoc/dblatex
PERL_PATH = /usr/bin/perl DBLATEX_COMMON = -p $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.sty
@@ -205,7 +205,7 @@ @@ -240,7 +240,7 @@
man5: $(DOC_MAN5) man5: $(DOC_MAN5)
man7: $(DOC_MAN7) 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 pdf: user-manual.pdf
@@ -221,10 +221,9 @@ @@ -256,10 +256,9 @@
install-info: info install-info: info
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir) $(INSTALL) -d -m 755 $(DESTDIR)$(infodir)

View File

@ -1,22 +1,20 @@
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 8060ea35c..c81067a19 100644
--- a/Documentation/git-send-email.txt --- a/Documentation/git-send-email.txt
+++ b/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; specify a full pathname of a sendmail-like program instead;
the program must support the `-i` option. Default value can the program must support the `-i` option. Default value can
be specified by the `sendemail.smtpServer` configuration be specified by the `sendemail.smtpServer` configuration
- option; the built-in default is to search for `sendmail` in - option; the built-in default is to search for `sendmail` in
- `/usr/sbin`, `/usr/lib` and $PATH if such program is - `/usr/sbin`, `/usr/lib` and $PATH if such program is
+ option; the built-in default is to search in $PATH if such program is + option; the built-in default is to search in $PATH if such program is
available, falling back to `localhost` otherwise. available, falling back to `localhost` otherwise.
--smtp-server-port=<port>:: --smtp-server-port=<port>::
diff --git a/git-send-email.perl b/git-send-email.perl diff --git a/git-send-email.perl b/git-send-email.perl
index edcc6d346..8e357aeab 100755
--- a/git-send-email.perl --- a/git-send-email.perl
+++ b/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) { 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 diff --git a/Makefile b/Makefile
--- git-1.8.2.1-orig/Makefile 2013-04-08 00:52:04.000000000 +0200 --- a/Makefile
+++ git-1.8.2.1/Makefile 2013-04-22 15:46:42.906026940 +0200 +++ b/Makefile
@@ -2319,8 +2319,7 @@ @@ -2609,8 +2609,7 @@
{ test "$$bindir/" = "$$execdir/" || \ { test "$$bindir/" = "$$execdir/" || \
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
$(RM) "$$execdir/$$p" && \ $(RM) "$$execdir/$$p" && \

View File

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

View File

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

View File

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

View File

@ -12,9 +12,13 @@ let
sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j"; sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
}; };
configurePlatforms = [];
configureFlags = [ configureFlags = [
"--arch=arm" "--arch=${hostPlatform.parsed.cpu.name}"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [
# TODO be better with condition
"--cpu=arm1176jzf-s" "--cpu=arm1176jzf-s"
] ++ [
"--disable-muxers" "--disable-muxers"
"--enable-muxer=spdif" "--enable-muxer=spdif"
"--enable-muxer=adts" "--enable-muxer=adts"
@ -42,19 +46,14 @@ let
"--enable-hardcoded-tables" "--enable-hardcoded-tables"
"--disable-runtime-cpudetect" "--disable-runtime-cpudetect"
"--disable-debug" "--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; enableParallelBuilding = true;
crossAttrs = {
configurePlatforms = [];
configureFlags = configureFlags ++ [
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
"--target_os=linux"
"--arch=${hostPlatform.parsed.cpu.name}"
];
};
meta = { meta = {
homepage = http://www.ffmpeg.org/; homepage = http://www.ffmpeg.org/;
@ -83,5 +82,6 @@ stdenv.mkDerivation rec {
homepage = https://github.com/huceke/omxplayer; homepage = https://github.com/huceke/omxplayer;
description = "Commandline OMX player for the Raspberry Pi"; description = "Commandline OMX player for the Raspberry Pi";
license = stdenv.lib.licenses.gpl2Plus; 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 , zlib, a52dec, libmad, faad2, ffmpeg, alsaLib
, pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska , 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 , 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 , libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus , libass, libva-full, libdvbpsi, libdc1394, libraw1394, libopus
, libvdpau, libsamplerate, live555, fluidsynth , libvdpau, libsamplerate, live555, fluidsynth, wayland, wayland-protocols
, qt4 ? null , onlyLibVLC ? false
, withQt5 ? false, qtbase ? null, qtx11extras ? null , withQt5 ? true, qtbase ? null, qtsvg ? null, qtx11extras ? null
, jackSupport ? false , jackSupport ? false
, fetchpatch , fetchpatch
}: }:
with stdenv.lib; with stdenv.lib;
assert (withQt5 -> qtbase != null && qtx11extras != null); assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null);
assert (!withQt5 -> qt4 != null);
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "vlc-${version}"; name = "vlc-${version}";
version = "2.2.8"; version = "3.0.1";
src = fetchurl { src = fetchurl {
url = "http://get.videolan.org/vlc/${version}/${name}.tar.xz"; 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. # VLC uses a *ton* of libraries for various pieces of functionality, many of
# https://trac.videolan.org/vlc/ticket/16497 # which are not included here for no other reason that nobody has mentioned
postPatch = if (!withQt5) then null else # needing them
"sed '/I78ef29975181ee22429c9bd4b11d96d9e68b7a9c/s/^/: #/' -i configure"; buildInputs = [
zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread
buildInputs = libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt libgpgerror
[ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt systemd gnutls avahi libcddb SDL SDL_image libmtp unzip taglib libarchive
libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec libkate libtiger libv4l samba liboggz libass libdvbpsi libva-full
udev gnutls avahi libcddb SDL SDL_image libmtp unzip taglib xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
libkate libtiger libv4l samba liboggz libass libdvbpsi libva libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate live555
xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms fluidsynth wayland wayland-protocols
libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate live555 ] ++ optionals withQt5 [ qtbase qtsvg qtx11extras ]
fluidsynth
]
++ [(if withQt5 then qtbase else qt4)]
++ optional withQt5 qtx11extras
++ optional jackSupport libjack2; ++ optional jackSupport libjack2;
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ autoreconfHook perl 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"
];
enableParallelBuilding = true; enableParallelBuilding = true;
preBuild = '' LIVE555_PREFIX = live555;
substituteInPlace modules/text_renderer/freetype.c --replace \
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf \ # vlc depends on a c11-gcc wrapper script which we don't have so we need to
${freefont_ttf}/share/fonts/truetype/FreeSerifBold.ttf # 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; { meta = with stdenv.lib; {
description = "Cross-platform media player and streaming server"; description = "Cross-platform media player and streaming server";
homepage = http://www.videolan.org/vlc/; homepage = http://www.videolan.org/vlc/;
platforms = platforms.linux;
license = licenses.lgpl21Plus; 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 openGLSupport "--enable-opengl"
++ optional virglSupport "--enable-virglrenderer"; ++ optional virglSupport "--enable-virglrenderer";
doCheck = false; # tries to access /dev
postFixup = postFixup =
'' ''
for exe in $out/bin/qemu-system-* ; do for exe in $out/bin/qemu-system-* ; do

View File

@ -5,28 +5,20 @@ var_templates_list=(
NIX+LDFLAGS_BEFORE NIX+LDFLAGS_BEFORE
NIX+LDFLAGS_AFTER NIX+LDFLAGS_AFTER
NIX+LDFLAGS_HARDEN NIX+LDFLAGS_HARDEN
NIX+HARDENING_ENABLE
) )
var_templates_bool=( var_templates_bool=(
NIX+SET_BUILD_ID NIX+SET_BUILD_ID
NIX+DONT_SET_RPATH NIX+DONT_SET_RPATH
) )
declare -a role_infixes=() accumulateRoles
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
for var in "${var_templates_list[@]}"; do for var in "${var_templates_list[@]}"; do
mangleVarList "$var" "${role_infixes[@]}" mangleVarList "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done done
for var in "${var_templates_bool[@]}"; do for var in "${var_templates_bool[@]}"; do
mangleVarBool "$var" "${role_infixes[@]}" mangleVarBool "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done done
if [ -e @out@/nix-support/libc-ldflags ]; then if [ -e @out@/nix-support/libc-ldflags ]; then

View File

@ -1,53 +1,58 @@
hardeningFlags=(relro bindnow) declare -a hardeningLDFlags=()
# 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 hardeningDisableMap declare -A hardeningEnableMap=()
# Intentionally word-split in case 'hardeningDisable' is defined in Nix. # Intentionally word-split in case 'NIX_HARDENING_ENABLE' is defined in Nix. The
for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@ # array expansion also prevents undefined variables from causing trouble with
do # `set -u`.
hardeningDisableMap[$flag]=1 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 done
if (( "${NIX_DEBUG:-0}" >= 1 )); then 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 printf 'HARDENING: disabled flags:' >&2
(( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2 (( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2
echo >&2 echo >&2
fi
if [[ -z "${hardeningDisableMap[all]:-}" ]]; then if (( "${#hardeningEnableMap[@]}" )); then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2; echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2;
fi fi
for flag in "${hardeningFlags[@]}"
do
if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then
case $flag in
pie)
if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling LDFlags -pie >&2; fi
hardeningLDFlags+=('-pie')
fi
;;
relro)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling relro >&2; fi
hardeningLDFlags+=('-z' 'relro')
;;
bindnow)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling bindnow >&2; fi
hardeningLDFlags+=('-z' 'now')
;;
*)
# Ignore unsupported. Checked in Nix that at least *some*
# tool supports each flag.
;;
esac
fi
done
fi fi
for flag in "${!hardeningEnableMap[@]}"; do
case $flag in
pie)
if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling LDFlags -pie >&2; fi
hardeningLDFlags+=('-pie')
fi
;;
relro)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling relro >&2; fi
hardeningLDFlags+=('-z' 'relro')
;;
bindnow)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling bindnow >&2; fi
hardeningLDFlags+=('-z' 'now')
;;
*)
# Ignore unsupported. Checked in Nix that at least *some*
# tool supports each flag.
;;
esac
done

View File

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

View File

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

View File

@ -8,47 +8,25 @@ set -u
# native compile. # native compile.
# #
# TODO(@Ericson2314): No native exception # TODO(@Ericson2314): No native exception
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0 [[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
bintoolsWrapper_addLDVars () { bintoolsWrapper_addLDVars () {
case $depHostOffset in # See ../setup-hooks/role.bash
-1) local role='BUILD_' ;; local role_post role_pre
0) local role='' ;; getTargetRoleEnvHook
1) local role='TARGET_' ;;
*) echo "bintools-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
return 1 ;;
esac
if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
export NIX_${role}LDFLAGS+=" -L$1/lib64" export NIX_${role_pre}LDFLAGS+=" -L$1/lib64"
fi fi
if [[ -d "$1/lib" ]]; then if [[ -d "$1/lib" ]]; then
export NIX_${role}LDFLAGS+=" -L$1/lib" export NIX_${role_pre}LDFLAGS+=" -L$1/lib"
fi fi
} }
case $targetOffset in # See ../setup-hooks/role.bash
-1) getTargetRole
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_BUILD=1 getTargetRoleWrapper
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
addEnvHooks "$targetOffset" bintoolsWrapper_addLDVars addEnvHooks "$targetOffset" bintoolsWrapper_addLDVars
@ -83,6 +61,10 @@ do
fi fi
done 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 # No local scope in sourced file
unset -v role_pre role_post cmd upper_case unset -v role_pre role_post cmd upper_case
set +u set +u

View File

@ -14,26 +14,15 @@ var_templates_bool=(
NIX+ENFORCE_NO_NATIVE NIX+ENFORCE_NO_NATIVE
) )
# Accumulate infixes for taking in the right input parameters. See setup-hook accumulateRoles
# 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
# We need to mangle names for hygiene, but also take parameters/overrides # We need to mangle names for hygiene, but also take parameters/overrides
# from the environment. # from the environment.
for var in "${var_templates_list[@]}"; do for var in "${var_templates_list[@]}"; do
mangleVarList "$var" "${role_infixes[@]}" mangleVarList "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done done
for var in "${var_templates_bool[@]}"; do for var in "${var_templates_bool[@]}"; do
mangleVarBool "$var" "${role_infixes[@]}" mangleVarBool "$var" ${role_infixes[@]+"${role_infixes[@]}"}
done done
# `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld. # `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld.

View File

@ -1,67 +1,72 @@
hardeningFlags=(fortify stackprotector pic strictoverflow format relro bindnow) declare -a hardeningCFlags=()
# 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 hardeningDisableMap declare -A hardeningEnableMap=()
# Intentionally word-split in case 'hardeningDisable' is defined in Nix. # Intentionally word-split in case 'NIX_HARDENING_ENABLE' is defined in Nix. The
for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@ # array expansion also prevents undefined variables from causing trouble with
do # `set -u`.
hardeningDisableMap[$flag]=1 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 done
if (( "${NIX_DEBUG:-0}" >= 1 )); then 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 printf 'HARDENING: disabled flags:' >&2
(( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2 (( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2
echo >&2 echo >&2
fi
if [[ -z "${hardeningDisableMap[all]:-}" ]]; then if (( "${#hardeningEnableMap[@]}" )); then
if (( "${NIX_DEBUG:-0}" >= 1 )); then
echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2; echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2;
fi fi
for flag in "${hardeningFlags[@]}"
do
if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then
case $flag in
fortify)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling fortify >&2; fi
hardeningCFlags+=('-O2' '-D_FORTIFY_SOURCE=2')
;;
stackprotector)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling stackprotector >&2; fi
hardeningCFlags+=('-fstack-protector-strong' '--param' 'ssp-buffer-size=4')
;;
pie)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling CFlags -fPIE >&2; fi
hardeningCFlags+=('-fPIE')
if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling LDFlags -pie >&2; fi
hardeningCFlags+=('-pie')
fi
;;
pic)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling pic >&2; fi
hardeningCFlags+=('-fPIC')
;;
strictoverflow)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling strictoverflow >&2; fi
hardeningCFlags+=('-fno-strict-overflow')
;;
format)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling format >&2; fi
hardeningCFlags+=('-Wformat' '-Wformat-security' '-Werror=format-security')
;;
*)
# Ignore unsupported. Checked in Nix that at least *some*
# tool supports each flag.
;;
esac
fi
done
fi fi
for flag in "${!hardeningEnableMap[@]}"; do
case $flag in
fortify)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling fortify >&2; fi
hardeningCFlags+=('-O2' '-D_FORTIFY_SOURCE=2')
;;
stackprotector)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling stackprotector >&2; fi
hardeningCFlags+=('-fstack-protector-strong' '--param' 'ssp-buffer-size=4')
;;
pie)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling CFlags -fPIE >&2; fi
hardeningCFlags+=('-fPIE')
if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling LDFlags -pie >&2; fi
hardeningCFlags+=('-pie')
fi
;;
pic)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling pic >&2; fi
hardeningCFlags+=('-fPIC')
;;
strictoverflow)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling strictoverflow >&2; fi
hardeningCFlags+=('-fno-strict-overflow')
;;
format)
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling format >&2; fi
hardeningCFlags+=('-Wformat' '-Wformat-security' '-Werror=format-security')
;;
*)
# Ignore unsupported. Checked in Nix that at least *some*
# tool supports each flag.
;;
esac
done

View File

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

View File

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

View File

@ -60,61 +60,28 @@ set -u
# native compile. # native compile.
# #
# TODO(@Ericson2314): No native exception # 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 # 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 # over no state, and there's no @-substitutions within, so any redefined
# function is guaranteed to be exactly the same. # function is guaranteed to be exactly the same.
ccWrapper_addCVars () { ccWrapper_addCVars () {
# The `depHostOffset` describes how the host platform of the dependencies # See ../setup-hooks/role.bash
# are slid relative to the depending package. It is brought into scope of local role_post role_pre
# the environment hook defined as the role of the dependency being applied. getTargetRoleEnvHook
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
if [[ -d "$1/include" ]]; then 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 fi
if [[ -d "$1/Library/Frameworks" ]]; then 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 fi
} }
# Since the same cc-wrapper derivation can be depend on in multiple ways, we # See ../setup-hooks/role.bash
# need to accumulate *each* role (i.e. target platform relative the depending getTargetRole
# derivation) in which the cc-wrapper derivation is used. getTargetRoleWrapper
# `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
# We use the `targetOffset` to choose the right env hook to accumulate the right # We use the `targetOffset` to choose the right env hook to accumulate the right
# sort of deps (those with that offset). # sort of deps (those with that offset).
@ -147,6 +114,10 @@ export ${role_pre}CXX=@named_cxx@
export CC${role_post}=@named_cc@ export CC${role_post}=@named_cc@
export CXX${role_post}=@named_cxx@ 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 # No local scope in sourced file
unset -v role_pre role_post unset -v role_pre role_post
set +u set +u

View File

@ -91,7 +91,7 @@ in stdenv.mkDerivation (args // {
installPhase = args.installPhase or '' installPhase = args.installPhase or ''
runHook preInstall runHook preInstall
mkdir -p $out/bin 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 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() { mangleVarList() {
local var="$1" local var="$1"
shift shift

View File

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

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.2.1"; version = "1.2.1";
name = "meslo-lg"; name = "meslo-lg-${version}";
meslo-lg = fetchurl { meslo-lg = fetchurl {
url="https://github.com/andreberg/Meslo-Font/blob/master/dist/v${version}/Meslo%20LG%20v${version}.zip?raw=true"; 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}: {stdenv, fetchzip}:
fetchzip { fetchzip {
name = "MPH-2B-Damase"; name = "MPH-2B-Damase-2";
url = http://www.wazu.jp/downloads/damase_v.2.zip; url = http://www.wazu.jp/downloads/damase_v.2.zip;

View File

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

View File

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

View File

@ -38,4 +38,6 @@ stdenv.mkDerivation rec {
preConfigure = optionalString stdenv.isDarwin '' preConfigure = optionalString stdenv.isDarwin ''
intltoolize --force 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 ]; buildInputs = [ gtk libglade libxml2 libxslt libX11 docbook_xml_dtd_412 ];
nativeBuildInputs = [ pkgconfig intltool gnome-doc-utils which ]; 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 ]; propagatedBuildInputs = [ GConf glib ];
postPatch = "find . -name Makefile.in | xargs sed 's/-DG_DISABLE_DEPRECATED//g' -i "; 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 meson ninja vala pkgconfig gettext itstool wrapGAppsHook gobjectIntrospection desktop-file-utils
]; ];
# Required for USB redirection PolicyKit rules file
propagatedUserEnvPkgs = [ spice-gtk ];
buildInputs = [ buildInputs = [
libvirt-glib glib gtk3 gtkvnc libxml2 libvirt-glib glib gtk3 gtkvnc libxml2
libvirt spice-gtk spice-protocol libsoup json-glib webkitgtk libosinfo systemd 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 ]; nativeBuildInputs = [ meson ninja vala pkgconfig python3 libxslt libxml2 docbook_xsl ];
buildInputs = [ glib dbus-glib ]; buildInputs = [ glib dbus-glib ];
doCheck = false; # fails 2 out of 9 tests, maybe needs dbus daemon?
passthru = { passthru = {
updateScript = gnome3.updateScript { updateScript = gnome3.updateScript {
packageName = pname; packageName = pname;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,30 +2,24 @@
, langC ? true, langCC ? true, langFortran ? false , langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin , langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin , langObjCpp ? targetPlatform.isDarwin
, langJava ? false
, langGo ? false , langGo ? false
, profiledCompiler ? false , profiledCompiler ? false
, staticCompiler ? false , staticCompiler ? false
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man)
, gmp, mpfr, libmpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, isl ? null # optional, for the Graphite optimization framework. , isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null , zlib ? 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
, enableMultilib ? false , enableMultilib ? false
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, libcCross ? null , libcCross ? null
, crossStageStatic ? false , crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , 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 , gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places , cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null , darwin ? null
@ -33,10 +27,6 @@
, buildPackages , buildPackages
}: }:
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null
&& perl != null; # for `--enable-java-home'
# LTO needs libelf and zlib. # LTO needs libelf and zlib.
assert libelf != null -> zlib != null; assert libelf != null -> zlib != null;
@ -70,29 +60,6 @@ let version = "7.3.0";
}) })
++ optional langFortran ../gfortran-driving.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) */ /* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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) "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
])); ]));
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 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; bootstrap = targetPlatform == hostPlatform;
in in
# We need all these X libraries when building AWT with GTK+.
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon; name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
builder = ../builder.sh; builder = ../builder.sh;
@ -262,13 +226,12 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava inherit noSysDirs staticCompiler
libcCross crossMingw; libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ] nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl) ++ (optional (perl != null) perl);
++ (optional javaAwtGtk pkgconfig);
# For building runtime libs # For building runtime libs
depsBuildTarget = depsBuildTarget =
@ -283,8 +246,6 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl) ] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
@ -305,11 +266,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# 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";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies
@ -336,7 +293,6 @@ stdenv.mkDerivation ({
( optional langC "c" ( optional langC "c"
++ optional langCC "c++" ++ optional langCC "c++"
++ optional langFortran "fortran" ++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langGo "go" ++ optional langGo "go"
++ optional langObjC "objc" ++ optional langObjC "objc"
++ optional langObjCpp "obj-c++" ++ optional langObjCpp "obj-c++"
@ -357,18 +313,6 @@ stdenv.mkDerivation ({
# Optional features # Optional features
optional (isl != null) "--with-isl=${isl}" ++ 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; }) ++ (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++
optional (!bootstrap) "--disable-bootstrap" ++ optional (!bootstrap) "--disable-bootstrap" ++
@ -386,31 +330,25 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = buildFlags = optional
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); (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 = installTargets =
if stripped if stripped
then "install-strip" then "install-strip"
else "install"; else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; ${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 # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
# library headers and binaries, regarless of the language being compiled. # 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. # Likewise, the LTO code doesn't find zlib.
# #
# Cross-compiling, we need gcc not to read ./specs in order to build the g++ # 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" ([] CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib ++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread ++ optional (libpthread != null) libpthread
++ optional (libpthreadCross != null) libpthreadCross ++ optional (libpthreadCross != null) libpthreadCross
@ -433,9 +368,6 @@ stdenv.mkDerivation ({
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
++ optional (zlib != null) zlib ++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread) ++ optional (libpthread != null) libpthread)
); );
@ -476,8 +408,8 @@ stdenv.mkDerivation ({
longDescription = '' longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++, The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
as libraries for these languages (libstdc++, libgcj, libgomp,...). libraries for these languages (libstdc++, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant. compiler used in the GNU system including the GNU/Linux variant.
@ -497,8 +429,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc"; 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 (enableMultilib) { dontMoveLib64 = true; }
) )

View File

@ -18,7 +18,8 @@
, libcCross ? null , libcCross ? null
, crossStageStatic ? false , crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , 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 , gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places , cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null , darwin ? null
@ -260,11 +261,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# 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";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies
@ -327,20 +324,17 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = buildFlags = optional
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); (bootstrap && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
installTargets = installTargets =
if stripped if stripped
then "install-strip" then "install-strip"
else "install"; else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@ -427,8 +421,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc"; 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 (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)" # See pkgs/build-support/setup-hooks/role.bash
export NIX_CXXSTDLIB_LINK=" -stdlib=libstdc++" 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 , langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin , langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin , langObjCpp ? targetPlatform.isDarwin
, langJava ? false
, langGo ? false , langGo ? false
, profiledCompiler ? false , profiledCompiler ? false
, staticCompiler ? false , staticCompiler ? false
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man)
, gmp, mpfr, libmpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, isl ? null # optional, for the Graphite optimization framework. , isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null , zlib ? 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
, enableMultilib ? false , enableMultilib ? false
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, libcCross ? null , libcCross ? null
, crossStageStatic ? false , crossStageStatic ? false
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , 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 , gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places , cloog # unused; just for compat with gcc4, as we override the parameter on some places
, darwin ? null , darwin ? null
@ -34,10 +28,6 @@
, buildPackages , buildPackages
}: }:
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null
&& perl != null; # for `--enable-java-home'
# LTO needs libelf and zlib. # LTO needs libelf and zlib.
assert libelf != null -> zlib != null; assert libelf != null -> zlib != null;
@ -63,29 +53,6 @@ let version = "7-20170409";
++ optional noSysDirs ../no-sys-dirs.patch ++ optional noSysDirs ../no-sys-dirs.patch
++ optional langFortran ../gfortran-driving.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) */ /* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
@ -150,9 +117,6 @@ let version = "7-20170409";
in in
# We need all these X libraries when building AWT with GTK+.
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon; 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, # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava inherit noSysDirs staticCompiler
libcCross crossMingw; libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ] nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl) ++ (optional (perl != null) perl);
++ (optional javaAwtGtk pkgconfig);
# For building runtime libs # For building runtime libs
depsBuildTarget = depsBuildTarget =
@ -246,8 +209,6 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl) ] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
@ -268,11 +229,7 @@ stdenv.mkDerivation ({
dontDisableStatic = true; dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix. # TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# 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";
configureFlags = configureFlags =
# Basic dependencies # Basic dependencies
@ -299,7 +256,6 @@ stdenv.mkDerivation ({
( optional langC "c" ( optional langC "c"
++ optional langCC "c++" ++ optional langCC "c++"
++ optional langFortran "fortran" ++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langGo "go" ++ optional langGo "go"
++ optional langObjC "objc" ++ optional langObjC "objc"
++ optional langObjCpp "obj-c++" ++ optional langObjCpp "obj-c++"
@ -320,17 +276,6 @@ stdenv.mkDerivation ({
# Optional features # Optional features
optional (isl != null) "--with-isl=${isl}" ++ 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; }) ++ (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++
@ -351,28 +296,20 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap") (if profiledCompiler then "profiledbootstrap" else "bootstrap")
else ""; else "";
dontStrip = !stripped;
NIX_STRIP_DEBUG = !stripped;
installTargets = installTargets =
if stripped if stripped
then "install-strip" then "install-strip"
else "install"; else "install";
/* For cross-built gcc (build != host == target) */
crossAttrs = {
dontStrip = true;
buildFlags = "";
};
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; ${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 # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
# library headers and binaries, regarless of the language being compiled. # 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. # Likewise, the LTO code doesn't find zlib.
# #
# Cross-compiling, we need gcc not to read ./specs in order to build the g++ # 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" ([] CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib ++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread ++ optional (libpthread != null) libpthread
++ optional (libpthreadCross != null) libpthreadCross ++ optional (libpthreadCross != null) libpthreadCross
@ -395,9 +329,6 @@ stdenv.mkDerivation ({
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
++ optional (zlib != null) zlib ++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread) ++ optional (libpthread != null) libpthread)
); );
@ -438,8 +369,8 @@ stdenv.mkDerivation ({
longDescription = '' longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++, The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
as libraries for these languages (libstdc++, libgcj, libgomp,...). libraries for these languages (libstdc++, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant. compiler used in the GNU system including the GNU/Linux variant.
@ -461,8 +392,5 @@ stdenv.mkDerivation ({
installTargets = "install-gcc install-target-libgcc"; 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; } // optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
) )

View File

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

View File

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

View File

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

View File

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

View File

@ -25,13 +25,13 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "go-${version}"; name = "go-${version}";
version = "1.10.1"; version = "1.10.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "golang"; owner = "golang";
repo = "go"; repo = "go";
rev = "go${version}"; rev = "go${version}";
sha256 = "1wqwy52ibb343a4v7b9q26xa6r5jk4khfxd90wbpcayws8cxly8m"; sha256 = "1lbxnlj5l9i8k1dg33dh8ndx9vspk9dkpcbg06jbbswy6kadmx6f";
}; };
# perl is used for testing go vet # 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 LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib 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 ${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 let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
in stdenv.mkDerivation { in stdenv.mkDerivation {
@ -12,7 +12,7 @@ in stdenv.mkDerivation {
mv clang-tools-extra-* $sourceRoot/tools/extra mv clang-tools-extra-* $sourceRoot/tools/extra
''; '';
buildInputs = [ cmake libedit libxml2 llvm ]; buildInputs = [ cmake libxml2 llvm ];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-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 LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib 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 ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp ln -sv $out/bin/clang $out/bin/cpp
''; '';

View File

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

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@" linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 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 let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; 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 mv clang-tools-extra-* $sourceRoot/tools/extra
''; '';
buildInputs = [ cmake libedit libxml2 llvm ]; buildInputs = [ cmake libxml2 llvm ];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"
@ -32,7 +32,10 @@ let
# Clang expects to find LLVMgold in its own prefix # Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib 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 ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp ln -sv $out/bin/clang $out/bin/cpp
''; '';

View File

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

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@" linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 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 let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; 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 mv clang-tools-extra-* $sourceRoot/tools/extra
''; '';
buildInputs = [ cmake libedit libxml2 llvm python ]; buildInputs = [ cmake libxml2 llvm python ];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"
@ -34,7 +34,10 @@ let
# Clang expects to find LLVMgold in its own prefix # Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib 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 ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp ln -sv $out/bin/clang $out/bin/cpp

View File

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

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@" linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 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 let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
@ -15,7 +15,7 @@ let
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ libedit libxml2 llvm python ]; buildInputs = [ libxml2 llvm python ];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"
@ -36,7 +36,10 @@ let
# Clang expects to find LLVMgold in its own prefix # Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib 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 ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp ln -sv $out/bin/clang $out/bin/cpp

View File

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

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@" linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 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 , fixDarwinDylibNames
, enableManpages ? false , enableManpages ? false
}: }:
@ -19,7 +19,7 @@ let
nativeBuildInputs = [ cmake python ] nativeBuildInputs = [ cmake python ]
++ stdenv.lib.optional enableManpages python.pkgs.sphinx; ++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
buildInputs = [ libedit libxml2 llvm ] buildInputs = [ libxml2 llvm ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
@ -52,7 +52,10 @@ let
# Clang expects to find LLVMgold in its own prefix # Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib 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 ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp ln -sv $out/bin/clang $out/bin/cpp

View File

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

View File

@ -1,3 +1,6 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@" linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 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 , fixDarwinDylibNames
, enableManpages ? false , enableManpages ? false
}: }:
@ -9,7 +9,7 @@ let
name = "clang-${version}"; name = "clang-${version}";
unpackPhase = '' unpackPhase = ''
unpackFile ${fetch "cfe" "1zyh4dggxd55lnfg73c8fybnkssqcaa6bq2h4bzimnnj1jdnqpqk"} unpackFile ${fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s"}
mv cfe-${version}* clang mv cfe-${version}* clang
sourceRoot=$PWD/clang sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src} unpackFile ${clang-tools-extra_src}
@ -19,7 +19,7 @@ let
nativeBuildInputs = [ cmake python ] nativeBuildInputs = [ cmake python ]
++ stdenv.lib.optional enableManpages python.pkgs.sphinx; ++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
buildInputs = [ libedit libxml2 llvm ] buildInputs = [ libxml2 llvm ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [ cmakeFlags = [
@ -50,10 +50,12 @@ let
outputs = [ "out" "lib" "python" ]; outputs = [ "out" "lib" "python" ];
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = '' postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib # 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 ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp ln -sv $out/bin/clang $out/bin/cpp

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