Select the types of activity you want to include in your feed.
Merge branch 'staging' (older one)
Hydra seems OK-ish, except that some aarch64 jobs need restarting after qt4 timing out for the first time: https://hydra.nixos.org/eval/1412641?compare=1412561
···11+From 9a4396ddaedaf59ebee16d69900884e990b79cdd Mon Sep 17 00:00:00 2001
22+From: Florian Klink <flokli@flokli.de>
33+Date: Fri, 17 Nov 2017 13:21:37 +0100
44+Subject: [PATCH] git-send-email: honor $PATH
55+66+This will search $PATH for a sendmail binary, instead of the (previously
77+fixed) list of paths.
88+99+Signed-off-by: Florian Klink <flokli@flokli.de>
1010+---
1111+ Documentation/git-send-email.txt | 5 ++---
1212+ git-send-email.perl | 3 ++-
1313+ 2 files changed, 4 insertions(+), 4 deletions(-)
1414+1515+diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
1616+index bac9014ac..b9b1f2c41 100644
1717+--- a/Documentation/git-send-email.txt
1818++++ b/Documentation/git-send-email.txt
1919+@@ -203,9 +203,8 @@ a password is obtained using 'git-credential'.
2020+ specify a full pathname of a sendmail-like program instead;
2121+ the program must support the `-i` option. Default value can
2222+ be specified by the `sendemail.smtpServer` configuration
2323+- option; the built-in default is `/usr/sbin/sendmail` or
2424+- `/usr/lib/sendmail` if such program is available, or
2525+- `localhost` otherwise.
2626++ option; the built-in default is to search in $PATH if such program is
2727++ available, or `localhost` otherwise.
2828+2929+ --smtp-server-port=<port>::
3030+ Specifies a port different from the default port (SMTP
3131+diff --git a/git-send-email.perl b/git-send-email.perl
3232+index 2208dcc21..8e357aeab 100755
3333+--- a/git-send-email.perl
3434++++ b/git-send-email.perl
3535+@@ -885,7 +885,8 @@ if (defined $initial_reply_to) {
3636+ }
3737+3838+ if (!defined $smtp_server) {
3939+- foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
4040++ my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH};
4141++ foreach (@sendmail_paths) {
4242+ if (-x $_) {
4343+ $smtp_server = $_;
4444+ last;
4545+--
4646+2.15.0
4747+
···9898 javaAwtGtk = langJava && x11Support;
9999100100 /* Platform flags */
101101- platformFlags = let
102102- gccArch = stdenv.platform.gcc.arch or null;
103103- gccCpu = stdenv.platform.gcc.cpu or null;
104104- gccAbi = stdenv.platform.gcc.abi or null;
105105- gccFpu = stdenv.platform.gcc.fpu or null;
106106- gccFloat = stdenv.platform.gcc.float or null;
107107- gccMode = stdenv.platform.gcc.mode or null;
108108- withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
109109- withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
110110- withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
111111- withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
112112- withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
113113- withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
114114- in
115115- withArch +
116116- withCpu +
117117- withAbi +
118118- withFpu +
119119- withFloat +
120120- withMode;
101101+ mkPlatformFlags = platform: let
102102+ gccArch = platform.gcc.arch or null;
103103+ gccCpu = platform.gcc.cpu or null;
104104+ gccAbi = platform.gcc.abi or null;
105105+ gccFpu = platform.gcc.fpu or null;
106106+ gccFloat = platform.gcc.float or null;
107107+ gccMode = platform.gcc.mode or null;
108108+ in
109109+ optional (gccArch != null) "--with-arch=${gccArch}" ++
110110+ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++
111111+ optional (gccAbi != null) "--with-abi=${gccAbi}" ++
112112+ optional (gccFpu != null) "--with-fpu=${gccFpu}" ++
113113+ optional (gccFloat != null) "--with-float=${gccFloat}" ++
114114+ optional (gccMode != null) "--with-mode=${gccMode}";
121115122122- /* Cross-gcc settings */
116116+ /* Cross-gcc settings (build == host != target) */
123117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
124118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
125125- crossConfigureFlags = let
126126- gccArch = targetPlatform.gcc.arch or null;
127127- gccCpu = targetPlatform.gcc.cpu or null;
128128- gccAbi = targetPlatform.gcc.abi or null;
129129- gccFpu = targetPlatform.gcc.fpu or null;
130130- gccFloat = targetPlatform.gcc.float or null;
131131- gccMode = targetPlatform.gcc.mode or null;
132132- withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
133133- withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
134134- withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
135135- withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
136136- withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
137137- withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
138138- in
139139- withArch +
140140- withCpu +
141141- withAbi +
142142- withFpu +
143143- withFloat +
144144- withMode +
145145- # Ensure that -print-prog-name is able to find the correct programs.
146146- " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
147147- " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
148148- (if crossMingw && crossStageStatic then
149149- " --with-headers=${libcCross}/include" +
150150- " --with-gcc" +
151151- " --with-gnu-as" +
152152- " --with-gnu-ld" +
153153- " --with-gnu-ld" +
154154- " --disable-shared" +
155155- " --disable-nls" +
156156- " --disable-debug" +
157157- " --enable-sjlj-exceptions" +
158158- " --enable-threads=win32" +
159159- " --disable-win32-registry"
160160- else if crossStageStatic then
161161- " --disable-libssp --disable-nls" +
162162- " --without-headers" +
163163- " --disable-threads " +
164164- " --disable-libgomp " +
165165- " --disable-libquadmath" +
166166- " --disable-shared" +
167167- " --disable-libatomic " + # libatomic requires libc
168168- " --disable-decimal-float" # libdecnumber requires libc
169169- else
170170- (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
171171- else " --with-headers=${getDev libcCross}/include") +
172172- # Ensure that -print-prog-name is able to find the correct programs.
173173- " --enable-__cxa_atexit" +
174174- " --enable-long-long" +
175175- (if crossMingw then
176176- " --enable-threads=win32" +
177177- " --enable-sjlj-exceptions" +
178178- " --enable-hash-synchronization" +
179179- " --disable-libssp" +
180180- " --disable-nls" +
181181- " --with-dwarf2" +
182182- # I think noone uses shared gcc libs in mingw, so we better do the same.
183183- # In any case, mingw32 g++ linking is broken by default with shared libs,
184184- # unless adding "-lsupc++" to any linking command. I don't know why.
185185- " --disable-shared" +
186186- # To keep ABI compatibility with upstream mingw-w64
187187- " --enable-fully-dynamic-string"
188188- else (if targetPlatform.libc == "uclibc" then
189189- # libsanitizer requires netrom/netrom.h which is not
190190- # available in uclibc.
191191- " --disable-libsanitizer" +
192192- # In uclibc cases, libgomp needs an additional '-ldl'
193193- # and as I don't know how to pass it, I disable libgomp.
194194- " --disable-libgomp" else "") +
195195- " --enable-threads=posix" +
196196- " --enable-nls" +
197197- " --disable-decimal-float") # No final libdecnumber (it may work only in 386)
198198- );
119119+ crossConfigureFlags =
120120+ mkPlatformFlags targetPlatform ++
121121+122122+ # Ensure that -print-prog-name is able to find the correct programs.
123123+ [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
124124+ "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++
125125+ (if crossMingw && crossStageStatic then [
126126+ "--with-headers=${libcCross}/include"
127127+ "--with-gcc"
128128+ "--with-gnu-as"
129129+ "--with-gnu-ld"
130130+ "--with-gnu-ld"
131131+ "--disable-shared"
132132+ "--disable-nls"
133133+ "--disable-debug"
134134+ "--enable-sjlj-exceptions"
135135+ "--enable-threads=win32"
136136+ "--disable-win32-registry"
137137+ ] else if crossStageStatic then [
138138+ "--disable-libssp"
139139+ "--disable-nls"
140140+ "--without-headers"
141141+ "--disable-threads"
142142+ "--disable-libgomp"
143143+ "--disable-libquadmath"
144144+ "--disable-shared"
145145+ "--disable-libatomic" # libatomic requires libc
146146+ "--disable-decimal-float" # libdecnumber requires libc
147147+ ] else [
148148+ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot"
149149+ else "--with-headers=${getDev libcCross}/include")
150150+ "--enable-__cxa_atexit"
151151+ "--enable-long-long"
152152+ ] ++
153153+ (if crossMingw then [
154154+ "--enable-threads=win32"
155155+ "--enable-sjlj-exceptions"
156156+ "--enable-hash-synchronization"
157157+ "--disable-libssp"
158158+ "--disable-nls"
159159+ "--with-dwarf2"
160160+ # I think noone uses shared gcc libs in mingw, so we better do the same.
161161+ # In any case, mingw32 g++ linking is broken by default with shared libs,
162162+ # unless adding "-lsupc++" to any linking command. I don't know why.
163163+ "--disable-shared"
164164+ # To keep ABI compatibility with upstream mingw-w64
165165+ "--enable-fully-dynamic-string"
166166+ ] else
167167+ optionals (targetPlatform.libc == "uclibc") [
168168+ # libsanitizer requires netrom/netrom.h which is not
169169+ # available in uclibc.
170170+ "--disable-libsanitizer"
171171+ # In uclibc cases, libgomp needs an additional '-ldl'
172172+ # and as I don't know how to pass it, I disable libgomp.
173173+ "--disable-libgomp"
174174+ ] ++ [
175175+ "--enable-threads=posix"
176176+ "--enable-nls"
177177+ "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
178178+ ]));
199179 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
200180 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else "";
201181202202- bootstrap = targetPlatform == hostPlatform;
182182+ bootstrap = targetPlatform == hostPlatform;
203183204184in
205185···322302 then []
323303 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
324304325325- configureFlags = "
326326- ${if hostPlatform.isSunOS then
327327- " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
328328- # On Illumos/Solaris GNU as is preferred
329329- " --with-gnu-as --without-gnu-ld "
330330- else ""}
331331- --enable-lto
332332- ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
333333- ${if enableShared then "" else "--disable-shared"}
334334- ${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
335335- ${optionalString (isl != null) "--with-isl=${isl}"}
336336- ${if langJava then
337337- "--with-ecj-jar=${javaEcj} " +
305305+ configureFlags =
306306+ # Basic dependencies
307307+ [
308308+ "--with-gmp-include=${gmp.dev}/include"
309309+ "--with-gmp-lib=${gmp.out}/lib"
310310+ "--with-mpfr-include=${mpfr.dev}/include"
311311+ "--with-mpfr-lib=${mpfr.out}/lib"
312312+ "--with-mpc=${libmpc}"
313313+ ] ++
314314+ optional (libelf != null) "--with-libelf=${libelf}" ++
315315+316316+ # Basic configuration
317317+ [
318318+ "--enable-lto"
319319+ "--disable-libstdcxx-pch"
320320+ "--without-included-gettext"
321321+ "--with-system-zlib"
322322+ "--enable-static"
323323+ "--enable-languages=${
324324+ concatStrings (intersperse ","
325325+ ( optional langC "c"
326326+ ++ optional langCC "c++"
327327+ ++ optional langFortran "fortran"
328328+ ++ optional langJava "java"
329329+ ++ optional langAda "ada"
330330+ ++ optional langVhdl "vhdl"
331331+ ++ optional langGo "go"
332332+ ++ optional langObjC "objc"
333333+ ++ optional langObjCpp "obj-c++"
334334+ ++ optionals crossDarwin [ "objc" "obj-c++" ]
335335+ )
336336+ )
337337+ }"
338338+ ] ++
339339+340340+ (if enableMultilib
341341+ then ["--enable-multilib" "--disable-libquadmath"]
342342+ else ["--disable-multilib"]) ++
343343+ optional (!enableShared) "--disable-shared" ++
344344+ (if enablePlugin
345345+ then ["--enable-plugin"]
346346+ else ["--disable-plugin"]) ++
347347+348348+ # Optional features
349349+ optional (isl != null) "--with-isl=${isl}" ++
350350+351351+ # Java options
352352+ optionals langJava [
353353+ "--with-ecj-jar=${javaEcj}"
338354339355 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
340356 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
341341- "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
342342- else ""}
343343- ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
344344- ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
345345- --with-gmp-include=${gmp.dev}/include
346346- --with-gmp-lib=${gmp.out}/lib
347347- --with-mpfr-include=${mpfr.dev}/include
348348- --with-mpfr-lib=${mpfr.out}/lib
349349- --with-mpc=${libmpc}
350350- ${if libelf != null then "--with-libelf=${libelf}" else ""}
351351- --disable-libstdcxx-pch
352352- --without-included-gettext
353353- --with-system-zlib
354354- --enable-static
355355- --enable-languages=${
356356- concatStrings (intersperse ","
357357- ( optional langC "c"
358358- ++ optional langCC "c++"
359359- ++ optional langFortran "fortran"
360360- ++ optional langJava "java"
361361- ++ optional langAda "ada"
362362- ++ optional langVhdl "vhdl"
363363- ++ optional langGo "go"
364364- ++ optional langObjC "objc"
365365- ++ optional langObjCpp "obj-c++"
366366- ++ optionals crossDarwin [ "objc" "obj-c++" ]
367367- )
368368- )
369369- }
370370- ${if targetPlatform == hostPlatform
371371- then if hostPlatform.isDarwin
372372- then " --with-native-system-header-dir=${darwin.usr-include}"
373373- else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
374374- else ""}
375375- ${if langAda then " --enable-libada" else ""}
376376- ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
377377- ${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
378378- ${if !bootstrap then "--disable-bootstrap" else ""}
379379- ${if targetPlatform == hostPlatform then platformFlags else ""}
380380- ";
357357+ "--enable-java-home"
358358+ "--with-java-home=\${prefix}/lib/jvm/jre"
359359+ ] ++
360360+ optional javaAwtGtk "--enable-java-awt=gtk" ++
361361+ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
362362+363363+ # Ada
364364+ optional langAda "--enable-libada" ++
365365+366366+ # Cross-compilation
367367+ optional (targetPlatform == hostPlatform) (
368368+ let incDir = if hostPlatform.isDarwin
369369+ then "${darwin.usr-include}"
370370+ else "${getDev stdenv.cc.libc}/include";
371371+ in "--with-native-system-header-dir=${incDir}"
372372+ ) ++
373373+374374+ optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++
375375+ optional (targetPlatform != hostPlatform) crossConfigureFlags ++
376376+ optional (!bootstrap) "--disable-bootstrap" ++
377377+378378+ # Platform-specific flags
379379+ optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
380380+ optionals hostPlatform.isSunOS [
381381+ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
382382+ # On Illumos/Solaris GNU as is preferred
383383+ "--with-gnu-as" "--without-gnu-ld"
384384+ ]
385385+ ;
381386382387 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
383388···390395 then "install-strip"
391396 else "install";
392397398398+ /* For cross-built gcc (build != host == target) */
393399 crossAttrs = let
394400 xgccArch = targetPlatform.gcc.arch or null;
395401 xgccCpu = targetPlatform.gcc.cpu or null;
396402 xgccAbi = targetPlatform.gcc.abi or null;
397403 xgccFpu = targetPlatform.gcc.fpu or null;
398404 xgccFloat = targetPlatform.gcc.float or null;
399399- xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
400400- xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
401401- xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
402402- xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
403403- xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
404405 in {
405406 AR = "${targetPlatform.config}-ar";
406407 LD = "${targetPlatform.config}-ld";
···414415 # If we are making a cross compiler, cross != null
415416 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc;
416417 dontStrip = true;
417417- configureFlags = ''
418418- ${if enableMultilib then "" else "--disable-multilib"}
419419- ${if enableShared then "" else "--disable-shared"}
420420- ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
421421- ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
422422- ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
423423- --with-gmp=${gmp.crossDrv}
424424- --with-mpfr=${mpfr.crossDrv}
425425- --with-mpc=${libmpc.crossDrv}
426426- --disable-libstdcxx-pch
427427- --without-included-gettext
428428- --with-system-zlib
429429- --enable-languages=${
430430- concatStrings (intersperse ","
431431- ( optional langC "c"
432432- ++ optional langCC "c++"
433433- ++ optional langFortran "fortran"
434434- ++ optional langJava "java"
435435- ++ optional langAda "ada"
436436- ++ optional langVhdl "vhdl"
437437- ++ optional langGo "go"
418418+ configureFlags =
419419+ optional (!enableMultilib) "--disable-multilib" ++
420420+ optional (!enableShared) "--disable-shared" ++
421421+ optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++
422422+ optional javaAwtGtk "--enable-java-awt=gtk" ++
423423+ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++
424424+ [
425425+ "--with-gmp=${gmp.crossDrv}"
426426+ "--with-mpfr=${mpfr.crossDrv}"
427427+ "--with-mpc=${libmpc.crossDrv}"
428428+ "--disable-libstdcxx-pch"
429429+ "--without-included-gettext"
430430+ "--with-system-zlib"
431431+ "--enable-languages=${
432432+ concatStrings (intersperse ","
433433+ ( optional langC "c"
434434+ ++ optional langCC "c++"
435435+ ++ optional langFortran "fortran"
436436+ ++ optional langJava "java"
437437+ ++ optional langAda "ada"
438438+ ++ optional langVhdl "vhdl"
439439+ ++ optional langGo "go"
440440+ )
438441 )
439439- )
440440- }
441441- ${if langAda then " --enable-libada" else ""}
442442- ${xwithArch}
443443- ${xwithCpu}
444444- ${xwithAbi}
445445- ${xwithFpu}
446446- ${xwithFloat}
447447- '';
442442+ }"
443443+ ] ++
444444+ optional langAda "--enable-libada" ++
445445+ optional (xgccArch != null) "--with-arch=${xgccArch}" ++
446446+ optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++
447447+ optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++
448448+ optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++
449449+ optional (xgccFloat != null) "--with-float=${xgccFloat}"
450450+ ;
448451 buildFlags = "";
449452 };
450453
+3
pkgs/development/compilers/go/1.4.nix
···23232424 hardeningDisable = [ "all" ];
25252626+ # The tests try to do stuff with 127.0.0.1 and localhost
2727+ __darwinAllowLocalNetworking = true;
2828+2629 # I'm not sure what go wants from its 'src', but the go installation manual
2730 # describes an installation keeping the src.
2831 preUnpack = ''
···4444 substituteInPlace dist/PathTools/Cwd.pm \
4545 --replace "/bin/pwd" "$pwd"
4646 '';
4747- sandboxProfile = sandbox.allow "ipc-sysv-sem";
48474948 # Build a thread-safe Perl with a dynamic libperls.o. We need the
5049 # "installstyle" option to ensure that modules are put under
+3-2
pkgs/development/libraries/SDL2/default.nix
···5454 # https://bugzilla.libsdl.org/show_bug.cgi?id=1431
5555 dontDisableStatic = true;
56565757- # Flaky: fatal error: pointer-constraints-....h: No such file or directory
5858- #enableParallelBuilding = true;
5757+ # /build/SDL2-2.0.7/src/video/wayland/SDL_waylandevents.c:41:10: fatal error:
5858+ # pointer-constraints-unstable-v1-client-protocol.h: No such file or directory
5959+ enableParallelBuilding = false;
59606061 # XXX: By default, SDL wants to dlopen() PulseAudio, in which case
6162 # we must arrange to add it to its RPATH; however, `patchelf' seems
+2
pkgs/development/libraries/boehm-gc/default.nix
···3131 mv $out/share/gc $out/share/doc/gc
3232 '';
33333434+ enableParallelBuilding = true;
3535+3436 meta = {
3537 description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++";
3638
···164164165165 nativeBuildInputs = [ perl pkgconfig which ];
166166167167- enableParallelBuilding = false;
167167+ enableParallelBuilding = true;
168168169169 NIX_CFLAGS_COMPILE =
170170 optionalString stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin
···1717 propagatedBuildInputs = [ libffi pycparser ];
1818 buildInputs = [ pytest ];
19192020+ # On Darwin, the cffi tests want to hit libm a lot, and look for it in a global
2121+ # impure search path. It's obnoxious how much repetition there is, and how difficult
2222+ # it is to get it to search somewhere else (since we do actually have a libm symlink in libSystem)
2323+ prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
2424+ substituteInPlace testing/cffi0/test_parsing.py \
2525+ --replace 'lib_m = "m"' 'lib_m = "System"' \
2626+ --replace '"libm" in name' '"libSystem" in name'
2727+ substituteInPlace testing/cffi0/test_unicode_literals.py --replace 'lib_m = "m"' 'lib_m = "System"'
2828+ substituteInPlace testing/cffi0/test_zdistutils.py --replace 'self.lib_m = "m"' 'self.lib_m = "System"'
2929+ substituteInPlace testing/cffi1/test_recompiler.py --replace 'lib_m = "m"' 'lib_m = "System"'
3030+ substituteInPlace testing/cffi0/test_function.py --replace "lib_m = 'm'" "lib_m = 'System'"
3131+ substituteInPlace testing/cffi0/test_verify.py --replace "lib_m = ['m']" "lib_m = ['System']"
3232+ '';
3333+2034 # The tests use -Werror but with python3.6 clang detects some unreachable code.
2135 NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ];
2236
···11+From bc09a9236f67e710d545ac11bcdac7b55dbcc1a0 Mon Sep 17 00:00:00 2001
22+From: John Ericson <John.Ericson@Obsidian.Systems>
33+Date: Thu, 12 Oct 2017 11:16:57 -0400
44+Subject: [PATCH] Build components separately
55+66+---
77+ bfd/configure.ac | 18 +++---------------
88+ opcodes/Makefile.am | 17 +++++++++++++----
99+ opcodes/configure.ac | 45 ++++++---------------------------------------
1010+ 3 files changed, 22 insertions(+), 58 deletions(-)
1111+1212+diff --git a/bfd/configure.ac b/bfd/configure.ac
1313+index 9a183c1628..8728837384 100644
1414+--- a/bfd/configure.ac
1515++++ b/bfd/configure.ac
1616+@@ -241,31 +241,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
1717+1818+ LT_LIB_M
1919+2020+-# When building a shared libbfd, link against the pic version of libiberty
2121+-# so that apps that use libbfd won't need libiberty just to satisfy any
2222+-# libbfd references.
2323+-# We can't do that if a pic libiberty is unavailable since including non-pic
2424+-# code would insert text relocations into libbfd.
2525+ SHARED_LIBADD=
2626+-SHARED_LDFLAGS=
2727++SHARED_LDFLAGS=-liberty
2828+ if test "$enable_shared" = "yes"; then
2929+-changequote(,)dnl
3030+- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
3131+-changequote([,])dnl
3232+- if test -n "$x"; then
3333+- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
3434+- fi
3535+-
3636+ # More hacks to build DLLs on Windows.
3737+ case "${host}" in
3838+ *-*-cygwin*)
3939+ SHARED_LDFLAGS="-no-undefined"
4040+- SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
4141++ SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32"
4242+ ;;
4343+4444+ # Hack to build or1k-src on OSX
4545+ or1k*-*-darwin*)
4646+- SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
4747++ SHARED_LIBADD="-liberty -lintl"
4848+ ;;
4949+ esac
5050+5151+diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
5252+index 925e7ff651..47b395c195 100644
5353+--- a/opcodes/Makefile.am
5454++++ b/opcodes/Makefile.am
5555+@@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
5656+ endif
5757+5858+ # This is where bfd.h lives.
5959+-BFD_H = ../bfd/bfd.h
6060++BFD_H = $(BFDDIR)/bfd.h
6161+6262+ BUILD_LIBS = @BUILD_LIBS@
6363+ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
6464+@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@
6565+ # development.sh is used to determine -Werror default.
6666+ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
6767+6868+-AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
6969++AM_CPPFLAGS = -I. -I$(srcdir) -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
7070+7171+ disassemble.lo: disassemble.c
7272+ if am__fastdepCC
7373+@@ -324,12 +324,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
7474+ # old version of libbfd, or to pick up libbfd for the wrong architecture
7575+ # if host != build. So for building with shared libraries we use a
7676+ # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
7777+-libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
7878++libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion
7979+ libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
8080+-libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@
8181++libopcodes_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@
8282+ # Allow dependency tracking to work on all the source files.
8383+ EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES)
8484+8585++libtool-soversion:
8686++ @echo "creating $@"
8787++ bfd_soversion="$(VERSION)" ;\
8888++ . $(BFDDIR)/development.sh ;\
8989++ if test "$$development" = true ; then \
9090++ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
9191++ fi ;\
9292++ echo "$${bfd_soversion}" > $@
9393++
9494+ # libtool will build .libs/libopcodes.a. We create libopcodes.a in
9595+ # the build directory so that we don't have to convert all the
9696+ # programs that use libopcodes.a simultaneously. This is a hack which
9797+diff --git a/opcodes/configure.ac b/opcodes/configure.ac
9898+index b9f5eb8a4f..ef2c2152b7 100644
9999+--- a/opcodes/configure.ac
100100++++ b/opcodes/configure.ac
101101+@@ -89,6 +89,7 @@ AC_PROG_INSTALL
102102+103103+ AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
104104+ ACX_HEADER_STRING
105105++GCC_HEADER_STDINT(bfd_stdint.h)
106106+107107+ AC_CHECK_DECLS([basename, stpcpy])
108108+109109+@@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
110110+111111+ LT_LIB_M
112112+113113+-#Libs for generator progs
114114+-if test "x$cross_compiling" = "xno"; then
115115+- BUILD_LIBS=../libiberty/libiberty.a
116116+- BUILD_LIB_DEPS=$BUILD_LIBS
117117+-else
118118+- # if cross-compiling, assume that the system provides -liberty
119119+- # and that the version is compatible with new headers.
120120+- BUILD_LIBS=-liberty
121121+- BUILD_LIB_DEPS=
122122+-fi
123123+-BUILD_LIBS="$BUILD_LIBS $LIBINTL"
124124+-BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP"
125125++BUILD_LIBS="-liberty $LIBINTL"
126126++BUILD_LIB_DEPS="$LIBINTL_DEP"
127127+128128+ AC_SUBST(BUILD_LIBS)
129129+ AC_SUBST(BUILD_LIB_DEPS)
130130+131131+ # Horrible hacks to build DLLs on Windows and a shared library elsewhere.
132132+ SHARED_LDFLAGS=
133133+-SHARED_LIBADD=
134134++SHARED_LIBADD=-liberty
135135+ SHARED_DEPENDENCIES=
136136+ if test "$enable_shared" = "yes"; then
137137+-# When building a shared libopcodes, link against the pic version of libiberty
138138+-# so that apps that use libopcodes won't need libiberty just to satisfy any
139139+-# libopcodes references.
140140+-# We can't do that if a pic libiberty is unavailable since including non-pic
141141+-# code would insert text relocations into libopcodes.
142142+ # Note that linking against libbfd as we do here, which is itself linked
143143+ # against libiberty, may not satisfy all the libopcodes libiberty references
144144+ # since libbfd may not pull in the entirety of libiberty.
145145+-changequote(,)dnl
146146+- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
147147+-changequote([,])dnl
148148+- if test -n "$x"; then
149149+- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
150150+- fi
151151+-
152152+ case "${host}" in
153153+ *-*-cygwin*)
154154+ SHARED_LDFLAGS="-no-undefined"
155155+- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
156156++ SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin"
157157+ ;;
158158+- *-*-darwin*)
159159+- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
160160+- SHARED_DEPENDENCIES="../bfd/libbfd.la"
161161+- ;;
162162+ *)
163163+- case "$host_vendor" in
164164+- hp)
165165+- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
166166+- ;;
167167+- *)
168168+- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
169169+- ;;
170170+- esac
171171+- SHARED_DEPENDENCIES="../bfd/libbfd.la"
172172++ SHARED_LIBADD="-lbfd ${SHARED_LIBADD}"
173173+ ;;
174174+ esac
175175+176176+--
177177+2.14.2
178178+
+19-12
pkgs/development/tools/misc/binutils/default.nix
···4848 # there) and causes a cycle between the lib and bin outputs, so
4949 # get rid of it.
5050 ./no-plugins.patch
5151+5252+ # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and
5353+ # elf32-littlearm-vxworks in favor of the first.
5454+ # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766
5555+ ./disambiguate-arm-targets.patch
5156 ];
52575353- outputs = [ "out" ]
5454- ++ optional (targetPlatform == hostPlatform && !hostPlatform.isDarwin) "lib" # problems in Darwin stdenv
5555- ++ [ "info" ]
5656- ++ optional (targetPlatform == hostPlatform) "dev";
5858+ outputs = [ "out" "info" ];
57595858- nativeBuildInputs = [ bison ]
5959- ++ optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc;
6060+ nativeBuildInputs = [ bison buildPackages.stdenv.cc ];
6061 buildInputs = [ zlib ];
61626263 inherit noSysDirs;
···8788 then []
8889 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
89909090- configureFlags =
9191- [ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ]
9292- ++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
9393- ++ optionals gold [ "--enable-gold" "--enable-plugins" ]
9494- ++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";
9191+ configureFlags = [
9292+ "--enable-targets=all" "--enable-64-bit-bfd"
9393+ "--disable-install-libbfd"
9494+ "--disable-shared" "--enable-static"
9595+ "--with-system-zlib"
9696+9797+ "--enable-deterministic-archives"
9898+ "--disable-werror"
9999+ "--enable-fix-loongson2f-nop"
100100+ ] ++ optionals gold [ "--enable-gold" "--enable-plugins" ];
9510196102 enableParallelBuilding = true;
9710398104 passthru = {
9999- inherit prefix;
105105+ inherit prefix version;
100106 };
101107102108 meta = with stdenv.lib; {
···109115 '';
110116 homepage = http://www.gnu.org/software/binutils/;
111117 license = licenses.gpl3Plus;
118118+ maintainers = with maintainers; [ ericson2314 ];
112119 platforms = platforms.unix;
113120114121 /* Give binutils a lower priority than gcc-wrapper to prevent a
···3737 ln -sf "${cctools}/bin/$i" "$out/bin/$i"
3838 done
39394040- for i in ${stdenv.lib.getDev binutils-raw}/include/*.h; do
4141- ln -s "$i" "$out/include/$(basename $i)"
4242- done
4343-4444- for i in ${cctools}/include/*; do
4545- ln -s "$i" "$out/include/$(basename $i)"
4646- done
4747-4840 # FIXME: this will give us incorrect man pages for bits of cctools
4941 ln -s ${binutils-raw.out}/share $out/share
5050- ln -s ${binutils-raw.out}/lib $out/lib
51425243 ln -s ${cctools}/libexec $out/libexec
5344 '';
+8
pkgs/os-specific/darwin/cctools/port.nix
···2929 sha256 = "0l45mvyags56jfi24rawms8j2ihbc45mq7v13pkrrwppghqrdn52";
3030 };
31313232+ outputs = [ "out" "dev" ];
3333+3234 nativeBuildInputs = [ autoconf automake libtool_2 ];
3335 buildInputs = [ libuuid ] ++
3436 # Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang)
···37393840 patches = [
3941 ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
4242+ ];
4343+4444+ __propagatedImpureHostDeps = [
4545+ # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
4646+ "/usr/lib/libobjc.A.dylib"
4747+ "/usr/lib/libobjc.dylib"
4048 ];
41494250 enableParallelBuilding = true;
···11-(define TMPDIR (param "_GLOBAL_TMP_DIR"))
22-33-; obvious
44-(allow process-fork)
55-66-; allow reading system information like #CPUs, etc.
77-(allow sysctl-read)
88-99-; IPC
1010-(allow ipc-posix*)
1111-1212-; Unix sockets
1313-(allow system-socket)
1414-1515-; all runtime dependencies of libSystem.dylib
1616-(allow file-read*
1717- (literal "/usr/lib/libSystem.dylib")
1818- (literal "/usr/lib/libSystem.B.dylib")
1919- (literal "/usr/lib/libobjc.A.dylib")
2020- (literal "/usr/lib/libobjc.dylib")
2121- (literal "/usr/lib/libauto.dylib")
2222- (literal "/usr/lib/libc++abi.dylib")
2323- (literal "/usr/lib/libc++.1.dylib")
2424- (literal "/usr/lib/libDiagnosticMessagesClient.dylib")
2525- (subpath "/usr/lib/system"))
2626-2727-; tmp
2828-(allow file* process-exec (literal "/tmp") (subpath TMPDIR))
2929-3030-; clang likes to read the system version
3131-(allow file-read* (literal "/System/Library/CoreServices/SystemVersion.plist"))
3232-3333-; used for bootstrap builders
3434-(allow process-exec* (literal "/bin/sh"))
3535-3636-; without this line clang cannot write to /dev/null, breaking some configure tests
3737-(allow file-read-metadata (literal "/dev"))
3838-3939-; standard devices
4040-(allow file*
4141- (literal "/dev/null")
4242- (literal "/dev/random")
4343- (literal "/dev/stdin")
4444- (literal "/dev/stdout")
4545- (literal "/dev/tty")
4646- (literal "/dev/urandom")
4747- (literal "/dev/zero")
4848- (subpath "/dev/fd"))
4949-5050-; does nothing, but reduces build noise
5151-(allow file* (literal "/dev/dtracehelper"))
5252-5353-; ICU data and zoneinfo data are hardcoded
5454-; both are in libicucore and zoneinfo is in libsystem_c as well
5555-(allow file-read* (subpath "/usr/share/icu") (subpath "/usr/share/zoneinfo"))
5656-5757-; no idea what this is
5858-(allow file-read-data (literal "/dev/autofs_nowait"))
5959-6060-; lots of autoconf projects want to list this directory
6161-(allow file-read-metadata (literal "/var") (literal "/private/var/tmp"))
6262-6363-; send signals
6464-(allow signal (target same-sandbox))
6565-6666-; allow getpwuid (for git and other packages)
6767-(allow mach-lookup
6868- (global-name "com.apple.system.notification_center")
6969- (global-name "com.apple.system.opendirectoryd.libinfo"))
7070-7171-; allow networking on localhost
7272-(allow network* (local ip) (remote unix-socket))
+20-8
pkgs/stdenv/generic/setup.sh
···324324 exit 1
325325 fi
326326327327+ if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
328328+ local pkgNext
329329+ for pkgNext in $(< "$pkg/nix-support/$propagatedBuildInputsFile"); do
330330+ findInputs "$pkgNext" "$var" "$propagatedBuildInputsFile"
331331+ done
332332+ fi
333333+}
334334+335335+# Add package to the future PATH and run setup hooks
336336+activatePackage() {
337337+ local pkg="$1"
338338+327339 if [ -f "$pkg" ]; then
328340 local oldOpts="$(shopt -po nounset)"
329341 set +u
···341353 source "$pkg/nix-support/setup-hook"
342354 eval "$oldOpts"
343355 fi
344344-345345- if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
346346- local pkgNext
347347- for pkgNext in $(< "$pkg/nix-support/$propagatedBuildInputsFile"); do
348348- findInputs "$pkgNext" "$var" "$propagatedBuildInputsFile"
349349- done
350350- fi
351356}
352357353358declare -a nativePkgs crossPkgs
···359364 ${propagatedNativeBuildInputs:-} ${propagatedBuildInputs:-}; do
360365 findInputs "$i" nativePkgs propagated-native-build-inputs
361366 done
367367+368368+ for i in "${nativePkgs[@]}"; do
369369+ activatePackage "$i"
370370+ done
362371else
363372 for i in ${buildInputs:-} ${defaultBuildInputs:-} ${propagatedBuildInputs:-}; do
364373 findInputs "$i" crossPkgs propagated-build-inputs
365374 done
366375367367- declare -a nativePkgs
368376 for i in ${nativeBuildInputs:-} ${defaultNativeBuildInputs:-} ${propagatedNativeBuildInputs:-}; do
369377 findInputs "$i" nativePkgs propagated-native-build-inputs
378378+ done
379379+380380+ for i in "${nativePkgs[@]}" "${crossPkgs[@]}"; do
381381+ activatePackage "$i"
370382 done
371383fi
372384
-1
pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
···179179 for i in as ld ar ranlib nm strip readelf objdump; do
180180 cp ${binutils.out}/bin/$i $out/bin
181181 done
182182- cp -d ${binutils.lib}/lib/lib*.so* $out/lib
183182184183 chmod -R u+w $out
185184
-1
pkgs/stdenv/linux/make-bootstrap-tools.nix
···128128 for i in as ld ar ranlib nm strip readelf objdump; do
129129 cp ${binutils.out}/bin/$i $out/bin
130130 done
131131- cp -d ${binutils.lib}/lib/lib*.so* $out/lib
132131133132 chmod -R u+w $out
134133
+4-4
pkgs/tools/filesystems/grive/default.nix
···11-{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, binutils }:
11+{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, libiberty }:
2233stdenv.mkDerivation rec {
44 version = "0.3.0";
···1010 sha256 = "11cqfcjl128nfg1rjvpvr9x1x2ch3kyliw4vi14n51zqp82f9ysb";
1111 };
12121313- buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost];
1313+ buildInputs = [cmake libgcrypt json_c curl expat stdenv libiberty boost];
14141515- # work around new binutils headers, see
1616- # http://stackoverflow.com/questions/11748035/binutils-bfd-h-wants-config-h-now
1515+ # work around new libiberty headers, see
1616+ # http://stackoverflow.com/questions/11748035/libiberty-bfd-h-wants-config-h-now
1717 prePatch = ''
1818 sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \
1919 libgrive/src/bfd/SymbolInfo.cc
···2828 "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
2929 ];
30303131+ preConfigure = ''
3232+ configureFlagsArray+=("--with-sections=1 n l 8 3 0 2 5 4 9 6 7")
3333+ '';
3434+3135 postInstall = ''
3236 # apropos/whatis uses program name to decide whether to act like apropos or whatis
3337 # (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to
···15151616 preConfigure = ''
1717 sed -i 's#\$djvulibre_bin_path#${djvulibre.bin}/bin#g' configure
1818+1919+ # Configure skips the failing check for usability of windres when it is nonempty.
2020+ unset WINDRES
1821 '';
2222+2323+ enableParallelBuilding = true;
19242025 meta = with stdenv.lib; {
2126 description = "Creates djvu files from PDF files";