···3333# To troubleshoot a binary wrapper after you compiled it,
3434# use the `strings` command or open the binary file in a text editor.
3535makeWrapper() {
3636+ local NIX_CFLAGS_COMPILE= NIX_CFLAGS_LINK=
3637 local original="$1"
3738 local wrapper="$2"
3839 shift 2
···4445 makeDocumentedCWrapper "$original" "$@" | \
4546 @CC@ \
4647 -Wall -Werror -Wpedantic \
4848+ -Wno-overlength-strings \
4749 -Os \
4850 -x c \
4951 -o "$wrapper" -
···11-{ runCommand
22-}:
11+{ lib, runCommand }:
3243rec {
54 runTest = name: body: runCommand name { } ''
···1918 '';
20192120 expectSomeLineContainingYInFileXToMentionZ = file: filter: expected: ''
2222- if ! cat "${file}" | grep "${filter}"; then
2323- ${fail "The file “${file}” should include a line containing “${filter}”."}
2121+ file=${lib.escapeShellArg file} filter=${lib.escapeShellArg filter} expected=${lib.escapeShellArg expected}
2222+2323+ if ! grep --text --quiet "$filter" "$file"; then
2424+ ${fail "The file “$file” should include a line containing “$filter”."}
2425 fi
25262626- if ! cat "${file}" | grep "${filter}" | grep ${expected}; then
2727- ${fail "The file “${file}” should include a line containing “${filter}” that also contains “${expected}”."}
2727+ if ! grep --text "$filter" "$file" | grep --text --quiet "$expected"; then
2828+ ${fail "The file “$file” should include a line containing “$filter” that also contains “$expected”."}
2829 fi
2930 '';
3031}
+10-2
pkgs/development/compilers/gcc/11/default.nix
···5252with builtins;
53535454let majorVersion = "11";
5555- version = "${majorVersion}.2.0";
5555+ # The patch below for aarch64-darwin does not apply to 11.3.0 and an
5656+ # updated version is not available. Keep aarch64-darwin on 11.2.0 so the
5757+ # large body of packages which depend on gfortran are still functional
5858+ # until GCC 12 is the default.
5959+ # On x86_64-darwin, building libgcc suffers from some different issues with 11.3.0.
6060+ version = if stdenv.isDarwin then
6161+ "${majorVersion}.2.0" else "${majorVersion}.3.0";
56625763 inherit (stdenv) buildPlatform hostPlatform targetPlatform;
5864···91979298 src = fetchurl {
9399 url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
9494- sha256 = "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os=";
100100+ sha256 = if stdenv.isDarwin
101101+ then "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os="
102102+ else "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk=";
95103 };
9610497105 inherit patches;
···26262727 disabledTests = [
2828 "test_aside_basic" # times out
2929+ "test_write_timeout" # flaky, does not always time out
2930 "test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
3031 "test_ssl_outgoing" # touches network
3131- ] ++ lib.optionals (stdenv.isDarwin) [
3232+ ] ++ lib.optionals stdenv.isDarwin [
3233 "test_unix_echo" # socket bind error on hydra when built with other packages
3334 "test_unix_ssl_server" # socket bind error on hydra when built with other packages
3435 ];
···11{ lib
22, buildPythonPackage
33, fetchPypi
44+, pythonRelaxDepsHook
45, pbr
56, python-mimeparse
67, extras
···20212122 propagatedBuildInputs = [ pbr python-mimeparse extras ];
2223 buildInputs = [ traceback2 ];
2424+ nativeBuildInputs = [ pythonRelaxDepsHook ];
23252426 # testscenarios has a circular dependency on testtools
2527 doCheck = false;
2628 checkInputs = [ testscenarios ];
27292828- # testtools 2.0.0 and up has a circular run-time dependency on futures
2929- postPatch = ''
3030- substituteInPlace requirements.txt --replace "fixtures>=1.3.0" ""
3131- '';
3030+ pythonRemoveDeps = [ "fixtures" ];
32313332 meta = {
3433 description = "A set of extensions to the Python standard library's unit testing framework";
+2
pkgs/development/tools/misc/elfutils/default.nix
···8585 homepage = "https://sourceware.org/elfutils/";
8686 description = "A set of utilities to handle ELF objects";
8787 platforms = platforms.linux;
8888+ # https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html
8989+ broken = stdenv.hostPlatform.isStatic;
8890 # licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins,
8991 # but since this package isn't split that way, all three are listed.
9092 license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ];
+6-2
pkgs/development/tools/misc/help2man/default.nix
···11-{ lib, stdenv, fetchurl, perlPackages, gettext }:
11+{ lib, stdenv, fetchurl, perlPackages, gettext, libintl }:
2233# Note: this package is used for bootstrapping fetchurl, and thus
44# cannot use fetchpatch! All mutable patches (generated by GitHub or
···1717 strictDeps = true;
18181919 nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ];
2020- buildInputs = [ perlPackages.LocaleGettext ];
2020+ buildInputs = [ perlPackages.LocaleGettext libintl ];
2121+2222+ configureFlags = [
2323+ "--enable-nls"
2424+ ];
21252226 doCheck = false; # target `check' is missing
2327
+1-4
pkgs/development/tools/pandoc/default.nix
···1313 remove-references-to \
1414 -t ${haskellPackages.pandoc-types} \
1515 $out/bin/pandoc
1616- remove-references-to \
1717- -t ${haskellPackages.HTTP} \
1818- $out/bin/pandoc
1916 '';
2017 }) static).overrideAttrs (drv: {
2118 # These libraries are still referenced, because they generate
···2522 # lead to a transitive runtime dependency on the whole GHC distribution.
2623 # This should ideally be fixed in haskellPackages (or even Cabal),
2724 # but a minimal pandoc is important enough to patch it manually.
2828- disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.HTTP ];
2525+ disallowedReferences = [ haskellPackages.pandoc-types ];
2926 })
···666666 rm -rf $out/share/doc
667667 '';
668668669669+ # Avoid *.EFI binary stripping. At least on aarch64-linux strip
670670+ # removes too much from PE32+ files:
671671+ # https://github.com/NixOS/nixpkgs/issues/169693
672672+ # The hack is to move EFI file out of lib/ before doStrip
673673+ # run and return it after doStrip run.
674674+ preFixup = lib.optionalString withEfi ''
675675+ mv $out/lib/systemd/boot/efi $out/dont-strip-me
676676+ '';
677677+ postFixup = lib.optionalString withEfi ''
678678+ mv $out/dont-strip-me $out/lib/systemd/boot/efi
679679+ '';
680680+669681 passthru = {
670682 # The interface version prevents NixOS from switching to an
671683 # incompatible systemd at runtime. (Switching across reboots is
···687699 description = "A system and service manager for Linux";
688700 license = licenses.lgpl21Plus;
689701 platforms = platforms.linux;
702702+ # https://github.com/systemd/systemd/issues/20600#issuecomment-912338965
703703+ broken = stdenv.hostPlatform.isStatic;
690704 priority = 10;
691705 maintainers = with maintainers; [ flokli kloenk mic92 ];
692706 };