mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
Merge remote-tracking branch 'upstream/staging' into compiler-rt
This commit is contained in:
commit
205fc55ea2
@ -109,8 +109,8 @@ buildPerlPackage rec {
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
echo "LIB = ${db}/lib" > config.in
|
||||
echo "INCLUDE = ${db}/include" >> config.in
|
||||
echo "LIB = ${db.out}/lib" > config.in
|
||||
echo "INCLUDE = ${db.dev}/include" >> config.in
|
||||
'';
|
||||
}
|
||||
</programlisting>
|
||||
|
@ -1163,6 +1163,14 @@ passthru = {
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>checkInputs</varname>
|
||||
</term>
|
||||
<listitem><para>
|
||||
A list of dependencies used by the phase. This gets included in
|
||||
<varname>buildInputs</varname> when <varname>doCheck</varname> is set.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>makeFlags</varname>
|
||||
</term>
|
||||
@ -1646,6 +1654,15 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>installCheckInputs</varname>
|
||||
</term>
|
||||
<listitem><para>
|
||||
A list of dependencies used by the phase. This gets included in
|
||||
<varname>buildInputs</varname> when <varname>doInstallCheck</varname>
|
||||
is set.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>preInstallCheck</varname>
|
||||
</term>
|
||||
|
@ -19,7 +19,11 @@ in rec {
|
||||
darwin = [ patterns.isDarwin ];
|
||||
freebsd = [ patterns.isFreeBSD ];
|
||||
# Should be better, but MinGW is unclear, and HURD is bit-rotted.
|
||||
gnu = [ { kernel = parse.kernels.linux; abi = parse.abis.gnu; } ];
|
||||
gnu = [
|
||||
{ kernel = parse.kernels.linux; abi = parse.abis.gnu; }
|
||||
{ kernel = parse.kernels.linux; abi = parse.abis.gnueabi; }
|
||||
{ kernel = parse.kernels.linux; abi = parse.abis.gnueabihf; }
|
||||
];
|
||||
illumos = [ patterns.isSunOS ];
|
||||
linux = [ patterns.isLinux ];
|
||||
netbsd = [ patterns.isNetBSD ];
|
||||
|
@ -33,7 +33,7 @@ let
|
||||
sh = pkgs.runtimeShell;
|
||||
binshDeps = pkgs.writeReferencesToFile sh;
|
||||
in
|
||||
pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } ''
|
||||
pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } (''
|
||||
${optionalString (!isNix20) ''
|
||||
extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
|
||||
''}
|
||||
@ -62,7 +62,11 @@ let
|
||||
''}
|
||||
$extraOptions
|
||||
END
|
||||
'';
|
||||
'' + optionalString cfg.checkConfig ''
|
||||
echo "Checking that Nix can read nix.conf..."
|
||||
ln -s $out ./nix.conf
|
||||
NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null
|
||||
'');
|
||||
|
||||
in
|
||||
|
||||
@ -351,6 +355,13 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
checkConfig = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
If enabled (the default), checks that Nix can parse the generated nix.conf.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -288,6 +288,7 @@ in rec {
|
||||
tests.flatpak = callTest tests/flatpak.nix {};
|
||||
tests.firewall = callTest tests/firewall.nix {};
|
||||
tests.fwupd = callTest tests/fwupd.nix {};
|
||||
tests.gdk-pixbuf = callTest tests/gdk-pixbuf.nix {};
|
||||
#tests.gitlab = callTest tests/gitlab.nix {};
|
||||
tests.gitolite = callTest tests/gitolite.nix {};
|
||||
tests.gjs = callTest tests/gjs.nix {};
|
||||
|
19
nixos/tests/gdk-pixbuf.nix
Normal file
19
nixos/tests/gdk-pixbuf.nix
Normal 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");
|
||||
'';
|
||||
})
|
@ -25,6 +25,10 @@ stdenv.mkDerivation rec{
|
||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||
];
|
||||
|
||||
# Fails with "This application failed to start because it could not
|
||||
# find or load the Qt platform plugin "minimal""
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Peer-to-peer electronic cash system";
|
||||
longDescription= ''
|
||||
|
@ -22,6 +22,8 @@ in stdenv.mkDerivation rec {
|
||||
gsettings-desktop-schemas gnome3.defaultIconTheme
|
||||
];
|
||||
|
||||
doCheck = false; # fails 1 out of 9 tests
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome3.updateScript {
|
||||
packageName = pname;
|
||||
|
@ -78,6 +78,8 @@ stdenv.mkDerivation rec {
|
||||
[ libX11 libXext libXt libwebp ]
|
||||
;
|
||||
|
||||
doCheck = false; # fails 6 out of 76 tests
|
||||
|
||||
postInstall = ''
|
||||
(cd "$dev/include" && ln -s ImageMagick* ImageMagick)
|
||||
moveToOutput "bin/*-config" "$dev"
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "soxr-0.1.2";
|
||||
name = "soxr-0.1.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/soxr/${name}-Source.tar.xz";
|
||||
sha256 = "0xf2w3piwz9gfr1xqyrj4k685q5dy53kq3igv663i4f4y4sg9rjl";
|
||||
sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di";
|
||||
};
|
||||
|
||||
outputs = [ "out" "doc" ]; # headers are just two and very small
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,9 @@
|
||||
# WARNING: NEVER set any of the options below to `true` by default.
|
||||
# Set to `privacySupport` or `false`.
|
||||
|
||||
, webrtcSupport ? !privacySupport
|
||||
# webrtcSupport breaks the aarch64 build on version >= 60.
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1434589
|
||||
, webrtcSupport ? (if lib.versionAtLeast version "60" && stdenv.isAarch64 then false else !privacySupport)
|
||||
, geolocationSupport ? !privacySupport
|
||||
, googleAPISupport ? geolocationSupport
|
||||
, crashreporterSupport ? false
|
||||
@ -213,6 +215,7 @@ stdenv.mkDerivation (rec {
|
||||
++ extraMakeFlags;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doCheck = false; # "--disable-tests" above
|
||||
|
||||
preInstall = ''
|
||||
# The following is needed for startup cache creation on grsecurity kernels.
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -ru -x '*~' firefox-55.0.3-orig/docshell/base/nsAboutRedirector.cpp firefox-55.0.3/docshell/base/nsAboutRedirector.cpp
|
||||
--- firefox-55.0.3-orig/docshell/base/nsAboutRedirector.cpp 2017-07-31 18:20:51.000000000 +0200
|
||||
+++ firefox-55.0.3/docshell/base/nsAboutRedirector.cpp 2017-09-26 22:02:00.814151731 +0200
|
||||
@@ -40,10 +40,6 @@
|
||||
@@ -36,10 +36,6 @@
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
{
|
||||
@ -20,6 +20,6 @@ diff -ru -x '*~' firefox-55.0.3-orig/toolkit/content/jar.mn firefox-55.0.3/toolk
|
||||
content/global/browser-child.js
|
||||
content/global/browser-content.js
|
||||
-* content/global/buildconfig.html
|
||||
content/global/buildconfig.css
|
||||
content/global/contentAreaUtils.js
|
||||
#ifndef MOZ_FENNEC
|
||||
content/global/customizeToolbar.css
|
||||
content/global/datepicker.xhtml
|
||||
|
@ -12,21 +12,27 @@ let
|
||||
./fix-pa-context-connect-retval.patch
|
||||
];
|
||||
|
||||
firefox60_aarch64_skia_patch = fetchpatch {
|
||||
name = "aarch64-skia.patch";
|
||||
url = https://src.fedoraproject.org/rpms/firefox/raw/8cff86d95da3190272d1beddd45b41de3148f8ef/f/build-aarch64-skia.patch;
|
||||
sha256 = "11acb0ms4jrswp7268nm2p8g8l4lv8zc666a5bqjbb09x9k6b78k";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
|
||||
firefox = common rec {
|
||||
pname = "firefox";
|
||||
version = "59.0.2";
|
||||
version = "60.0.1";
|
||||
src = fetchurl {
|
||||
url = "https://hg.mozilla.org/releases/mozilla-release/archive/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2";
|
||||
sha512 = "3kfh224sfc9ig4733frnskcs49xzjkrs00lxllsvx1imm6f4sf117mqlvc7bhgrn8ldiqn6vaa5g6gd9b7awkk1g975bbzk9namb3yv";
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "083bhfh32dy1cz4c4wn92i2lnl9mqikkd9dlkwd5i6clyjb9pc6d5g87kvb8si0n6jll4alyhw792j56a7gmzny3d93068hr4zyh3qn";
|
||||
};
|
||||
|
||||
patches = nixpkgsPatches ++ [
|
||||
./no-buildconfig.patch
|
||||
];
|
||||
] ++ lib.optional stdenv.isAarch64 firefox60_aarch64_skia_patch;
|
||||
|
||||
meta = {
|
||||
description = "A web browser built from Firefox source tree";
|
||||
@ -39,12 +45,12 @@ rec {
|
||||
};
|
||||
} {};
|
||||
|
||||
firefox-esr = common rec {
|
||||
firefox-esr-52 = common rec {
|
||||
pname = "firefox-esr";
|
||||
version = "52.7.3esr";
|
||||
version = "52.8.0esr";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "31y3qrslg61724vmly6gr1lqcrqgpkh3zsl8riax45gizfcp3qbgkvmd5wwfn9fiwjqi6ww3i08j51wxrfxcxznv7c6qzsvzzc30mgw";
|
||||
sha512 = "4136fa582e4ffd754d46a79bdb562bd12da4d013d87dfe40fa92addf377e95f5f642993c8b783edd5290089619beeb5a907a0810b68b8808884f087986977df1";
|
||||
};
|
||||
|
||||
patches = nixpkgsPatches;
|
||||
@ -53,7 +59,28 @@ rec {
|
||||
description = "A web browser built from Firefox Extended Support Release source tree";
|
||||
};
|
||||
updateScript = callPackage ./update.nix {
|
||||
attrPath = "firefox-esr-unwrapped";
|
||||
attrPath = "firefox-esr-52-unwrapped";
|
||||
versionSuffix = "esr";
|
||||
};
|
||||
} {};
|
||||
|
||||
firefox-esr-60 = common rec {
|
||||
pname = "firefox-esr";
|
||||
version = "60.0.1esr";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "2kswaf2d8qbhx1ry4ai7y2hr8cprpm00wwdr9qwpdr31m7w0jzndh0fn7jn1f57s42j6jk0jg78d34x10p2rvdii8hrbbr9q9sw8v4b";
|
||||
};
|
||||
|
||||
patches = nixpkgsPatches ++ [
|
||||
./no-buildconfig.patch
|
||||
] ++ lib.optional stdenv.isAarch64 firefox60_aarch64_skia_patch;
|
||||
|
||||
meta = firefox.meta // {
|
||||
description = "A web browser built from Firefox Extended Support Release source tree";
|
||||
};
|
||||
updateScript = callPackage ./update.nix {
|
||||
attrPath = "firefox-esr-60-unwrapped";
|
||||
versionSuffix = "esr";
|
||||
};
|
||||
} {};
|
||||
|
@ -28,9 +28,5 @@ writeScript "update-${attrPath}" ''
|
||||
sort --version-sort | \
|
||||
tail -n 1`
|
||||
|
||||
source_url=`curl --silent $url$version/SOURCE | grep -o 'https://.*\.tar\.bz2'`
|
||||
|
||||
shasum=`curl --silent $url$version/SHA512SUMS | grep 'source\.tar\.xz' | cut -d ' ' -f 1`
|
||||
|
||||
update-source-version ${attrPath} "$version" "$shasum" "$source_url"
|
||||
update-source-version ${attrPath} "$version"
|
||||
''
|
||||
|
@ -7,7 +7,6 @@
|
||||
, trezor-bridge, bluejeans, djview4, adobe-reader
|
||||
, google_talk_plugin, fribid, gnome3/*.gnome-shell*/
|
||||
, esteidfirefoxplugin
|
||||
, vlc_npapi
|
||||
, browserpass, chrome-gnome-shell, uget-integrator
|
||||
, libudev
|
||||
, kerberos
|
||||
@ -57,7 +56,6 @@ let
|
||||
++ lib.optional (cfg.enableBluejeans or false) bluejeans
|
||||
++ lib.optional (cfg.enableAdobeReader or false) adobe-reader
|
||||
++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin
|
||||
++ lib.optional (cfg.enableVLC or false) vlc_npapi
|
||||
++ extraPlugins
|
||||
);
|
||||
nativeMessagingHosts =
|
||||
|
@ -21,13 +21,16 @@ stdenv.mkDerivation rec {
|
||||
pkgconfig intltool autoconf-archive
|
||||
appstream-glib
|
||||
];
|
||||
|
||||
buildInputs = [ gtk3 json-glib curl glib hicolor-icon-theme ];
|
||||
|
||||
meta = with stdenv.lib;
|
||||
{ description = "GTK remote control for the Transmission BitTorrent client";
|
||||
homepage = https://github.com/ajf8/transmission-remote-gtk;
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
doCheck = false; # fails with style validation error
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GTK remote control for the Transmission BitTorrent client";
|
||||
homepage = https://github.com/ajf8/transmission-remote-gtk;
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
, alsaLib
|
||||
, libidn
|
||||
, zlib
|
||||
, version ? null
|
||||
, version ? "13.9.0"
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -30,6 +30,8 @@ stdenv.mkDerivation {
|
||||
|
||||
buildInputs = [ nano ];
|
||||
|
||||
doCheck = false; # fails 1 of 1 tests
|
||||
|
||||
meta = {
|
||||
homepage = http://cvs.nongnu.org;
|
||||
description = "Concurrent Versions System - a source control system";
|
||||
|
@ -18,7 +18,7 @@ assert sendEmailSupport -> perlSupport;
|
||||
assert svnSupport -> perlSupport;
|
||||
|
||||
let
|
||||
version = "2.16.3";
|
||||
version = "2.17.0";
|
||||
svn = subversionClient.override { perlBindings = perlSupport; };
|
||||
in
|
||||
|
||||
@ -27,19 +27,24 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
|
||||
sha256 = "0j1dwvg5llnj3g0fp8hdgpms4hp90qw9f6509vqw30dhwplrjpfn";
|
||||
sha256 = "1ismz7nsz8dgjmk782xr9s0mr2qh06f72pdcgbxfmnw1bvlya5p9";
|
||||
};
|
||||
|
||||
outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
## Patch
|
||||
|
||||
patches = [
|
||||
./docbook2texi.patch
|
||||
./symlinks-in-bin.patch
|
||||
./git-sh-i18n.patch
|
||||
./ssh-path.patch
|
||||
./git-send-email-honor-PATH.patch
|
||||
./installCheck-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -47,6 +52,10 @@ stdenv.mkDerivation {
|
||||
substituteInPlace "$x" \
|
||||
--subst-var-by ssh "${openssh}/bin/ssh"
|
||||
done
|
||||
|
||||
# Fix references to gettext introduced by ./git-sh-i18n.patch
|
||||
substituteInPlace git-sh-i18n.sh \
|
||||
--subst-var-by gettext ${gettext}
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ gettext perl ]
|
||||
@ -58,7 +67,6 @@ stdenv.mkDerivation {
|
||||
++ stdenv.lib.optionals withpcre2 [ pcre2 ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ];
|
||||
|
||||
|
||||
# required to support pthread_cancel()
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s"
|
||||
+ stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr";
|
||||
@ -68,6 +76,10 @@ stdenv.mkDerivation {
|
||||
"ac_cv_snprintf_returns_bogus=no"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=( perllibdir=$out/$(perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}') )
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"prefix=\${out}"
|
||||
"SHELL_PATH=${stdenv.shell}"
|
||||
@ -86,15 +98,17 @@ stdenv.mkDerivation {
|
||||
popd
|
||||
'';
|
||||
|
||||
# FIXME: "make check" requires Sparse; the Makefile must be tweaked
|
||||
# so that `SPARSE_FLAGS' corresponds to the current architecture...
|
||||
#doCheck = true;
|
||||
|
||||
## Install
|
||||
|
||||
# WARNING: Do not `rm` or `mv` files from the source tree; use `cp` instead.
|
||||
# We need many of these files during the installCheckPhase.
|
||||
|
||||
installFlags = "NO_INSTALL_HARDLINKS=1";
|
||||
|
||||
preInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p $out/bin
|
||||
mv $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin
|
||||
cp -a $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
@ -112,7 +126,7 @@ stdenv.mkDerivation {
|
||||
|
||||
# Install contrib stuff.
|
||||
mkdir -p $out/share/git
|
||||
mv contrib $out/share/git/
|
||||
cp -a contrib $out/share/git/
|
||||
ln -s "$out/share/git/contrib/credential/netrc/git-credential-netrc" $out/bin/
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
ln -s "$out/share/git/contrib/emacs/"*.el $out/share/emacs/site-lisp/
|
||||
@ -145,9 +159,6 @@ stdenv.mkDerivation {
|
||||
perl -0777 -i -pe "$SCRIPT" \
|
||||
$out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,stash,submodule,subtree,web--browse}
|
||||
|
||||
# Fix references to gettext.
|
||||
substituteInPlace $out/libexec/git-core/git-sh-i18n \
|
||||
--subst-var-by gettext ${gettext}
|
||||
|
||||
# Also put git-http-backend into $PATH, so that we can use smart
|
||||
# HTTP(s) transports for pushing
|
||||
@ -225,7 +236,52 @@ EOF
|
||||
'';
|
||||
|
||||
|
||||
enableParallelBuilding = true;
|
||||
## InstallCheck
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckTarget = "test";
|
||||
|
||||
# see also installCheckFlagsArray
|
||||
installCheckFlags = "DEFAULT_TEST_TARGET=prove";
|
||||
|
||||
preInstallCheck = ''
|
||||
installCheckFlagsArray+=(
|
||||
GIT_PROVE_OPTS="--jobs $NIX_BUILD_CORES --failures --state=failed,save"
|
||||
GIT_TEST_INSTALLED=$out/bin
|
||||
${stdenv.lib.optionalString (!svnSupport) "NO_SVN_TESTS=y"}
|
||||
)
|
||||
|
||||
function disable_test {
|
||||
local test=$1 pattern=$2
|
||||
if [ $# -eq 1 ]; then
|
||||
mv t/{,skip-}$test.sh || true
|
||||
else
|
||||
sed -i t/$test.sh \
|
||||
-e "/^ *test_expect_.*$pattern/,/^ *' *\$/{s/^/#/}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Shared permissions are forbidden in sandbox builds.
|
||||
disable_test t0001-init shared
|
||||
disable_test t1301-shared-repo
|
||||
|
||||
# Our patched gettext never fallbacks
|
||||
disable_test t0201-gettext-fallbacks
|
||||
|
||||
${stdenv.lib.optionalString (!sendEmailSupport) ''
|
||||
# Disable sendmail tests
|
||||
disable_test t9001-send-email
|
||||
''}
|
||||
|
||||
# XXX: I failed to understand why this one fails.
|
||||
# Could someone try to re-enable it on the next release ?
|
||||
disable_test t1700-split-index "null sha1"
|
||||
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
# Test fails (as of 2.17.0, musl 1.1.19)
|
||||
disable_test t3900-i18n-commit
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
homepage = https://git-scm.com/;
|
||||
|
@ -2,19 +2,19 @@ This patch does two things: (1) use the right name for `docbook2texi',
|
||||
and (2) make sure `gitman.info' isn't produced since it's broken (duplicate
|
||||
node names).
|
||||
|
||||
diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile
|
||||
--- git-1.8.4-orig/Documentation/Makefile 2013-08-23 21:38:43.000000000 +0200
|
||||
+++ git-1.8.4/Documentation/Makefile 2013-09-30 14:48:51.532890378 +0200
|
||||
@@ -101,7 +101,7 @@
|
||||
diff --git a/Documentation/Makefile b/Documentation/Makefile
|
||||
--- a/Documentation/Makefile
|
||||
+++ b/Documentation/Makefile
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
INSTALL_INFO = install-info
|
||||
-DOCBOOK2X_TEXI = docbook2x-texi
|
||||
+DOCBOOK2X_TEXI = docbook2texi
|
||||
DBLATEX = dblatex
|
||||
ifndef PERL_PATH
|
||||
PERL_PATH = /usr/bin/perl
|
||||
@@ -205,7 +205,7 @@
|
||||
ASCIIDOC_DBLATEX_DIR = /etc/asciidoc/dblatex
|
||||
DBLATEX_COMMON = -p $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.sty
|
||||
@@ -240,7 +240,7 @@
|
||||
man5: $(DOC_MAN5)
|
||||
man7: $(DOC_MAN7)
|
||||
|
||||
@ -23,7 +23,7 @@ diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile
|
||||
|
||||
pdf: user-manual.pdf
|
||||
|
||||
@@ -221,10 +221,9 @@
|
||||
@@ -256,10 +256,9 @@
|
||||
|
||||
install-info: info
|
||||
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)
|
||||
|
@ -1,22 +1,20 @@
|
||||
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
|
||||
index 8060ea35c..c81067a19 100644
|
||||
--- a/Documentation/git-send-email.txt
|
||||
+++ b/Documentation/git-send-email.txt
|
||||
@@ -203,8 +203,7 @@ a password is obtained using 'git-credential'.
|
||||
@@ -208,8 +208,7 @@ a password is obtained using 'git-credential'.
|
||||
specify a full pathname of a sendmail-like program instead;
|
||||
the program must support the `-i` option. Default value can
|
||||
be specified by the `sendemail.smtpServer` configuration
|
||||
- option; the built-in default is to search for `sendmail` in
|
||||
- `/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.
|
||||
|
||||
--smtp-server-port=<port>::
|
||||
diff --git a/git-send-email.perl b/git-send-email.perl
|
||||
index edcc6d346..8e357aeab 100755
|
||||
--- a/git-send-email.perl
|
||||
+++ b/git-send-email.perl
|
||||
@@ -885,8 +885,7 @@ if (defined $initial_reply_to) {
|
||||
@@ -944,8 +944,7 @@ if (defined $reply_to) {
|
||||
}
|
||||
|
||||
if (!defined $smtp_server) {
|
||||
|
@ -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"
|
@ -1,7 +1,7 @@
|
||||
diff -ru -x '*~' git-1.8.2.1-orig/Makefile git-1.8.2.1/Makefile
|
||||
--- git-1.8.2.1-orig/Makefile 2013-04-08 00:52:04.000000000 +0200
|
||||
+++ git-1.8.2.1/Makefile 2013-04-22 15:46:42.906026940 +0200
|
||||
@@ -2319,8 +2319,7 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -2609,8 +2609,7 @@
|
||||
{ test "$$bindir/" = "$$execdir/" || \
|
||||
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
|
||||
$(RM) "$$execdir/$$p" && \
|
||||
|
@ -88,6 +88,8 @@ let
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # fails 10 out of ~2300 tests
|
||||
|
||||
meta = {
|
||||
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
|
||||
homepage = http://subversion.apache.org/;
|
||||
|
@ -12,9 +12,13 @@ let
|
||||
sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
|
||||
};
|
||||
|
||||
configurePlatforms = [];
|
||||
configureFlags = [
|
||||
"--arch=arm"
|
||||
"--arch=${hostPlatform.parsed.cpu.name}"
|
||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [
|
||||
# TODO be better with condition
|
||||
"--cpu=arm1176jzf-s"
|
||||
] ++ [
|
||||
"--disable-muxers"
|
||||
"--enable-muxer=spdif"
|
||||
"--enable-muxer=adts"
|
||||
@ -42,19 +46,14 @@ let
|
||||
"--enable-hardcoded-tables"
|
||||
"--disable-runtime-cpudetect"
|
||||
"--disable-debug"
|
||||
"--arch=${hostPlatform.parsed.cpu.name}"
|
||||
"--target_os=${hostPlatform.parsed.kernel.name}"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"--cross-prefix=${stdenv.cc.targetPrefix}"
|
||||
"--enable-cross-compile"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
crossAttrs = {
|
||||
configurePlatforms = [];
|
||||
configureFlags = configureFlags ++ [
|
||||
"--cross-prefix=${stdenv.cc.targetPrefix}"
|
||||
"--enable-cross-compile"
|
||||
"--target_os=linux"
|
||||
"--arch=${hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://www.ffmpeg.org/;
|
||||
@ -83,5 +82,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://github.com/huceke/omxplayer;
|
||||
description = "Commandline OMX player for the Raspberry Pi";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
platforms = stdenv.lib.platforms.arm;
|
||||
};
|
||||
}
|
||||
|
@ -1,86 +1,81 @@
|
||||
{ stdenv, fetchurl, xz, bzip2, perl, xorg, libdvdnav, libbluray
|
||||
{ stdenv, fetchurl, autoreconfHook
|
||||
, libarchive, perl, xorg, libdvdnav, libbluray
|
||||
, zlib, a52dec, libmad, faad2, ffmpeg, alsaLib
|
||||
, pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska
|
||||
, libvorbis, libtheora, speex, lua5, libgcrypt, libupnp
|
||||
, libvorbis, libtheora, speex, lua5, libgcrypt, libgpgerror, libupnp
|
||||
, libcaca, libpulseaudio, flac, schroedinger, libxml2, librsvg
|
||||
, mpeg2dec, udev, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
|
||||
, mpeg2dec, systemd, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
|
||||
, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
|
||||
, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
|
||||
, libvdpau, libsamplerate, live555, fluidsynth
|
||||
, qt4 ? null
|
||||
, withQt5 ? false, qtbase ? null, qtx11extras ? null
|
||||
, libass, libva-full, libdvbpsi, libdc1394, libraw1394, libopus
|
||||
, libvdpau, libsamplerate, live555, fluidsynth, wayland, wayland-protocols
|
||||
, onlyLibVLC ? false
|
||||
, withQt5 ? true, qtbase ? null, qtsvg ? null, qtx11extras ? null
|
||||
, jackSupport ? false
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert (withQt5 -> qtbase != null && qtx11extras != null);
|
||||
assert (!withQt5 -> qt4 != null);
|
||||
assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "vlc-${version}";
|
||||
version = "2.2.8";
|
||||
version = "3.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://get.videolan.org/vlc/${version}/${name}.tar.xz";
|
||||
sha256 = "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v";
|
||||
sha256 = "008krfhykm9447wc1kkw82bsw3f6ikljgrqyb1sinwlxnkghqw6f";
|
||||
};
|
||||
|
||||
# Comment-out the Qt 5.5 version check, as we do apply the relevant patch.
|
||||
# https://trac.videolan.org/vlc/ticket/16497
|
||||
postPatch = if (!withQt5) then null else
|
||||
"sed '/I78ef29975181ee22429c9bd4b11d96d9e68b7a9c/s/^/: #/' -i configure";
|
||||
|
||||
buildInputs =
|
||||
[ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread
|
||||
libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt
|
||||
libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
|
||||
udev gnutls avahi libcddb SDL SDL_image libmtp unzip taglib
|
||||
libkate libtiger libv4l samba liboggz libass libdvbpsi libva
|
||||
xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
|
||||
libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate live555
|
||||
fluidsynth
|
||||
]
|
||||
++ [(if withQt5 then qtbase else qt4)]
|
||||
++ optional withQt5 qtx11extras
|
||||
# VLC uses a *ton* of libraries for various pieces of functionality, many of
|
||||
# which are not included here for no other reason that nobody has mentioned
|
||||
# needing them
|
||||
buildInputs = [
|
||||
zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread
|
||||
libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt libgpgerror
|
||||
libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
|
||||
systemd gnutls avahi libcddb SDL SDL_image libmtp unzip taglib libarchive
|
||||
libkate libtiger libv4l samba liboggz libass libdvbpsi libva-full
|
||||
xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
|
||||
libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate live555
|
||||
fluidsynth wayland wayland-protocols
|
||||
] ++ optionals withQt5 [ qtbase qtsvg qtx11extras ]
|
||||
++ optional jackSupport libjack2;
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
LIVE555_PREFIX = live555;
|
||||
|
||||
preConfigure = ''
|
||||
sed -e "s@/bin/echo@echo@g" -i configure
|
||||
'' + optionalString withQt5 ''
|
||||
# Make sure we only *add* "-std=c++11" to CXXFLAGS instead of overriding the
|
||||
# values figured out by configure (for example "-g -O2").
|
||||
sed -i -re '/^ *CXXFLAGS=("[^$"]+")? *$/s/CXXFLAGS="?/&-std=c++11 /' \
|
||||
configure
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[ "--enable-alsa"
|
||||
"--with-kde-solid=$out/share/apps/solid/actions"
|
||||
"--enable-dc1394"
|
||||
"--enable-ncurses"
|
||||
"--enable-vdpau"
|
||||
"--enable-dvdnav"
|
||||
"--enable-samplerate"
|
||||
];
|
||||
nativeBuildInputs = [ autoreconfHook perl pkgconfig ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace modules/text_renderer/freetype.c --replace \
|
||||
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf \
|
||||
${freefont_ttf}/share/fonts/truetype/FreeSerifBold.ttf
|
||||
LIVE555_PREFIX = live555;
|
||||
|
||||
# vlc depends on a c11-gcc wrapper script which we don't have so we need to
|
||||
# set the path to the compiler
|
||||
BUILDCC = "${stdenv.cc}/bin/gcc";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace configure \
|
||||
--replace /bin/echo echo
|
||||
|
||||
substituteInPlace modules/text_renderer/freetype/platform_fonts.h --replace \
|
||||
/usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype
|
||||
'';
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/35124#issuecomment-370552830
|
||||
postFixup = ''
|
||||
find $out/lib/vlc/plugins -exec touch -d @1 '{}' ';'
|
||||
$out/lib/vlc/vlc-cache-gen $out/vlc/plugins
|
||||
'';
|
||||
|
||||
# Most of the libraries are auto-detected so we don't need to set a bunch of
|
||||
# "--enable-foo" flags here
|
||||
configureFlags = [
|
||||
"--with-kde-solid=$out/share/apps/solid/actions"
|
||||
] ++ optional onlyLibVLC "--disable-vlc";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Cross-platform media player and streaming server";
|
||||
homepage = http://www.videolan.org/vlc/;
|
||||
platforms = platforms.linux;
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
@ -119,6 +119,8 @@ stdenv.mkDerivation rec {
|
||||
++ optional openGLSupport "--enable-opengl"
|
||||
++ optional virglSupport "--enable-virglrenderer";
|
||||
|
||||
doCheck = false; # tries to access /dev
|
||||
|
||||
postFixup =
|
||||
''
|
||||
for exe in $out/bin/qemu-system-* ; do
|
||||
|
@ -5,28 +5,20 @@ var_templates_list=(
|
||||
NIX+LDFLAGS_BEFORE
|
||||
NIX+LDFLAGS_AFTER
|
||||
NIX+LDFLAGS_HARDEN
|
||||
NIX+HARDENING_ENABLE
|
||||
)
|
||||
var_templates_bool=(
|
||||
NIX+SET_BUILD_ID
|
||||
NIX+DONT_SET_RPATH
|
||||
)
|
||||
|
||||
declare -a role_infixes=()
|
||||
if [ "${NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]; then
|
||||
role_infixes+=(_BUILD_)
|
||||
fi
|
||||
if [ "${NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]; then
|
||||
role_infixes+=(_)
|
||||
fi
|
||||
if [ "${NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]; then
|
||||
role_infixes+=(_TARGET_)
|
||||
fi
|
||||
accumulateRoles
|
||||
|
||||
for var in "${var_templates_list[@]}"; do
|
||||
mangleVarList "$var" "${role_infixes[@]}"
|
||||
mangleVarList "$var" ${role_infixes[@]+"${role_infixes[@]}"}
|
||||
done
|
||||
for var in "${var_templates_bool[@]}"; do
|
||||
mangleVarBool "$var" "${role_infixes[@]}"
|
||||
mangleVarBool "$var" ${role_infixes[@]+"${role_infixes[@]}"}
|
||||
done
|
||||
|
||||
if [ -e @out@/nix-support/libc-ldflags ]; then
|
||||
|
@ -1,53 +1,58 @@
|
||||
hardeningFlags=(relro bindnow)
|
||||
# Intentionally word-split in case 'hardeningEnable' is defined in
|
||||
# Nix. Also, our bootstrap tools version of bash is old enough that
|
||||
# undefined arrays trip `set -u`.
|
||||
if [[ -v hardeningEnable[@] ]]; then
|
||||
hardeningFlags+=(${hardeningEnable[@]})
|
||||
fi
|
||||
hardeningLDFlags=()
|
||||
declare -a hardeningLDFlags=()
|
||||
|
||||
declare -A hardeningDisableMap
|
||||
declare -A hardeningEnableMap=()
|
||||
|
||||
# Intentionally word-split in case 'hardeningDisable' is defined in Nix.
|
||||
for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@
|
||||
do
|
||||
hardeningDisableMap[$flag]=1
|
||||
# Intentionally word-split in case 'NIX_HARDENING_ENABLE' is defined in Nix. The
|
||||
# array expansion also prevents undefined variables from causing trouble with
|
||||
# `set -u`.
|
||||
for flag in ${NIX_@infixSalt@_HARDENING_ENABLE-}; do
|
||||
hardeningEnableMap["$flag"]=1
|
||||
done
|
||||
|
||||
# Remove unsupported flags.
|
||||
for flag in @hardening_unsupported_flags@; do
|
||||
unset -v "hardeningEnableMap[$flag]"
|
||||
done
|
||||
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
declare -a allHardeningFlags=(pie relro bindnow)
|
||||
declare -A hardeningDisableMap=()
|
||||
|
||||
# Determine which flags were effectively disabled so we can report below.
|
||||
for flag in "${allHardeningFlags[@]}"; do
|
||||
if [[ -z "${hardeningEnableMap[$flag]-}" ]]; then
|
||||
hardeningDisableMap[$flag]=1
|
||||
fi
|
||||
done
|
||||
|
||||
printf 'HARDENING: disabled flags:' >&2
|
||||
(( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2
|
||||
echo >&2
|
||||
fi
|
||||
|
||||
if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
if (( "${#hardeningEnableMap[@]}" )); then
|
||||
echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2;
|
||||
fi
|
||||
for flag in "${hardeningFlags[@]}"
|
||||
do
|
||||
if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then
|
||||
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
|
||||
|
||||
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
|
||||
|
@ -74,7 +74,7 @@ in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = targetPrefix
|
||||
+ (if name != "" then name else "${bintoolsName}-wrapper")
|
||||
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${bintoolsName}-wrapper")
|
||||
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
|
||||
|
||||
preferLocalBuild = true;
|
||||
@ -188,9 +188,15 @@ stdenv.mkDerivation {
|
||||
else throw "unknown emulation for platform: " + targetPlatform.config;
|
||||
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
|
||||
|
||||
strictDeps = true;
|
||||
depsTargetTargetPropagated = extraPackages;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
wrapperName = "BINTOOLS_WRAPPER";
|
||||
|
||||
setupHooks = [
|
||||
../setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
postFixup =
|
||||
''
|
||||
@ -289,7 +295,7 @@ stdenv.mkDerivation {
|
||||
set +u
|
||||
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
|
||||
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
|
||||
substituteAll ${../cc-wrapper/utils.sh} $out/nix-support/utils.sh
|
||||
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
|
||||
|
||||
##
|
||||
## Extra custom steps
|
||||
@ -300,7 +306,7 @@ stdenv.mkDerivation {
|
||||
|
||||
inherit dynamicLinker expand-response-params;
|
||||
|
||||
# for substitution in utils.sh
|
||||
# for substitution in utils.bash
|
||||
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
|
||||
|
||||
meta =
|
||||
|
@ -14,7 +14,7 @@ if [ -n "@coreutils_bin@" ]; then
|
||||
PATH="@coreutils_bin@/bin"
|
||||
fi
|
||||
|
||||
source @out@/nix-support/utils.sh
|
||||
source @out@/nix-support/utils.bash
|
||||
|
||||
if [ -z "${NIX_BINTOOLS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then
|
||||
source @out@/nix-support/add-flags.sh
|
||||
@ -57,8 +57,8 @@ fi
|
||||
|
||||
source @out@/nix-support/add-hardening.sh
|
||||
|
||||
extraAfter=("${hardeningLDFlags[@]}")
|
||||
extraBefore=()
|
||||
extraAfter=()
|
||||
extraBefore=(${hardeningLDFlags[@]+"${hardeningLDFlags[@]}"})
|
||||
|
||||
if [ -z "${NIX_@infixSalt@_LDFLAGS_SET:-}" ]; then
|
||||
extraAfter+=($NIX_@infixSalt@_LDFLAGS)
|
||||
|
@ -8,47 +8,25 @@ set -u
|
||||
# native compile.
|
||||
#
|
||||
# TODO(@Ericson2314): No native exception
|
||||
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
|
||||
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
|
||||
|
||||
bintoolsWrapper_addLDVars () {
|
||||
case $depHostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "bintools-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See ../setup-hooks/role.bash
|
||||
local role_post role_pre
|
||||
getTargetRoleEnvHook
|
||||
|
||||
if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
|
||||
export NIX_${role}LDFLAGS+=" -L$1/lib64"
|
||||
export NIX_${role_pre}LDFLAGS+=" -L$1/lib64"
|
||||
fi
|
||||
|
||||
if [[ -d "$1/lib" ]]; then
|
||||
export NIX_${role}LDFLAGS+=" -L$1/lib"
|
||||
export NIX_${role_pre}LDFLAGS+=" -L$1/lib"
|
||||
fi
|
||||
}
|
||||
|
||||
case $targetOffset in
|
||||
-1)
|
||||
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_BUILD=1
|
||||
role_pre='BUILD_'
|
||||
role_post='_FOR_BUILD'
|
||||
;;
|
||||
0)
|
||||
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_HOST=1
|
||||
role_pre=''
|
||||
role_post=''
|
||||
;;
|
||||
1)
|
||||
export NIX_BINTOOLS_WRAPPER_@infixSalt@_TARGET_TARGET=1
|
||||
role_pre='TARGET_'
|
||||
role_post='_FOR_TARGET'
|
||||
;;
|
||||
*)
|
||||
echo "cc-wrapper: used as improper sort of dependency" >2;
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
# See ../setup-hooks/role.bash
|
||||
getTargetRole
|
||||
getTargetRoleWrapper
|
||||
|
||||
addEnvHooks "$targetOffset" bintoolsWrapper_addLDVars
|
||||
|
||||
@ -83,6 +61,10 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# If unset, assume the default hardening flags.
|
||||
: ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"}
|
||||
export NIX_HARDENING_ENABLE
|
||||
|
||||
# No local scope in sourced file
|
||||
unset -v role_pre role_post cmd upper_case
|
||||
set +u
|
||||
|
@ -14,26 +14,15 @@ var_templates_bool=(
|
||||
NIX+ENFORCE_NO_NATIVE
|
||||
)
|
||||
|
||||
# Accumulate infixes for taking in the right input parameters. See setup-hook
|
||||
# for details.
|
||||
declare -a role_infixes=()
|
||||
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]; then
|
||||
role_infixes+=(_BUILD_)
|
||||
fi
|
||||
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]; then
|
||||
role_infixes+=(_)
|
||||
fi
|
||||
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]; then
|
||||
role_infixes+=(_TARGET_)
|
||||
fi
|
||||
accumulateRoles
|
||||
|
||||
# We need to mangle names for hygiene, but also take parameters/overrides
|
||||
# from the environment.
|
||||
for var in "${var_templates_list[@]}"; do
|
||||
mangleVarList "$var" "${role_infixes[@]}"
|
||||
mangleVarList "$var" ${role_infixes[@]+"${role_infixes[@]}"}
|
||||
done
|
||||
for var in "${var_templates_bool[@]}"; do
|
||||
mangleVarBool "$var" "${role_infixes[@]}"
|
||||
mangleVarBool "$var" ${role_infixes[@]+"${role_infixes[@]}"}
|
||||
done
|
||||
|
||||
# `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld.
|
||||
|
@ -1,67 +1,72 @@
|
||||
hardeningFlags=(fortify stackprotector pic strictoverflow format relro bindnow)
|
||||
# Intentionally word-split in case 'hardeningEnable' is defined in
|
||||
# Nix. Also, our bootstrap tools version of bash is old enough that
|
||||
# undefined arrays trip `set -u`.
|
||||
if [[ -v hardeningEnable[@] ]]; then
|
||||
hardeningFlags+=(${hardeningEnable[@]})
|
||||
fi
|
||||
hardeningCFlags=()
|
||||
declare -a hardeningCFlags=()
|
||||
|
||||
declare -A hardeningDisableMap
|
||||
declare -A hardeningEnableMap=()
|
||||
|
||||
# Intentionally word-split in case 'hardeningDisable' is defined in Nix.
|
||||
for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@
|
||||
do
|
||||
hardeningDisableMap[$flag]=1
|
||||
# Intentionally word-split in case 'NIX_HARDENING_ENABLE' is defined in Nix. The
|
||||
# array expansion also prevents undefined variables from causing trouble with
|
||||
# `set -u`.
|
||||
for flag in ${NIX_@infixSalt@_HARDENING_ENABLE-}; do
|
||||
hardeningEnableMap["$flag"]=1
|
||||
done
|
||||
|
||||
# Remove unsupported flags.
|
||||
for flag in @hardening_unsupported_flags@; do
|
||||
unset -v "hardeningEnableMap[$flag]"
|
||||
done
|
||||
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
declare -a allHardeningFlags=(fortify stackprotector pie pic strictoverflow format)
|
||||
declare -A hardeningDisableMap=()
|
||||
|
||||
# Determine which flags were effectively disabled so we can report below.
|
||||
for flag in "${allHardeningFlags[@]}"; do
|
||||
if [[ -z "${hardeningEnableMap[$flag]-}" ]]; then
|
||||
hardeningDisableMap["$flag"]=1
|
||||
fi
|
||||
done
|
||||
|
||||
printf 'HARDENING: disabled flags:' >&2
|
||||
(( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2
|
||||
echo >&2
|
||||
fi
|
||||
|
||||
if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
if (( "${#hardeningEnableMap[@]}" )); then
|
||||
echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2;
|
||||
fi
|
||||
for flag in "${hardeningFlags[@]}"
|
||||
do
|
||||
if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then
|
||||
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
|
||||
|
||||
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
|
||||
|
@ -15,7 +15,7 @@ if [[ -n "@coreutils_bin@" && -n "@gnugrep_bin@" ]]; then
|
||||
PATH="@coreutils_bin@/bin:@gnugrep_bin@/bin"
|
||||
fi
|
||||
|
||||
source @out@/nix-support/utils.sh
|
||||
source @out@/nix-support/utils.bash
|
||||
|
||||
# Flirting with a layer violation here.
|
||||
if [ -z "${NIX_BINTOOLS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then
|
||||
@ -134,8 +134,8 @@ fi
|
||||
source @out@/nix-support/add-hardening.sh
|
||||
|
||||
# Add the flags for the C compiler proper.
|
||||
extraAfter=($NIX_@infixSalt@_CFLAGS_COMPILE "${hardeningCFlags[@]}")
|
||||
extraBefore=()
|
||||
extraAfter=($NIX_@infixSalt@_CFLAGS_COMPILE)
|
||||
extraBefore=(${hardeningCFlags[@]+"${hardeningCFlags[@]}"})
|
||||
|
||||
if [ "$dontLink" != 1 ]; then
|
||||
|
||||
|
@ -71,7 +71,7 @@ assert nativePrefix == bintools.nativePrefix;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = targetPrefix
|
||||
+ (if name != "" then name else "${ccName}-wrapper")
|
||||
+ (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${ccName}-wrapper")
|
||||
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
|
||||
|
||||
preferLocalBuild = true;
|
||||
@ -188,10 +188,16 @@ stdenv.mkDerivation {
|
||||
wrap ${targetPrefix}gccgo ${./cc-wrapper.sh} $ccPath/${targetPrefix}gccgo
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
propagatedBuildInputs = [ bintools ];
|
||||
depsTargetTargetPropagated = extraPackages;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
wrapperName = "CC_WRAPPER";
|
||||
|
||||
setupHooks = [
|
||||
../setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
postFixup =
|
||||
''
|
||||
@ -277,7 +283,7 @@ stdenv.mkDerivation {
|
||||
+ ''
|
||||
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
|
||||
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh
|
||||
substituteAll ${./utils.sh} $out/nix-support/utils.sh
|
||||
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
|
||||
|
||||
##
|
||||
## Extra custom steps
|
||||
@ -288,7 +294,7 @@ stdenv.mkDerivation {
|
||||
|
||||
inherit expand-response-params;
|
||||
|
||||
# for substitution in utils.sh
|
||||
# for substitution in utils.bash
|
||||
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
|
||||
|
||||
meta =
|
||||
|
@ -60,61 +60,28 @@ set -u
|
||||
# native compile.
|
||||
#
|
||||
# TODO(@Ericson2314): No native exception
|
||||
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
|
||||
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
|
||||
|
||||
# It's fine that any other cc-wrapper will redefine this. Bash functions close
|
||||
# over no state, and there's no @-substitutions within, so any redefined
|
||||
# function is guaranteed to be exactly the same.
|
||||
ccWrapper_addCVars () {
|
||||
# The `depHostOffset` describes how the host platform of the dependencies
|
||||
# are slid relative to the depending package. It is brought into scope of
|
||||
# the environment hook defined as the role of the dependency being applied.
|
||||
case $depHostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See ../setup-hooks/role.bash
|
||||
local role_post role_pre
|
||||
getTargetRoleEnvHook
|
||||
|
||||
if [[ -d "$1/include" ]]; then
|
||||
export NIX_${role}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"
|
||||
export NIX_${role_pre}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"
|
||||
fi
|
||||
|
||||
if [[ -d "$1/Library/Frameworks" ]]; then
|
||||
export NIX_${role}CFLAGS_COMPILE+=" -F$1/Library/Frameworks"
|
||||
export NIX_${role_pre}CFLAGS_COMPILE+=" -F$1/Library/Frameworks"
|
||||
fi
|
||||
}
|
||||
|
||||
# Since the same cc-wrapper derivation can be depend on in multiple ways, we
|
||||
# need to accumulate *each* role (i.e. target platform relative the depending
|
||||
# derivation) in which the cc-wrapper derivation is used.
|
||||
# `NIX_CC_WRAPPER_@infixSalt@_TARGET_*` tracks this (needs to be an exported env
|
||||
# var so can't use fancier data structures).
|
||||
#
|
||||
# We also need to worry about what role is being added on *this* invocation of
|
||||
# setup-hook, which `role` tracks.
|
||||
case $targetOffset in
|
||||
-1)
|
||||
export NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD=1
|
||||
role_pre='BUILD_'
|
||||
role_post='_FOR_BUILD'
|
||||
;;
|
||||
0)
|
||||
export NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST=1
|
||||
role_pre=''
|
||||
role_post=''
|
||||
;;
|
||||
1)
|
||||
export NIX_CC_WRAPPER_@infixSalt@_TARGET_TARGET=1
|
||||
role_pre='TARGET_'
|
||||
role_post='_FOR_TARGET'
|
||||
;;
|
||||
*)
|
||||
echo "cc-wrapper: used as improper sort of dependency" >2;
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
# See ../setup-hooks/role.bash
|
||||
getTargetRole
|
||||
getTargetRoleWrapper
|
||||
|
||||
# We use the `targetOffset` to choose the right env hook to accumulate the right
|
||||
# sort of deps (those with that offset).
|
||||
@ -147,6 +114,10 @@ export ${role_pre}CXX=@named_cxx@
|
||||
export CC${role_post}=@named_cc@
|
||||
export CXX${role_post}=@named_cxx@
|
||||
|
||||
# If unset, assume the default hardening flags.
|
||||
: ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"}
|
||||
export NIX_HARDENING_ENABLE
|
||||
|
||||
# No local scope in sourced file
|
||||
unset -v role_pre role_post
|
||||
set +u
|
||||
|
@ -91,7 +91,7 @@ in stdenv.mkDerivation (args // {
|
||||
installPhase = args.installPhase or ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
find target/release -maxdepth 1 -executable -exec cp "{}" $out/bin \;
|
||||
find target/release -maxdepth 1 -executable -type f -exec cp "{}" $out/bin \;
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
75
pkgs/build-support/setup-hooks/role.bash
Normal file
75
pkgs/build-support/setup-hooks/role.bash
Normal 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
|
||||
}
|
@ -1,3 +1,18 @@
|
||||
# Accumulate infixes for taking in the right input parameters with the `mangle*`
|
||||
# functions below. See setup-hook for details.
|
||||
accumulateRoles() {
|
||||
declare -ga role_infixes=()
|
||||
if [ "${NIX_@wrapperName@_@infixSalt@_TARGET_BUILD:-}" ]; then
|
||||
role_infixes+=(_BUILD_)
|
||||
fi
|
||||
if [ "${NIX_@wrapperName@_@infixSalt@_TARGET_HOST:-}" ]; then
|
||||
role_infixes+=(_)
|
||||
fi
|
||||
if [ "${NIX_@wrapperName@_@infixSalt@_TARGET_TARGET:-}" ]; then
|
||||
role_infixes+=(_TARGET_)
|
||||
fi
|
||||
}
|
||||
|
||||
mangleVarList() {
|
||||
local var="$1"
|
||||
shift
|
@ -1,11 +1,11 @@
|
||||
{ fetchurl, stdenv, cmake, ninja }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "poppler-data-0.4.8";
|
||||
name = "poppler-data-0.4.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://poppler.freedesktop.org/${name}.tar.gz";
|
||||
sha256 = "0wi8yyynladny51r4q53z7ygh7y491ayp8nqqv6wqqzjc60s35hh";
|
||||
sha256 = "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ninja ];
|
||||
|
@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
doCheck = false; # needs more tools
|
||||
|
||||
installFlags = [ "ZIC=./zic-native" ];
|
||||
|
||||
preInstall = ''
|
||||
|
@ -38,4 +38,6 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = optionalString stdenv.isDarwin ''
|
||||
intltoolize --force
|
||||
'';
|
||||
|
||||
doCheck = false; # requires X11 daemon
|
||||
}
|
||||
|
@ -13,4 +13,6 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ gtk libglade libxml2 libxslt libX11 docbook_xml_dtd_412 ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig intltool gnome-doc-utils which ];
|
||||
|
||||
doCheck = false; # fails, tries to access the net
|
||||
}
|
||||
|
@ -21,4 +21,6 @@ stdenv.mkDerivation rec {
|
||||
propagatedBuildInputs = [ GConf glib ];
|
||||
|
||||
postPatch = "find . -name Makefile.in | xargs sed 's/-DG_DISABLE_DEPRECATED//g' -i ";
|
||||
|
||||
doCheck = false; # needs dbus daemon
|
||||
}
|
||||
|
@ -24,6 +24,9 @@ in stdenv.mkDerivation rec {
|
||||
meson ninja vala pkgconfig gettext itstool wrapGAppsHook gobjectIntrospection desktop-file-utils
|
||||
];
|
||||
|
||||
# Required for USB redirection PolicyKit rules file
|
||||
propagatedUserEnvPkgs = [ spice-gtk ];
|
||||
|
||||
buildInputs = [
|
||||
libvirt-glib glib gtk3 gtkvnc libxml2
|
||||
libvirt spice-gtk spice-protocol libsoup json-glib webkitgtk libosinfo systemd
|
||||
|
@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ meson ninja vala pkgconfig python3 libxslt libxml2 docbook_xsl ];
|
||||
buildInputs = [ glib dbus-glib ];
|
||||
|
||||
doCheck = false; # fails 2 out of 9 tests, maybe needs dbus daemon?
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome3.updateScript {
|
||||
packageName = pname;
|
||||
|
@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ intltool glib libxfce4util ];
|
||||
propagatedBuildInputs = [ dbus-glib ];
|
||||
|
||||
doCheck = false; # requires dbus daemon
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://docs.xfce.org/xfce/xfconf/start;
|
||||
description = "Simple client-server configuration storage and query system for Xfce";
|
||||
@ -26,4 +28,3 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,8 @@
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, darwin ? null
|
||||
, buildPlatform, hostPlatform, targetPlatform
|
||||
@ -154,7 +155,7 @@ let version = "4.8.5";
|
||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
]));
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
@ -164,7 +165,7 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@ -267,11 +268,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -351,21 +348,19 @@ stdenv.mkDerivation ({
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags = if bootstrap then
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
||||
else "";
|
||||
buildFlags = optional
|
||||
(bootstrap && hostPlatform == buildPlatform)
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
dontStrip = !stripped;
|
||||
|
||||
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
@ -467,8 +462,5 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
)
|
||||
|
@ -25,7 +25,8 @@
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, darwin ? null
|
||||
, buildPlatform, hostPlatform, targetPlatform
|
||||
@ -162,7 +163,7 @@ let version = "4.9.4";
|
||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
]));
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
@ -172,7 +173,7 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@ -290,11 +291,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -373,21 +370,19 @@ stdenv.mkDerivation ({
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags = if bootstrap then
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
||||
else "";
|
||||
buildFlags = optional
|
||||
(bootstrap && hostPlatform == buildPlatform)
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
dontStrip = !stripped;
|
||||
|
||||
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
@ -485,9 +480,6 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
|
||||
// optionalAttrs (langJava) {
|
||||
|
@ -25,7 +25,8 @@
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
@ -148,7 +149,7 @@ let version = "5.5.0";
|
||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
]));
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
@ -158,7 +159,7 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@ -292,11 +293,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -372,21 +369,19 @@ stdenv.mkDerivation ({
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags = if bootstrap then
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
||||
else "";
|
||||
buildFlags = optional
|
||||
(bootstrap && hostPlatform == buildPlatform)
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
dontStrip = !stripped;
|
||||
|
||||
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
@ -484,8 +479,5 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
)
|
||||
|
@ -25,7 +25,8 @@
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
@ -151,7 +152,7 @@ let version = "6.4.0";
|
||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
]));
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
@ -161,7 +162,7 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@ -300,11 +301,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -380,20 +377,19 @@ stdenv.mkDerivation ({
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags =
|
||||
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
buildFlags = optional
|
||||
(bootstrap && hostPlatform == buildPlatform)
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
dontStrip = !stripped;
|
||||
|
||||
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
@ -491,9 +487,6 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
|
||||
// optionalAttrs (langJava) {
|
||||
|
@ -2,30 +2,24 @@
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
, langJava ? false
|
||||
, langGo ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null
|
||||
, gtk2 ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, x11Support ? langJava
|
||||
, zlib ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
@ -33,10 +27,6 @@
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null
|
||||
&& perl != null; # for `--enable-java-home'
|
||||
|
||||
# LTO needs libelf and zlib.
|
||||
assert libelf != null -> zlib != null;
|
||||
|
||||
@ -70,29 +60,6 @@ let version = "7.3.0";
|
||||
})
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
||||
# XXX: Eventually we might want to take it from upstream.
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
|
||||
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
@ -156,17 +123,14 @@ let version = "7.3.0";
|
||||
"--disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
]));
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
|
||||
crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else "";
|
||||
|
||||
bootstrap = targetPlatform == hostPlatform;
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@ -262,13 +226,12 @@ stdenv.mkDerivation ({
|
||||
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
inherit noSysDirs staticCompiler
|
||||
libcCross crossMingw;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
++ (optional (perl != null) perl);
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
@ -283,8 +246,6 @@ stdenv.mkDerivation ({
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
@ -305,11 +266,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -336,7 +293,6 @@ stdenv.mkDerivation ({
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langGo "go"
|
||||
++ optional langObjC "objc"
|
||||
++ optional langObjCpp "obj-c++"
|
||||
@ -357,18 +313,6 @@ stdenv.mkDerivation ({
|
||||
# Optional features
|
||||
optional (isl != null) "--with-isl=${isl}" ++
|
||||
|
||||
# Java options
|
||||
optionals langJava [
|
||||
"--with-ecj-jar=${javaEcj}"
|
||||
|
||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
(import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
@ -386,31 +330,25 @@ stdenv.mkDerivation ({
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags =
|
||||
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
buildFlags = optional
|
||||
(bootstrap && hostPlatform == buildPlatform)
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
dontStrip = !stripped;
|
||||
|
||||
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
|
||||
# library headers and binaries, regarless of the language being compiled.
|
||||
#
|
||||
# Note: When building the Java AWT GTK+ peer, the build system doesn't honor
|
||||
# `--with-gmp' et al., e.g., when building
|
||||
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
|
||||
# them to $CPATH and $LIBRARY_PATH in this case.
|
||||
#
|
||||
# Likewise, the LTO code doesn't find zlib.
|
||||
#
|
||||
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
|
||||
@ -419,9 +357,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread
|
||||
++ optional (libpthreadCross != null) libpthreadCross
|
||||
|
||||
@ -433,9 +368,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread)
|
||||
);
|
||||
|
||||
@ -476,8 +408,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
longDescription = ''
|
||||
The GNU Compiler Collection includes compiler front ends for C, C++,
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
|
||||
as libraries for these languages (libstdc++, libgcj, libgomp,...).
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
|
||||
libraries for these languages (libstdc++, libgomp,...).
|
||||
|
||||
GCC development is a part of the GNU Project, aiming to improve the
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
@ -497,8 +429,5 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
)
|
||||
|
@ -18,7 +18,8 @@
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
@ -260,11 +261,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -327,20 +324,17 @@ stdenv.mkDerivation ({
|
||||
|
||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||
|
||||
buildFlags =
|
||||
optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
buildFlags = optional
|
||||
(bootstrap && hostPlatform == buildPlatform)
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
|
||||
|
||||
dontStrip = !stripped;
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
@ -427,8 +421,5 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
)
|
||||
|
@ -1,13 +1,5 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies are slid
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libstdc++"
|
||||
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++"
|
||||
|
@ -2,30 +2,24 @@
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
, langJava ? false
|
||||
, langGo ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null
|
||||
, gtk2 ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, x11Support ? langJava
|
||||
, zlib ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? false
|
||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||
, stripped ? true
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, darwin ? null
|
||||
@ -34,10 +28,6 @@
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null
|
||||
&& perl != null; # for `--enable-java-home'
|
||||
|
||||
# LTO needs libelf and zlib.
|
||||
assert libelf != null -> zlib != null;
|
||||
|
||||
@ -63,29 +53,6 @@ let version = "7-20170409";
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
||||
# XXX: Eventually we might want to take it from upstream.
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
|
||||
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* Cross-gcc settings (build == host != target) */
|
||||
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
|
||||
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
|
||||
@ -150,9 +117,6 @@ let version = "7-20170409";
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
|
||||
@ -225,13 +189,12 @@ stdenv.mkDerivation ({
|
||||
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
inherit noSysDirs staticCompiler
|
||||
libcCross crossMingw;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
++ (optional (perl != null) perl);
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
@ -246,8 +209,6 @@ stdenv.mkDerivation ({
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
@ -268,11 +229,7 @@ stdenv.mkDerivation ({
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms =
|
||||
# TODO(@Ericson2314): Figure out what's going wrong with Arm
|
||||
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
|
||||
then []
|
||||
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags =
|
||||
# Basic dependencies
|
||||
@ -299,7 +256,6 @@ stdenv.mkDerivation ({
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langGo "go"
|
||||
++ optional langObjC "objc"
|
||||
++ optional langObjCpp "obj-c++"
|
||||
@ -320,17 +276,6 @@ stdenv.mkDerivation ({
|
||||
# Optional features
|
||||
optional (isl != null) "--with-isl=${isl}" ++
|
||||
|
||||
# Java options
|
||||
optionals langJava [
|
||||
"--with-ecj-jar=${javaEcj}"
|
||||
|
||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
(import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
@ -351,28 +296,20 @@ stdenv.mkDerivation ({
|
||||
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
|
||||
else "";
|
||||
|
||||
dontStrip = !stripped;
|
||||
NIX_STRIP_DEBUG = !stripped;
|
||||
|
||||
installTargets =
|
||||
if stripped
|
||||
then "install-strip"
|
||||
else "install";
|
||||
|
||||
/* For cross-built gcc (build != host == target) */
|
||||
crossAttrs = {
|
||||
dontStrip = true;
|
||||
buildFlags = "";
|
||||
};
|
||||
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
|
||||
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
|
||||
# library headers and binaries, regarless of the language being compiled.
|
||||
#
|
||||
# Note: When building the Java AWT GTK+ peer, the build system doesn't honor
|
||||
# `--with-gmp' et al., e.g., when building
|
||||
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
|
||||
# them to $CPATH and $LIBRARY_PATH in this case.
|
||||
#
|
||||
# Likewise, the LTO code doesn't find zlib.
|
||||
#
|
||||
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
|
||||
@ -381,9 +318,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread
|
||||
++ optional (libpthreadCross != null) libpthreadCross
|
||||
|
||||
@ -395,9 +329,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread)
|
||||
);
|
||||
|
||||
@ -438,8 +369,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
longDescription = ''
|
||||
The GNU Compiler Collection includes compiler front ends for C, C++,
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
|
||||
as libraries for these languages (libstdc++, libgcj, libgomp,...).
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
|
||||
libraries for these languages (libstdc++, libgomp,...).
|
||||
|
||||
GCC development is a part of the GNU Project, aiming to improve the
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
@ -461,8 +392,5 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
# Strip kills static libs of other archs (hence targetPlatform != hostPlatform)
|
||||
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
|
||||
|
||||
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
|
||||
)
|
||||
|
@ -129,10 +129,8 @@ stdenv.mkDerivation rec {
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
||||
# compatability. This will be replaced with something clearer in a future
|
||||
# masss-rebuild.
|
||||
crossConfig = true;
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour
|
||||
|
@ -129,10 +129,8 @@ stdenv.mkDerivation rec {
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
||||
# compatability. This will be replaced with something clearer in a future
|
||||
# masss-rebuild.
|
||||
crossConfig = true;
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ ghc perl hscolour sphinx ];
|
||||
|
||||
|
@ -148,10 +148,8 @@ stdenv.mkDerivation rec {
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
||||
# compatability. This will be replaced with something clearer in a future
|
||||
# masss-rebuild.
|
||||
crossConfig = true;
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ];
|
||||
|
||||
@ -171,6 +169,9 @@ stdenv.mkDerivation rec {
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
doCheck = false; # fails with "testsuite/tests: No such file or directory. Stop."
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
|
||||
# treat that as a unary `{x,y,z,..}` repetition.
|
||||
|
@ -139,10 +139,8 @@ stdenv.mkDerivation rec {
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
||||
# compatability. This will be replaced with something clearer in a future
|
||||
# masss-rebuild.
|
||||
crossConfig = true;
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
|
||||
|
||||
|
@ -136,10 +136,8 @@ stdenv.mkDerivation rec {
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
||||
# compatability. This will be replaced with something clearer in a future
|
||||
# masss-rebuild.
|
||||
crossConfig = true;
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
|
||||
|
||||
|
@ -25,13 +25,13 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-${version}";
|
||||
version = "1.10.1";
|
||||
version = "1.10.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "go";
|
||||
rev = "go${version}";
|
||||
sha256 = "1wqwy52ibb343a4v7b9q26xa6r5jk4khfxd90wbpcayws8cxly8m";
|
||||
sha256 = "1lbxnlj5l9i8k1dg33dh8ndx9vspk9dkpcbg06jbbswy6kadmx6f";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
|
@ -39,7 +39,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies are slid
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -33,7 +33,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies are slid
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -31,7 +31,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -31,7 +31,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -44,7 +44,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -9,7 +9,7 @@ let
|
||||
name = "clang-${version}";
|
||||
|
||||
unpackPhase = ''
|
||||
unpackFile ${fetch "cfe" "1zyh4dggxd55lnfg73c8fybnkssqcaa6bq2h4bzimnnj1jdnqpqk"}
|
||||
unpackFile ${fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s"}
|
||||
mv cfe-${version}* clang
|
||||
sourceRoot=$PWD/clang
|
||||
unpackFile ${clang-tools-extra_src}
|
||||
@ -50,10 +50,12 @@ let
|
||||
|
||||
outputs = [ "out" "lib" "python" ];
|
||||
|
||||
# Clang expects to find LLVMgold in its own prefix
|
||||
# Clang expects to find sanitizer libraries in its own prefix
|
||||
postInstall = ''
|
||||
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 $out/bin/clang $out/bin/cpp
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release_version = "5.0.1";
|
||||
release_version = "5.0.2";
|
||||
version = release_version; # differentiating these is important for rc's
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
@ -14,8 +14,8 @@ let
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
compiler-rt_src = fetch "compiler-rt" "1nlmm0b3wpdwxkldqp1klzv3rpqf94q2a248xgqb7aapyhbi9paf";
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "09fjii7w43kvxvsxxs6gig9vz95vnvx1779rqd36h8kksvws3bcs";
|
||||
compiler-rt_src = fetch "compiler-rt" "0ipd4jdxpczgr2w6lzrabymz6dhzj69ywmyybjjc1q397zgrvziy";
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "018b3fiwah8f8br5i26qmzh6sjvzchpn358sn8v079m49f2jldm3";
|
||||
|
||||
# Add man output without introducing extra dependencies.
|
||||
overrideManOutput = drv:
|
||||
|
@ -3,7 +3,7 @@
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libc++-${version}";
|
||||
|
||||
src = fetch "libcxx" "003wwniwlikgh38cbqbcshc5gkiv3a2jkmbn6am9s46y5gfrk3zs";
|
||||
src = fetch "libcxx" "1672aaf95fgy4xsfra8pw24f6r93zwzpan1033hkcm8p2glqipvf";
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxxabi.src}
|
||||
@ -40,7 +40,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -3,7 +3,7 @@
|
||||
stdenv.mkDerivation {
|
||||
name = "libc++abi-${version}";
|
||||
|
||||
src = fetch "libcxxabi" "0m78yr4arlz2b9m96xcygk15m2pbz8i10snk78i3q7pjnwn1a9as";
|
||||
src = fetch "libcxxabi" "12lp799rskr4fc2xr64qn4jfkjnfd8b1aymvsxyn4k9ar7r9pgqv";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
|
||||
|
@ -10,7 +10,7 @@
|
||||
stdenv.mkDerivation {
|
||||
name = "lld-${version}";
|
||||
|
||||
src = fetch "lld" "15fq2zvkliyiw5qi7ig2r8bshgbz4kzvs5in16mhfkw20l06rcym";
|
||||
src = fetch "lld" "1ah75rjly6747jk1zbwca3z0svr9b09ylgxd4x9ns721xir6sia6";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ llvm ];
|
||||
|
@ -17,7 +17,7 @@
|
||||
stdenv.mkDerivation {
|
||||
name = "lldb-${version}";
|
||||
|
||||
src = fetch "lldb" "0sipv8k37ai44m7jcf6wsbm2q41dgk3sk9m3i6823jkmg7kckhdp";
|
||||
src = fetch "lldb" "05j2a63yzln43852nng8a7y47spzlyr1cvdmgmbxgd29c8r0bfkq";
|
||||
|
||||
postPatch = ''
|
||||
# Fix up various paths that assume llvm and clang are installed in the same place
|
||||
|
@ -20,7 +20,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
src = fetch "llvm" "1c07i0b61j69m578lgjkyayg419sh7sn40xb3j112nr2q2gli9sz";
|
||||
src = fetch "llvm" "0g1bbj2n6xv4p1n6hh17vj3vpvg56wacipc81dgwga9mg2lys8nm";
|
||||
|
||||
# Used when creating a version-suffixed symlink of libLLVM.dylib
|
||||
shortVersion = with stdenv.lib;
|
||||
|
@ -10,7 +10,7 @@
|
||||
stdenv.mkDerivation {
|
||||
name = "openmp-${version}";
|
||||
|
||||
src = fetch "openmp" "0lr6r87xzg87w1q9rrh04nqpyr8c929dh4qy3csjiy7rsb6kbdmd";
|
||||
src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
@ -40,7 +40,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
linkCxxAbi = stdenv.isLinux;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://libcxx.llvm.org/;
|
||||
|
@ -1,14 +1,6 @@
|
||||
# The `hostOffset` describes how the host platform of the dependencies
|
||||
# relative to the depending package. It is brought into scope of the setup hook
|
||||
# defined as the role of the dependency whose hooks is being run.
|
||||
case $hostOffset in
|
||||
-1) local role='BUILD_' ;;
|
||||
0) local role='' ;;
|
||||
1) local role='TARGET_' ;;
|
||||
*) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2;
|
||||
return 1 ;;
|
||||
esac
|
||||
# See pkgs/build-support/setup-hooks/role.bash
|
||||
getHostRole
|
||||
|
||||
linkCxxAbi="@linkCxxAbi@"
|
||||
export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
|
||||
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
|
||||
|
@ -133,6 +133,8 @@ let
|
||||
|
||||
buildFlags = [ "all" ];
|
||||
|
||||
doCheck = false; # fails with "No rule to make target 'y'."
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
|
||||
|
||||
|
@ -314,6 +314,8 @@ stdenv.mkDerivation ({
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
inherit doCheck;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${setupCommand} test ${testTarget}
|
||||
@ -428,7 +430,6 @@ stdenv.mkDerivation ({
|
||||
// optionalAttrs (postConfigure != "") { inherit postConfigure; }
|
||||
// optionalAttrs (preBuild != "") { inherit preBuild; }
|
||||
// optionalAttrs (postBuild != "") { inherit postBuild; }
|
||||
// optionalAttrs (doCheck) { inherit doCheck; }
|
||||
// optionalAttrs (doBenchmark) { inherit doBenchmark; }
|
||||
// optionalAttrs (checkPhase != "") { inherit checkPhase; }
|
||||
// optionalAttrs (preCheck != "") { inherit preCheck; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, unzip, version }:
|
||||
{ stdenv, fetchurl, unzip, version ? "1.24.3" }:
|
||||
|
||||
let
|
||||
|
||||
@ -57,9 +57,9 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
|
||||
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
|
||||
meta = {
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
homepage = https://www.dartlang.org/;
|
||||
|
@ -16,7 +16,11 @@ stdenv.mkDerivation rec {
|
||||
setOutputFlags = false; # $dev gets into the library otherwise
|
||||
|
||||
# GCC 4.6 raises a number of set-but-unused warnings.
|
||||
configureFlags = [ "--disable-error-on-warning" ];
|
||||
configureFlags = [ "--disable-error-on-warning" ]
|
||||
# Guile needs patching to preset results for the configure tests about
|
||||
# pthreads, which work only in native builds.
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
"--with-threads=no";
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional (hostPlatform != buildPlatform)
|
||||
@ -34,17 +38,8 @@ stdenv.mkDerivation rec {
|
||||
libtool
|
||||
];
|
||||
|
||||
|
||||
patches = [ ./cpp-4.5.patch ];
|
||||
|
||||
# Guile needs patching to preset results for the configure tests
|
||||
# about pthreads, which work only in native builds.
|
||||
preConfigure = ''
|
||||
if test -n "$crossConfig"; then
|
||||
configureFlags="--with-threads=no $configureFlags"
|
||||
fi
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
|
||||
'';
|
||||
@ -66,6 +61,7 @@ stdenv.mkDerivation rec {
|
||||
# This is fixed here:
|
||||
# <http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=a0aa1e5b69d6ef0311aeea8e4b9a94eae18a1aaf>.
|
||||
doCheck = false;
|
||||
doInstallCheck = doCheck;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
|
@ -89,6 +89,7 @@
|
||||
# make check doesn't work on darwin
|
||||
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
|
||||
doCheck = false;
|
||||
doInstallCheck = doCheck;
|
||||
|
||||
setupHook = ./setup-hook-2.0.sh;
|
||||
|
||||
|
@ -85,6 +85,7 @@
|
||||
# make check doesn't work on darwin
|
||||
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
|
||||
doCheck = false;
|
||||
doInstallCheck = doCheck;
|
||||
|
||||
setupHook = ./setup-hook-2.2.sh;
|
||||
|
||||
|
@ -105,6 +105,8 @@ let
|
||||
|
||||
passthru.libPrefix = "lib/perl5/site_perl";
|
||||
|
||||
doCheck = false; # some tests fail, expensive
|
||||
|
||||
# TODO: it seems like absolute paths to some coreutils is required.
|
||||
postInstall =
|
||||
''
|
||||
|
@ -2,6 +2,7 @@
|
||||
# and can build packages that use distutils, setuptools or flit.
|
||||
|
||||
{ lib
|
||||
, config
|
||||
, python
|
||||
, wrapPython
|
||||
, setuptools
|
||||
@ -19,7 +20,7 @@ let
|
||||
wheel-specific = import ./build-python-package-wheel.nix { };
|
||||
common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
|
||||
mkPythonDerivation = import ./mk-python-derivation.nix {
|
||||
inherit lib python wrapPython setuptools unzip ensureNewerSourcesForZipFilesHook toPythonModule namePrefix;
|
||||
inherit lib config python wrapPython setuptools unzip ensureNewerSourcesForZipFilesHook toPythonModule namePrefix;
|
||||
};
|
||||
in
|
||||
|
||||
|
@ -31,7 +31,7 @@ with stdenv.lib;
|
||||
|
||||
let
|
||||
majorVersion = "2.7";
|
||||
minorVersion = "14";
|
||||
minorVersion = "15";
|
||||
minorVersionSuffix = "";
|
||||
pythonVersion = majorVersion;
|
||||
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
|
||||
@ -40,7 +40,7 @@ let
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
|
||||
sha256 = "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi";
|
||||
sha256 = "0x2mvz9dp11wj7p5ccvmk9s0hzjk2fa1m462p395l4r6bfnb3n92";
|
||||
};
|
||||
|
||||
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
|
||||
@ -58,8 +58,6 @@ let
|
||||
# if DETERMINISTIC_BUILD env var is set
|
||||
./deterministic-build.patch
|
||||
|
||||
./properly-detect-curses.patch
|
||||
|
||||
] ++ optionals (x11Support && stdenv.isDarwin) [
|
||||
./use-correct-tcl-tk-on-darwin.patch
|
||||
] ++ optionals stdenv.isLinux [
|
||||
@ -140,7 +138,10 @@ let
|
||||
"ac_cv_computed_gotos=yes"
|
||||
"ac_cv_file__dev_ptmx=yes"
|
||||
"ac_cv_file__dev_ptc=yes"
|
||||
];
|
||||
]
|
||||
# Never even try to use lchmod on linux,
|
||||
# don't rely on detecting glibc-isms.
|
||||
++ optional hostPlatform.isLinux "ac_cv_func_lchmod=no";
|
||||
|
||||
postConfigure = if hostPlatform.isCygwin then ''
|
||||
sed -i Makefile -e 's,PYTHONPATH="$(srcdir),PYTHONPATH="$(abs_srcdir),'
|
||||
@ -241,6 +242,8 @@ in stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # expensive, and fails
|
||||
|
||||
meta = {
|
||||
homepage = http://python.org;
|
||||
description = "A high-level dynamically-typed programming language";
|
||||
|
@ -1,116 +0,0 @@
|
||||
From 6dc83db69b5e29d25ba6d73646ea2e9a1097848a Mon Sep 17 00:00:00 2001
|
||||
From: Roumen Petrov <local@example.net>
|
||||
Date: Sun, 19 Feb 2012 16:13:24 +0200
|
||||
Subject: [PATCH] CROSS-properly detect WINDOW _flags for different ncurses versions
|
||||
|
||||
---
|
||||
Include/py_curses.h | 5 +++++
|
||||
configure.ac | 40 ++++++++++++++++++++++++++++++++++++++--
|
||||
pyconfig.h.in | 6 ++++++
|
||||
3 files changed, 49 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Include/py_curses.h b/Include/py_curses.h
|
||||
index f2c08f6..a9b5260 100644
|
||||
--- a/Include/py_curses.h
|
||||
+++ b/Include/py_curses.h
|
||||
@@ -14,7 +14,9 @@
|
||||
/* the following define is necessary for OS X 10.6; without it, the
|
||||
Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python
|
||||
can't get at the WINDOW flags field. */
|
||||
+/* NOTE configure check if ncurses require such definition
|
||||
#define NCURSES_OPAQUE 0
|
||||
+*/
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
@@ -57,9 +59,12 @@
|
||||
#ifdef HAVE_NCURSES_H
|
||||
/* configure was checking <curses.h>, but we will
|
||||
use <ncurses.h>, which has all these features. */
|
||||
+/* NOTE configure check for existence of flags
|
||||
+ * Also flags are visible only if WINDOW structure is not opaque
|
||||
#ifndef WINDOW_HAS_FLAGS
|
||||
#define WINDOW_HAS_FLAGS 1
|
||||
#endif
|
||||
+*/
|
||||
#ifndef MVWDELCH_IS_EXPRESSION
|
||||
#define MVWDELCH_IS_EXPRESSION 1
|
||||
#endif
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0a3a186..75f5142 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4150,15 +4150,51 @@ then
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether WINDOW has _flags)
|
||||
-AC_CACHE_VAL(ac_cv_window_has_flags,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||
WINDOW *w;
|
||||
w->_flags = 0;
|
||||
]])],
|
||||
[ac_cv_window_has_flags=yes],
|
||||
-[ac_cv_window_has_flags=no]))
|
||||
+[ac_cv_window_has_flags=no])
|
||||
AC_MSG_RESULT($ac_cv_window_has_flags)
|
||||
|
||||
+py_curses_window_is_opaque=no
|
||||
+if test no = $ac_cv_window_has_flags; then
|
||||
+ AC_MSG_CHECKING([whether WINDOW has _flags in non-opaque structure])
|
||||
+ AC_COMPILE_IFELSE([
|
||||
+ AC_LANG_PROGRAM([[
|
||||
+ #define NCURSES_OPAQUE 0
|
||||
+ #include <curses.h>
|
||||
+ ]],[[
|
||||
+ WINDOW *w;
|
||||
+ w->_flags = 0;
|
||||
+ ]])],
|
||||
+ [py_curses_window_is_opaque=yes])
|
||||
+ AC_MSG_RESULT([$py_curses_window_is_opaque])
|
||||
+fi
|
||||
+if test yes = $py_curses_window_is_opaque; then
|
||||
+ ac_cv_window_has_flags=yes
|
||||
+ AC_DEFINE([NCURSES_OPAQUE], [0], [Define to 0 if you have WINDOW _flags in non-opaque structure.])
|
||||
+fi
|
||||
+
|
||||
+py_curses_window_is_internal=no
|
||||
+if test no = $ac_cv_window_has_flags; then
|
||||
+ AC_MSG_CHECKING([whether WINDOW has _flags as internal structure])
|
||||
+ AC_COMPILE_IFELSE([
|
||||
+ AC_LANG_PROGRAM([[
|
||||
+ #define NCURSES_INTERNALS 1
|
||||
+ #include <curses.h>
|
||||
+ ]],[[
|
||||
+ WINDOW *w;
|
||||
+ w->_flags = 0;
|
||||
+ ]])],
|
||||
+ [py_curses_window_is_internal=yes])
|
||||
+ AC_MSG_RESULT([$py_curses_window_is_internal])
|
||||
+fi
|
||||
+if test yes = $py_curses_window_is_internal; then
|
||||
+ ac_cv_window_has_flags=yes
|
||||
+ AC_DEFINE([NCURSES_INTERNALS], [1], [Define to 1 if you have WINDOW _flags as internal structure.])
|
||||
+fi
|
||||
|
||||
if test "$ac_cv_window_has_flags" = yes
|
||||
then
|
||||
diff --git a/pyconfig.h.in b/pyconfig.h.in
|
||||
index 3ca3a4f..484c817 100644
|
||||
--- a/pyconfig.h.in
|
||||
+++ b/pyconfig.h.in
|
||||
@@ -1130,6 +1130,12 @@
|
||||
/* Define if mvwdelch in curses.h is an expression. */
|
||||
#undef MVWDELCH_IS_EXPRESSION
|
||||
|
||||
+/* Define to 1 if you have WINDOW _flags as internal structure. */
|
||||
+#undef NCURSES_INTERNALS
|
||||
+
|
||||
+/* Define to 0 if you have WINDOW _flags in non-opaque structure. */
|
||||
+#undef NCURSES_OPAQUE
|
||||
+
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
--
|
||||
1.6.4
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl
|
||||
{ stdenv, fetchurl, fetchpatch
|
||||
, bzip2
|
||||
, expat
|
||||
, libffi
|
||||
@ -39,6 +39,8 @@ let
|
||||
++ optionals x11Support [ tcl tk libX11 xproto ]
|
||||
++ optionals stdenv.isDarwin [ CF configd ];
|
||||
|
||||
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "python3-${version}";
|
||||
pythonVersion = majorVersion;
|
||||
@ -69,6 +71,16 @@ in stdenv.mkDerivation {
|
||||
./ld_library_path.patch
|
||||
] ++ optionals (x11Support && stdenv.isDarwin) [
|
||||
./use-correct-tcl-tk-on-darwin.patch
|
||||
] ++ optionals hasDistutilsCxxPatch [
|
||||
# Fix for http://bugs.python.org/issue1222585
|
||||
# Upstream distutils is calling C compiler to compile C++ code, which
|
||||
# only works for GCC and Apple Clang. This makes distutils to call C++
|
||||
# compiler when needed.
|
||||
(fetchpatch {
|
||||
url = "https://bugs.python.org/file47046/python-3.x-distutils-C++.patch";
|
||||
sha256 = "0dgdn9k2kmw4wh90vdnjcrnn97ylxgx7mbn9l87fwz6j501jqvk8";
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -96,7 +108,10 @@ in stdenv.mkDerivation {
|
||||
"--without-ensurepip"
|
||||
"--with-system-expat"
|
||||
"--with-system-ffi"
|
||||
];
|
||||
]
|
||||
# Never even try to use lchmod on linux,
|
||||
# don't rely on detecting glibc-isms.
|
||||
++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no";
|
||||
|
||||
preConfigure = ''
|
||||
for i in /usr /sw /opt /pkg; do # improve purity
|
||||
@ -163,7 +178,7 @@ in stdenv.mkDerivation {
|
||||
passthru = let
|
||||
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
|
||||
in rec {
|
||||
inherit libPrefix sitePackages x11Support;
|
||||
inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
|
||||
executable = "${libPrefix}m";
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
@ -176,6 +191,8 @@ in stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # expensive, and fails
|
||||
|
||||
meta = {
|
||||
homepage = http://python.org;
|
||||
description = "A high-level dynamically-typed programming language";
|
||||
|
@ -39,6 +39,8 @@ let
|
||||
++ optionals x11Support [ tcl tk libX11 xproto ]
|
||||
++ optionals stdenv.isDarwin [ CF configd ];
|
||||
|
||||
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "python3-${version}";
|
||||
pythonVersion = majorVersion;
|
||||
@ -67,8 +69,24 @@ in stdenv.mkDerivation {
|
||||
patches = [
|
||||
./no-ldconfig.patch
|
||||
./ld_library_path.patch
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
# Fix for https://bugs.python.org/issue24658
|
||||
(fetchpatch {
|
||||
url = "https://bugs.python.org/file45178/issue24658-3-3.6.diff";
|
||||
sha256 = "1x060hs80nl34mcl2ji2i7l4shxkmxwgq8h8lcmav8rjqqz1nb4a";
|
||||
})
|
||||
] ++ optionals (x11Support && stdenv.isDarwin) [
|
||||
./use-correct-tcl-tk-on-darwin.patch
|
||||
] ++ optionals hasDistutilsCxxPatch [
|
||||
# Fix for http://bugs.python.org/issue1222585
|
||||
# Upstream distutils is calling C compiler to compile C++ code, which
|
||||
# only works for GCC and Apple Clang. This makes distutils to call C++
|
||||
# compiler when needed.
|
||||
(fetchpatch {
|
||||
url = "https://bugs.python.org/file47046/python-3.x-distutils-C++.patch";
|
||||
sha256 = "0dgdn9k2kmw4wh90vdnjcrnn97ylxgx7mbn9l87fwz6j501jqvk8";
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -90,7 +108,10 @@ in stdenv.mkDerivation {
|
||||
"--without-ensurepip"
|
||||
"--with-system-expat"
|
||||
"--with-system-ffi"
|
||||
];
|
||||
]
|
||||
# Never even try to use lchmod on linux,
|
||||
# don't rely on detecting glibc-isms.
|
||||
++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no";
|
||||
|
||||
preConfigure = ''
|
||||
for i in /usr /sw /opt /pkg; do # improve purity
|
||||
@ -157,7 +178,7 @@ in stdenv.mkDerivation {
|
||||
passthru = let
|
||||
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
|
||||
in rec {
|
||||
inherit libPrefix sitePackages x11Support;
|
||||
inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
|
||||
executable = "${libPrefix}m";
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
@ -169,6 +190,8 @@ in stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # expensive, and fails
|
||||
|
||||
meta = {
|
||||
homepage = http://python.org;
|
||||
description = "A high-level dynamically-typed programming language";
|
||||
|
@ -42,6 +42,8 @@ let
|
||||
nativeBuildInputs =
|
||||
optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.python3;
|
||||
|
||||
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "python3-${version}";
|
||||
pythonVersion = majorVersion;
|
||||
@ -69,8 +71,24 @@ in stdenv.mkDerivation {
|
||||
|
||||
patches = [
|
||||
./no-ldconfig.patch
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
# Fix for https://bugs.python.org/issue24658
|
||||
(fetchpatch {
|
||||
url = "https://bugs.python.org/file45178/issue24658-3-3.6.diff";
|
||||
sha256 = "1x060hs80nl34mcl2ji2i7l4shxkmxwgq8h8lcmav8rjqqz1nb4a";
|
||||
})
|
||||
] ++ optionals (x11Support && stdenv.isDarwin) [
|
||||
./use-correct-tcl-tk-on-darwin.patch
|
||||
] ++ optionals hasDistutilsCxxPatch [
|
||||
# Fix for http://bugs.python.org/issue1222585
|
||||
# Upstream distutils is calling C compiler to compile C++ code, which
|
||||
# only works for GCC and Apple Clang. This makes distutils to call C++
|
||||
# compiler when needed.
|
||||
(fetchpatch {
|
||||
url = "https://bugs.python.org/file47046/python-3.x-distutils-C++.patch";
|
||||
sha256 = "0dgdn9k2kmw4wh90vdnjcrnn97ylxgx7mbn9l87fwz6j501jqvk8";
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -113,7 +131,10 @@ in stdenv.mkDerivation {
|
||||
"ac_cv_computed_gotos=yes"
|
||||
"ac_cv_file__dev_ptmx=yes"
|
||||
"ac_cv_file__dev_ptc=yes"
|
||||
];
|
||||
]
|
||||
# Never even try to use lchmod on linux,
|
||||
# don't rely on detecting glibc-isms.
|
||||
++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no";
|
||||
|
||||
preConfigure = ''
|
||||
for i in /usr /sw /opt /pkg; do # improve purity
|
||||
@ -180,7 +201,7 @@ in stdenv.mkDerivation {
|
||||
passthru = let
|
||||
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
|
||||
in rec {
|
||||
inherit libPrefix sitePackages x11Support;
|
||||
inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
|
||||
executable = "${libPrefix}m";
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
@ -193,6 +214,8 @@ in stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # expensive, and fails
|
||||
|
||||
meta = {
|
||||
homepage = http://python.org;
|
||||
description = "A high-level dynamically-typed programming language";
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Generic builder.
|
||||
|
||||
{ lib
|
||||
, config
|
||||
, python
|
||||
, wrapPython
|
||||
, setuptools
|
||||
@ -53,7 +54,7 @@
|
||||
|
||||
, passthru ? {}
|
||||
|
||||
, doCheck ? false
|
||||
, doCheck ? config.doCheckByDefault or false
|
||||
|
||||
, ... } @ attrs:
|
||||
|
||||
@ -74,7 +75,6 @@ toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
|
||||
|
||||
buildInputs = [ wrapPython ]
|
||||
++ lib.optional (lib.hasSuffix "zip" (attrs.src.name or "")) unzip
|
||||
++ lib.optionals doCheck checkInputs
|
||||
++ lib.optional catchConflicts setuptools # If we no longer propagate setuptools
|
||||
++ buildInputs
|
||||
++ pythonPath;
|
||||
@ -85,6 +85,7 @@ toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
|
||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
doInstallCheck = doCheck;
|
||||
installCheckInputs = checkInputs;
|
||||
|
||||
postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
|
||||
wrapPythonPrograms
|
||||
|
@ -39,6 +39,8 @@ stdenv.mkDerivation rec {
|
||||
"-Ddep11=false"
|
||||
];
|
||||
|
||||
doCheck = false; # fails at least 1 test
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput "share/installed-tests" "$installedTests"
|
||||
'';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user