···33# To troubleshoot a binary wrapper after you compiled it,
34# use the `strings` command or open the binary file in a text editor.
35makeWrapper() {
036 local original="$1"
37 local wrapper="$2"
38 shift 2
···44 makeDocumentedCWrapper "$original" "$@" | \
45 @CC@ \
46 -Wall -Werror -Wpedantic \
047 -Os \
48 -x c \
49 -o "$wrapper" -
···33# To troubleshoot a binary wrapper after you compiled it,
34# use the `strings` command or open the binary file in a text editor.
35makeWrapper() {
36+ local NIX_CFLAGS_COMPILE= NIX_CFLAGS_LINK=
37 local original="$1"
38 local wrapper="$2"
39 shift 2
···45 makeDocumentedCWrapper "$original" "$@" | \
46 @CC@ \
47 -Wall -Werror -Wpedantic \
48+ -Wno-overlength-strings \
49 -Os \
50 -x c \
51 -o "$wrapper" -
···1-{ runCommand
2-}:
34rec {
5 runTest = name: body: runCommand name { } ''
···19 '';
2021 expectSomeLineContainingYInFileXToMentionZ = file: filter: expected: ''
22- if ! cat "${file}" | grep "${filter}"; then
23- ${fail "The file “${file}” should include a line containing “${filter}”."}
0024 fi
2526- if ! cat "${file}" | grep "${filter}" | grep ${expected}; then
27- ${fail "The file “${file}” should include a line containing “${filter}” that also contains “${expected}”."}
28 fi
29 '';
30}
···1+{ lib, runCommand }:
023rec {
4 runTest = name: body: runCommand name { } ''
···18 '';
1920 expectSomeLineContainingYInFileXToMentionZ = file: filter: expected: ''
21+ file=${lib.escapeShellArg file} filter=${lib.escapeShellArg filter} expected=${lib.escapeShellArg expected}
22+23+ if ! grep --text --quiet "$filter" "$file"; then
24+ ${fail "The file “$file” should include a line containing “$filter”."}
25 fi
2627+ if ! grep --text "$filter" "$file" | grep --text --quiet "$expected"; then
28+ ${fail "The file “$file” should include a line containing “$filter” that also contains “$expected”."}
29 fi
30 '';
31}
···52with builtins;
5354let majorVersion = "11";
55+ # The patch below for aarch64-darwin does not apply to 11.3.0 and an
56+ # updated version is not available. Keep aarch64-darwin on 11.2.0 so the
57+ # large body of packages which depend on gfortran are still functional
58+ # until GCC 12 is the default.
59+ # On x86_64-darwin, building libgcc suffers from some different issues with 11.3.0.
60+ version = if stdenv.isDarwin then
61+ "${majorVersion}.2.0" else "${majorVersion}.3.0";
6263 inherit (stdenv) buildPlatform hostPlatform targetPlatform;
64···9798 src = fetchurl {
99 url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
100+ sha256 = if stdenv.isDarwin
101+ then "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os="
102+ else "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk=";
103 };
104105 inherit patches;
···12 args+="$setupPyGlobalFlags"
13 fi
14 if [ -n "$enableParallelBuilding" ]; then
15- setupPyBuildFlags+="--parallel $NIX_BUILD_CORES"
16 fi
17 if [ -n "$setupPyBuildFlags" ]; then
18- args+="build_ext $setupPyBuildFlags"
19 fi
20 eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel"
21
···12 args+="$setupPyGlobalFlags"
13 fi
14 if [ -n "$enableParallelBuilding" ]; then
15+ setupPyBuildFlags+=" --parallel $NIX_BUILD_CORES"
16 fi
17 if [ -n "$setupPyBuildFlags" ]; then
18+ args+=" build_ext $setupPyBuildFlags"
19 fi
20 eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel"
21
···40 postPatch = ''
41 substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)"
4243- declare -a skip_tests=(
44 # test won't work in nix sandbox
45- 'test_write_disk_perms'
46 # can't be sure builder will have sparse-capable fs
47- 'test_sparse_basic'
48 # can't even be sure builder will have hardlink-capable fs
49- 'test_write_disk_hardlink'
00050 )
5152- for test_name in "''${skip_tests[@]}" ; do
53- sed -i "/$test_name/d" Makefile.am
54- rm "libarchive/test/$test_name.c"
55 done
56 '';
57
···40 postPatch = ''
41 substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)"
4243+ declare -a skip_test_paths=(
44 # test won't work in nix sandbox
45+ 'libarchive/test/test_write_disk_perms.c'
46 # can't be sure builder will have sparse-capable fs
47+ 'libarchive/test/test_sparse_basic.c'
48 # can't even be sure builder will have hardlink-capable fs
49+ 'libarchive/test/test_write_disk_hardlink.c'
50+ # access-time-related tests flakey on some systems
51+ 'cpio/test/test_option_a.c'
52+ 'cpio/test/test_option_t.c'
53 )
5455+ for test_path in "''${skip_test_paths[@]}" ; do
56+ substituteInPlace Makefile.am --replace "$test_path" ""
57+ rm "$test_path"
58 done
59 '';
60
···2627 disabledTests = [
28 "test_aside_basic" # times out
029 "test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
30 "test_ssl_outgoing" # touches network
31- ] ++ lib.optionals (stdenv.isDarwin) [
32 "test_unix_echo" # socket bind error on hydra when built with other packages
33 "test_unix_ssl_server" # socket bind error on hydra when built with other packages
34 ];
···2627 disabledTests = [
28 "test_aside_basic" # times out
29+ "test_write_timeout" # flaky, does not always time out
30 "test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
31 "test_ssl_outgoing" # touches network
32+ ] ++ lib.optionals stdenv.isDarwin [
33 "test_unix_echo" # socket bind error on hydra when built with other packages
34 "test_unix_ssl_server" # socket bind error on hydra when built with other packages
35 ];
···1{ lib
2, buildPythonPackage
3, fetchPypi
04, pbr
5, python-mimeparse
6, extras
···2021 propagatedBuildInputs = [ pbr python-mimeparse extras ];
22 buildInputs = [ traceback2 ];
02324 # testscenarios has a circular dependency on testtools
25 doCheck = false;
26 checkInputs = [ testscenarios ];
2728- # testtools 2.0.0 and up has a circular run-time dependency on futures
29- postPatch = ''
30- substituteInPlace requirements.txt --replace "fixtures>=1.3.0" ""
31- '';
3233 meta = {
34 description = "A set of extensions to the Python standard library's unit testing framework";
···1{ lib
2, buildPythonPackage
3, fetchPypi
4+, pythonRelaxDepsHook
5, pbr
6, python-mimeparse
7, extras
···2122 propagatedBuildInputs = [ pbr python-mimeparse extras ];
23 buildInputs = [ traceback2 ];
24+ nativeBuildInputs = [ pythonRelaxDepsHook ];
2526 # testscenarios has a circular dependency on testtools
27 doCheck = false;
28 checkInputs = [ testscenarios ];
2930+ pythonRemoveDeps = [ "fixtures" ];
0003132 meta = {
33 description = "A set of extensions to the Python standard library's unit testing framework";
+2
pkgs/development/tools/misc/elfutils/default.nix
···85 homepage = "https://sourceware.org/elfutils/";
86 description = "A set of utilities to handle ELF objects";
87 platforms = platforms.linux;
0088 # licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins,
89 # but since this package isn't split that way, all three are listed.
90 license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ];
···85 homepage = "https://sourceware.org/elfutils/";
86 description = "A set of utilities to handle ELF objects";
87 platforms = platforms.linux;
88+ # https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html
89+ broken = stdenv.hostPlatform.isStatic;
90 # licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins,
91 # but since this package isn't split that way, all three are listed.
92 license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ];
+6-2
pkgs/development/tools/misc/help2man/default.nix
···1-{ lib, stdenv, fetchurl, perlPackages, gettext }:
23# Note: this package is used for bootstrapping fetchurl, and thus
4# cannot use fetchpatch! All mutable patches (generated by GitHub or
···17 strictDeps = true;
1819 nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ];
20- buildInputs = [ perlPackages.LocaleGettext ];
00002122 doCheck = false; # target `check' is missing
23
···1+{ lib, stdenv, fetchurl, perlPackages, gettext, libintl }:
23# Note: this package is used for bootstrapping fetchurl, and thus
4# cannot use fetchpatch! All mutable patches (generated by GitHub or
···17 strictDeps = true;
1819 nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ];
20+ buildInputs = [ perlPackages.LocaleGettext libintl ];
21+22+ configureFlags = [
23+ "--enable-nls"
24+ ];
2526 doCheck = false; # target `check' is missing
27
+1-4
pkgs/development/tools/pandoc/default.nix
···13 remove-references-to \
14 -t ${haskellPackages.pandoc-types} \
15 $out/bin/pandoc
16- remove-references-to \
17- -t ${haskellPackages.HTTP} \
18- $out/bin/pandoc
19 '';
20 }) static).overrideAttrs (drv: {
21 # These libraries are still referenced, because they generate
···25 # lead to a transitive runtime dependency on the whole GHC distribution.
26 # This should ideally be fixed in haskellPackages (or even Cabal),
27 # but a minimal pandoc is important enough to patch it manually.
28- disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.HTTP ];
29 })
···13 remove-references-to \
14 -t ${haskellPackages.pandoc-types} \
15 $out/bin/pandoc
00016 '';
17 }) static).overrideAttrs (drv: {
18 # These libraries are still referenced, because they generate
···22 # lead to a transitive runtime dependency on the whole GHC distribution.
23 # This should ideally be fixed in haskellPackages (or even Cabal),
24 # but a minimal pandoc is important enough to patch it manually.
25+ disallowedReferences = [ haskellPackages.pandoc-types ];
26 })
···666 rm -rf $out/share/doc
667 '';
668000000000000669 passthru = {
670 # The interface version prevents NixOS from switching to an
671 # incompatible systemd at runtime. (Switching across reboots is
···687 description = "A system and service manager for Linux";
688 license = licenses.lgpl21Plus;
689 platforms = platforms.linux;
00690 priority = 10;
691 maintainers = with maintainers; [ flokli kloenk mic92 ];
692 };
···666 rm -rf $out/share/doc
667 '';
668669+ # Avoid *.EFI binary stripping. At least on aarch64-linux strip
670+ # removes too much from PE32+ files:
671+ # https://github.com/NixOS/nixpkgs/issues/169693
672+ # The hack is to move EFI file out of lib/ before doStrip
673+ # run and return it after doStrip run.
674+ preFixup = lib.optionalString withEfi ''
675+ mv $out/lib/systemd/boot/efi $out/dont-strip-me
676+ '';
677+ postFixup = lib.optionalString withEfi ''
678+ mv $out/dont-strip-me $out/lib/systemd/boot/efi
679+ '';
680+681 passthru = {
682 # The interface version prevents NixOS from switching to an
683 # incompatible systemd at runtime. (Switching across reboots is
···699 description = "A system and service manager for Linux";
700 license = licenses.lgpl21Plus;
701 platforms = platforms.linux;
702+ # https://github.com/systemd/systemd/issues/20600#issuecomment-912338965
703+ broken = stdenv.hostPlatform.isStatic;
704 priority = 10;
705 maintainers = with maintainers; [ flokli kloenk mic92 ];
706 };