From 074f6d9d848dc2672b71b82683de67f4dab9c30b Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 10 Apr 2020 19:47:44 -0400 Subject: tests.texlive: init --- pkgs/test/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkgs/test/default.nix') diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index c248eebaec3..85142090dd4 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -39,5 +39,7 @@ with pkgs; patch-shebangs = callPackage ./patch-shebangs {}; + texlive = callPackage ./texlive {}; + writers = callPackage ../build-support/writers/test.nix {}; } -- cgit 1.4.1 From 03c9f6a647b45bf8d9b03094c43ba0467269fba4 Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Thu, 7 May 2020 18:09:04 -0700 Subject: installShellFiles: Add test suite --- pkgs/build-support/install-shell-files/default.nix | 12 +- pkgs/test/default.nix | 2 + pkgs/test/install-shell-files/default.nix | 125 +++++++++++++++++++++ 3 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 pkgs/test/install-shell-files/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/build-support/install-shell-files/default.nix b/pkgs/build-support/install-shell-files/default.nix index e1f2e24dd87..d50661ddc65 100644 --- a/pkgs/build-support/install-shell-files/default.nix +++ b/pkgs/build-support/install-shell-files/default.nix @@ -1,4 +1,12 @@ -{ makeSetupHook }: +{ makeSetupHook, tests }: # See the header comment in ../setup-hooks/install-shell-files.sh for example usage. -makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh +let + setupHook = makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh; +in + +setupHook.overrideAttrs (oldAttrs: { + passthru = (oldAttrs.passthru or {}) // { + tests = tests.install-shell-files; + }; +}) diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index c248eebaec3..8322751089f 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -27,6 +27,8 @@ with pkgs; cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; }; cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; }; + install-shell-files = callPackage ./install-shell-files {}; + kernel-config = callPackage ./kernel.nix {}; ld-library-path = callPackage ./ld-library-path {}; diff --git a/pkgs/test/install-shell-files/default.nix b/pkgs/test/install-shell-files/default.nix new file mode 100644 index 00000000000..e3729c7d250 --- /dev/null +++ b/pkgs/test/install-shell-files/default.nix @@ -0,0 +1,125 @@ +{ stdenv, runCommandLocal, recurseIntoAttrs, installShellFiles }: + +let + runTest = name: env: buildCommand: + runCommandLocal "install-shell-files--${name}" ({ + nativeBuildInputs = [ installShellFiles ]; + meta.platforms = stdenv.lib.platforms.all; + } // env) buildCommand; +in + +recurseIntoAttrs { + # installManPage + + install-manpage = runTest "install-manpage" {} '' + mkdir -p doc + echo foo > doc/foo.1 + echo bar > doc/bar.2.gz + echo baz > doc/baz.3 + + installManPage doc/* + + cmp doc/foo.1 $out/share/man/man1/foo.1 + cmp doc/bar.2.gz $out/share/man/man2/bar.2.gz + cmp doc/baz.3 $out/share/man/man3/baz.3 + ''; + install-manpage-outputs = runTest "install-manpage-outputs" { + outputs = [ "out" "man" "devman" ]; + } '' + mkdir -p doc + echo foo > doc/foo.1 + echo bar > doc/bar.3 + + installManPage doc/* + + # assert they didn't go into $out + [[ ! -f $out/share/man/man1/foo.1 && ! -f $out/share/man/man3/bar.3 ]] + + # foo.1 alone went into man + cmp doc/foo.1 ''${!outputMan:?}/share/man/man1/foo.1 + [[ ! -f ''${!outputMan:?}/share/man/man3/bar.3 ]] + + # bar.3 alone went into devman + cmp doc/bar.3 ''${!outputDevman:?}/share/man/man3/bar.3 + [[ ! -f ''${!outputDevman:?}/share/man/man1/foo.1 ]] + + touch $out + ''; + + # installShellCompletion + + install-completion = runTest "install-completion" {} '' + echo foo > foo + echo bar > bar + echo baz > baz + echo qux > qux.zsh + echo quux > quux + + installShellCompletion --bash foo bar --zsh baz qux.zsh --fish quux + + cmp foo $out/share/bash-completion/completions/foo + cmp bar $out/share/bash-completion/completions/bar + cmp baz $out/share/zsh/site-functions/_baz + cmp qux.zsh $out/share/zsh/site-functions/_qux + cmp quux $out/share/fish/vendor_completions.d/quux + ''; + install-completion-output = runTest "install-completion-output" { + outputs = [ "out" "bin" ]; + } '' + echo foo > foo + + installShellCompletion --bash foo + + # assert it didn't go into $out + [[ ! -f $out/share/bash-completion/completions/foo ]] + + cmp foo ''${!outputBin:?}/share/bash-completion/completions/foo + + touch $out + ''; + install-completion-name = runTest "install-completion-name" {} '' + echo foo > foo + echo bar > bar + echo baz > baz + + installShellCompletion --bash --name foobar.bash foo --zsh --name _foobar bar --fish baz + + cmp foo $out/share/bash-completion/completions/foobar.bash + cmp bar $out/share/zsh/site-functions/_foobar + cmp baz $out/share/fish/vendor_completions.d/baz + ''; + install-completion-inference = runTest "install-completion-inference" {} '' + echo foo > foo.bash + echo bar > bar.zsh + echo baz > baz.fish + + installShellCompletion foo.bash bar.zsh baz.fish + + cmp foo.bash $out/share/bash-completion/completions/foo.bash + cmp bar.zsh $out/share/zsh/site-functions/_bar + cmp baz.fish $out/share/fish/vendor_completions.d/baz.fish + ''; + install-completion-cmd = runTest "install-completion-cmd" {} '' + echo foo > foo.bash + echo bar > bar.zsh + echo baz > baz.fish + echo qux > qux.fish + + installShellCompletion --cmd foobar --bash foo.bash --zsh bar.zsh --fish baz.fish --name qux qux.fish + + cmp foo.bash $out/share/bash-completion/completions/foobar.bash + cmp bar.zsh $out/share/zsh/site-functions/_foobar + cmp baz.fish $out/share/fish/vendor_completions.d/foobar.fish + cmp qux.fish $out/share/fish/vendor_completions.d/qux + ''; + install-completion-fifo = runTest "install-completion-fifo" {} '' + installShellCompletion \ + --bash --name foo.bash <(echo foo) \ + --zsh --name _foo <(echo bar) \ + --fish --name foo.fish <(echo baz) + + [[ $(<$out/share/bash-completion/completions/foo.bash) == foo ]] || { echo "foo.bash comparison failed"; exit 1; } + [[ $(<$out/share/zsh/site-functions/_foo) == bar ]] || { echo "_foo comparison failed"; exit 1; } + [[ $(<$out/share/fish/vendor_completions.d/foo.fish) == baz ]] || { echo "foo.fish comparison failed"; exit 1; } + ''; +} -- cgit 1.4.1 From 116ac11652659c0f896fda4a2477152b92e5326a Mon Sep 17 00:00:00 2001 From: Aaron Janse Date: Sat, 17 Oct 2020 00:43:33 -0700 Subject: add test --- pkgs/test/default.nix | 2 ++ pkgs/test/rust-sysroot/default.nix | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/test/rust-sysroot/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 85142090dd4..c0a810fa01a 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -35,6 +35,8 @@ with pkgs; cross = callPackage ./cross {}; + rustCustomSysroot = callPackage ./rust-sysroot {}; + nixos-functions = callPackage ./nixos-functions {}; patch-shebangs = callPackage ./patch-shebangs {}; diff --git a/pkgs/test/rust-sysroot/default.nix b/pkgs/test/rust-sysroot/default.nix new file mode 100644 index 00000000000..c6e9ecb89d9 --- /dev/null +++ b/pkgs/test/rust-sysroot/default.nix @@ -0,0 +1,41 @@ +{ rustPlatform, fetchFromGitHub, writeText }: + +rustPlatform.buildRustPackage rec { + name = "blog_os-sysroot-test"; + + src = fetchFromGitHub { + owner = "phil-opp"; + repo = "blog_os"; + rev = "4e38e7ddf8dd021c3cd7e4609dfa01afb827797b"; + sha256 = "0k9ipm9ddm1bad7bs7368wzzp6xwrhyfzfpckdax54l4ffqwljcg"; + }; + + cargoSha256 = "1cbcplgz28yxshyrp2krp1jphbrcqdw6wxx3rry91p7hiqyibd30"; + + # The book uses rust-lld for linking, but rust-lld is not currently packaged for NixOS. + # The justification in the book for using rust-lld suggests that gcc can still be used for testing: + # > Instead of using the platform's default linker (which might not support Linux targets), + # > we use the cross platform LLD linker that is shipped with Rust for linking our kernel. + # https://github.com/phil-opp/blog_os/blame/7212ffaa8383122b1eb07fe1854814f99d2e1af4/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md#L157 + target = writeText "x86_64-blog_os.json" '' + { + "llvm-target": "x86_64-unknown-none", + "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", + "arch": "x86_64", + "target-endian": "little", + "target-pointer-width": "64", + "target-c-int-width": "32", + "os": "none", + "executables": true, + "linker-flavor": "gcc", + "panic-strategy": "abort", + "disable-redzone": true, + "features": "-mmx,-sse,+soft-float" + } + ''; + + RUSTFLAGS = "-C link-arg=-nostartfiles"; + + # Tests don't work for `no_std`. See https://os.phil-opp.com/testing/ + doCheck = false; +} -- cgit 1.4.1 From c778945806b44d46ec16bc4302e7e7163e6bab97 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 25 Oct 2020 09:38:02 +0100 Subject: Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2" I'm sorry; I didn't notice it contained staging commits. This reverts commit 17f5305b6c20df795c365368d2d868266519599e, reversing changes made to a8a018ddc0a8b5c3d4fa94c94b672c37356bc075. --- doc/stdenv/stdenv.xml | 7 +- .../graphics/graphicsmagick/default.nix | 6 +- pkgs/applications/misc/klayout/default.nix | 2 +- pkgs/applications/science/logic/z3/default.nix | 3 +- .../git-and-tools/git/default.nix | 4 +- pkgs/build-support/install-shell-files/default.nix | 12 +- .../setup-hooks/install-shell-files.sh | 125 +-- pkgs/data/misc/tzdata/default.nix | 6 +- pkgs/development/compilers/dmd/binary.nix | 3 +- pkgs/development/compilers/gcc/builder.sh | 7 +- pkgs/development/compilers/ldc/binary.nix | 3 +- .../compilers/llvm/10/clang/default.nix | 6 +- .../compilers/llvm/10/libc++/default.nix | 5 +- .../compilers/llvm/11/clang/default.nix | 6 +- .../development/compilers/llvm/5/clang/default.nix | 6 +- .../compilers/llvm/5/libc++/default.nix | 6 +- .../development/compilers/llvm/6/clang/default.nix | 6 +- .../compilers/llvm/6/libc++/default.nix | 6 +- .../development/compilers/llvm/7/clang/default.nix | 6 +- .../compilers/llvm/7/libc++/default.nix | 7 +- .../development/compilers/llvm/8/clang/default.nix | 6 +- .../compilers/llvm/8/libc++/default.nix | 5 +- .../development/compilers/llvm/9/clang/default.nix | 6 +- .../compilers/llvm/9/libc++/default.nix | 5 +- .../compilers/purescript/psc-package/default.nix | 10 +- pkgs/development/compilers/rust/1_46.nix | 45 + pkgs/development/compilers/rust/1_47.nix | 45 - pkgs/development/compilers/rust/binary.nix | 12 +- .../interpreters/ruby/rubygems/default.nix | 4 +- pkgs/development/libraries/atk/default.nix | 5 +- pkgs/development/libraries/boost/generic.nix | 4 +- pkgs/development/libraries/cyrus-sasl/default.nix | 3 +- pkgs/development/libraries/enchant/2.x.nix | 4 +- pkgs/development/libraries/expat/default.nix | 12 +- pkgs/development/libraries/freetype/default.nix | 4 +- .../gamin/abstract-socket-namespace.patch | 73 -- pkgs/development/libraries/gamin/default.nix | 10 +- pkgs/development/libraries/gdk-pixbuf/default.nix | 4 +- pkgs/development/libraries/glfw/3.x.nix | 5 +- pkgs/development/libraries/harfbuzz/default.nix | 4 +- pkgs/development/libraries/icu/base.nix | 2 +- pkgs/development/libraries/jbig2dec/default.nix | 6 +- pkgs/development/libraries/json-glib/default.nix | 4 +- pkgs/development/libraries/leveldb/default.nix | 2 +- pkgs/development/libraries/libLAS/default.nix | 4 +- pkgs/development/libraries/libcbor/default.nix | 10 +- pkgs/development/libraries/libevent/default.nix | 5 +- pkgs/development/libraries/libinput/default.nix | 17 +- pkgs/development/libraries/libraw/default.nix | 22 +- ...CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch | 211 ++++ pkgs/development/libraries/libvpx/default.nix | 22 +- pkgs/development/libraries/libwebp/default.nix | 15 +- pkgs/development/libraries/mesa/default.nix | 7 +- ...ache-include-dri-driver-path-in-cache-key.patch | 29 +- .../mesa/link-radv-with-ld_args_build_id.patch | 25 + .../libraries/mesa/missing-includes.patch | 12 + pkgs/development/libraries/nss/3.44.nix | 6 +- pkgs/development/libraries/nss/default.nix | 5 +- pkgs/development/libraries/odpic/default.nix | 2 +- pkgs/development/libraries/openssl/default.nix | 4 +- pkgs/development/libraries/p11-kit/default.nix | 7 - pkgs/development/libraries/tiledb/default.nix | 4 +- pkgs/development/libraries/zeromq/4.x.nix | 10 +- pkgs/development/python-modules/arrow/default.nix | 4 +- .../development/python-modules/pycairo/default.nix | 24 +- .../tools/build-managers/cmake/default.nix | 19 +- .../boost-Do-not-add-system-paths-on-nix.patch | 40 - .../tools/build-managers/meson/default.nix | 5 - pkgs/development/tools/misc/ycmd/default.nix | 5 +- ...ug-702364-Fix-missing-echogs-dependencies.patch | 835 ++++++++++++++ pkgs/misc/ghostscript/default.nix | 24 +- pkgs/misc/sndio/default.nix | 4 +- pkgs/os-specific/linux/apparmor/default.nix | 13 +- pkgs/os-specific/linux/iproute/default.nix | 8 +- pkgs/os-specific/linux/libcap/default.nix | 5 +- pkgs/os-specific/linux/systemd/default.nix | 106 +- pkgs/servers/sql/mariadb/default.nix | 5 +- pkgs/servers/x11/xorg/default.nix | 36 +- pkgs/servers/x11/xorg/overrides.nix | 7 + pkgs/servers/x11/xorg/tarballs.list | 12 +- pkgs/shells/bash/bash-completion/default.nix | 4 +- pkgs/stdenv/darwin/default.nix | 5 +- pkgs/test/default.nix | 2 - pkgs/test/install-shell-files/default.nix | 125 --- pkgs/tools/compression/brotli/default.nix | 13 +- .../avoid-false-positive-in-date-debug-test.patch | 52 + .../coreutils/coreutils-8.31-android-cross.patch | 51 + .../misc/coreutils/coreutils-8.31-musl-cross.patch | 1153 ++++++++++++++++++++ pkgs/tools/misc/coreutils/default.nix | 13 +- pkgs/tools/networking/curl/default.nix | 4 +- pkgs/tools/networking/unbound/default.nix | 4 +- pkgs/tools/security/sudolikeaboss/default.nix | 5 +- pkgs/top-level/all-packages.nix | 37 +- pkgs/top-level/python-packages.nix | 2 +- 94 files changed, 2732 insertions(+), 819 deletions(-) create mode 100644 pkgs/development/compilers/rust/1_46.nix delete mode 100644 pkgs/development/compilers/rust/1_47.nix delete mode 100644 pkgs/development/libraries/gamin/abstract-socket-namespace.patch create mode 100644 pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch create mode 100644 pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch delete mode 100644 pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch create mode 100644 pkgs/misc/ghostscript/0001-Bug-702364-Fix-missing-echogs-dependencies.patch delete mode 100644 pkgs/test/install-shell-files/default.nix create mode 100644 pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch create mode 100644 pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch create mode 100644 pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch (limited to 'pkgs/test/default.nix') diff --git a/doc/stdenv/stdenv.xml b/doc/stdenv/stdenv.xml index 46ee97927ea..4c069b57edd 100644 --- a/doc/stdenv/stdenv.xml +++ b/doc/stdenv/stdenv.xml @@ -2070,7 +2070,7 @@ nativeBuildInputs = [ breakpointHook ]; The installManPage function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with .gz suffix). This function will place them into the correct directory. - The installShellCompletion function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of --bash, --fish, or --zsh. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag --name NAME before the path. If this flag is not provided, zsh completions will be renamed automatically such that foobar.zsh becomes _foobar. A root name may be provided for all paths using the flag --cmd NAME; this synthesizes the appropriate name depending on the shell (e.g. --cmd foo will synthesize the name foo.bash for bash and _foo for zsh). The path may also be a fifo or named fd (such as produced by <(cmd)), in which case the shell and name must be provided. + The installShellCompletion function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of --bash, --fish, or --zsh. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag --name NAME before the path. If this flag is not provided, zsh completions will be renamed automatically such that foobar.zsh becomes _foobar. nativeBuildInputs = [ installShellFiles ]; postInstall = '' @@ -2081,11 +2081,6 @@ postInstall = '' installShellCompletion --zsh --name _foobar share/completions.zsh # implicit behavior installShellCompletion share/completions/foobar.{bash,fish,zsh} - # using named fd - installShellCompletion --cmd foobar \ - --bash <($out/bin/foobar --bash-completion) \ - --fish <($out/bin/foobar --fish-completion) \ - --zsh <($out/bin/foobar --zsh-completion) ''; diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix index b8b21e71c93..b7a1a8c4a6f 100644 --- a/pkgs/applications/graphics/graphicsmagick/default.nix +++ b/pkgs/applications/graphics/graphicsmagick/default.nix @@ -24,10 +24,10 @@ stdenv.mkDerivation rec { buildInputs = [ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2 zlib libtool libwebp - ]; + ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - nativeBuildInputs = [ xz ] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ xz ]; postInstall = '' sed -i 's/-ltiff.*'\'/\'/ $out/bin/* diff --git a/pkgs/applications/misc/klayout/default.nix b/pkgs/applications/misc/klayout/default.nix index 0a8d7ce547f..5f6c679f3ba 100644 --- a/pkgs/applications/misc/klayout/default.nix +++ b/pkgs/applications/misc/klayout/default.nix @@ -1,6 +1,6 @@ { lib, mkDerivation, fetchFromGitHub, fetchpatch , python, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns -, which, perl, makeWrapper +, which, perl, makeWrapper, fixDarwinDylibNames }: mkDerivation rec { diff --git a/pkgs/applications/science/logic/z3/default.nix b/pkgs/applications/science/logic/z3/default.nix index dd71cf2cb1a..88aafcdae22 100644 --- a/pkgs/applications/science/logic/z3/default.nix +++ b/pkgs/applications/science/logic/z3/default.nix @@ -22,8 +22,7 @@ stdenv.mkDerivation rec { sha256 = "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx"; }; - nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ python ] + buildInputs = [ python fixDarwinDylibNames ] ++ optional javaBindings jdk ++ optionals ocamlBindings [ ocaml findlib zarith ] ; diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index c54a9160f6d..7e40366142a 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -22,7 +22,7 @@ assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; let - version = "2.29.1"; + version = "2.28.0"; svn = subversionClient.override { perlBindings = perlSupport; }; gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; @@ -34,7 +34,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; - sha256 = "1cxd2h0k6bhv25avnk40h0pahgc7vgs37dc6kmln3pfhjyb6019h"; + sha256 = "17a311vzimqn1glc9d7x82rhb1mb81m5rr4g8xji8idaafid39fz"; }; outputs = [ "out" ] ++ stdenv.lib.optional withManual "doc"; diff --git a/pkgs/build-support/install-shell-files/default.nix b/pkgs/build-support/install-shell-files/default.nix index d50661ddc65..e1f2e24dd87 100644 --- a/pkgs/build-support/install-shell-files/default.nix +++ b/pkgs/build-support/install-shell-files/default.nix @@ -1,12 +1,4 @@ -{ makeSetupHook, tests }: +{ makeSetupHook }: # See the header comment in ../setup-hooks/install-shell-files.sh for example usage. -let - setupHook = makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh; -in - -setupHook.overrideAttrs (oldAttrs: { - passthru = (oldAttrs.passthru or {}) // { - tests = tests.install-shell-files; - }; -}) +makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh diff --git a/pkgs/build-support/setup-hooks/install-shell-files.sh b/pkgs/build-support/setup-hooks/install-shell-files.sh index 194b408b105..e0ea1f7f30a 100644 --- a/pkgs/build-support/setup-hooks/install-shell-files.sh +++ b/pkgs/build-support/setup-hooks/install-shell-files.sh @@ -1,4 +1,4 @@ -# shellcheck shell=bash +#!/bin/bash # Setup hook for the `installShellFiles` package. # # Example usage in a derivation: @@ -19,8 +19,8 @@ # installManPage [...] # # Each argument is checked for its man section suffix and installed into the appropriate -# share/man/man/ directory. The function returns an error if any paths don't have the man -# section suffix (with optional .gz compression). +# share/man/ directory. The function returns an error if any paths don't have the man section +# suffix (with optional .gz compression). installManPage() { local path for path in "$@"; do @@ -49,7 +49,7 @@ installManPage() { done } -# installShellCompletion [--cmd ] ([--bash|--fish|--zsh] [--name ] )... +# installShellCompletion [--bash|--fish|--zsh] ([--name ] )... # # Each path is installed into the appropriate directory for shell completions for the given shell. # If one of `--bash`, `--fish`, or `--zsh` is given the path is assumed to belong to that shell. @@ -61,20 +61,9 @@ installManPage() { # If the shell completion needs to be renamed before installing the optional `--name ` flag # may be given. Any name provided with this flag only applies to the next path. # -# If all shell completions need to be renamed before installing the optional `--cmd ` flag -# may be given. This will synthesize a name for each file, unless overridden with an explicit -# `--name` flag. For example, `--cmd foobar` will synthesize the name `_foobar` for zsh and -# `foobar.bash` for bash. -# # For zsh completions, if the `--name` flag is not given, the path will be automatically renamed # such that `foobar.zsh` becomes `_foobar`. # -# A path may be a named fd, such as produced by the bash construct `<(cmd)`. When using a named fd, -# the shell type flag must be provided, and either the `--name` or `--cmd` flag must be provided. -# This might look something like: -# -# installShellCompletion --zsh --name _foobar <($out/bin/foobar --zsh-completion) -# # This command accepts multiple shell flags in conjunction with multiple paths if you wish to # install them all in one command: # @@ -87,16 +76,9 @@ installManPage() { # installShellCompletion --fish --name foobar.fish share/completions.fish # installShellCompletion --zsh --name _foobar share/completions.zsh # -# Or to use shell newline escaping to split a single invocation across multiple lines: -# -# installShellCompletion --cmd foobar \ -# --bash <($out/bin/foobar --bash-completion) \ -# --fish <($out/bin/foobar --fish-completion) \ -# --zsh <($out/bin/foobar --zsh-completion) -# # If any argument is `--` the remaining arguments will be treated as paths. installShellCompletion() { - local shell='' name='' cmdname='' retval=0 parseArgs=1 arg + local shell='' name='' retval=0 parseArgs=1 arg while { arg=$1; shift; }; do # Parse arguments if (( parseArgs )); then @@ -115,17 +97,6 @@ installShellCompletion() { # treat `--name=foo` the same as `--name foo` name=${arg#--name=} continue;; - --cmd) - cmdname=$1 - shift || { - echo 'installShellCompletion: error: --cmd flag expected an argument' >&2 - return 1 - } - continue;; - --cmd=*) - # treat `--cmd=foo` the same as `--cmd foo` - cmdname=${arg#--cmd=} - continue;; --?*) echo "installShellCompletion: warning: unknown flag ${arg%%=*}" >&2 retval=2 @@ -139,67 +110,39 @@ installShellCompletion() { if (( "${NIX_DEBUG:-0}" >= 1 )); then echo "installShellCompletion: installing $arg${name:+ as $name}" fi - # if we get here, this is a path or named pipe - # Identify shell and output name + # if we get here, this is a path + # Identify shell + local basename + basename=$(stripHash "$arg") local curShell=$shell - local outName='' - if [[ -z "$arg" ]]; then - echo "installShellCompletion: error: empty path is not allowed" >&2 - return 1 - elif [[ -p "$arg" ]]; then - # this is a named fd or fifo - if [[ -z "$curShell" ]]; then - echo "installShellCompletion: error: named pipe requires one of --bash, --fish, or --zsh" >&2 - return 1 - elif [[ -z "$name" && -z "$cmdname" ]]; then - echo "installShellCompletion: error: named pipe requires one of --cmd or --name" >&2 - return 1 - fi - else - # this is a path - local argbase - argbase=$(stripHash "$arg") - if [[ -z "$curShell" ]]; then - # auto-detect the shell - case "$argbase" in - ?*.bash) curShell=bash;; - ?*.fish) curShell=fish;; - ?*.zsh) curShell=zsh;; - *) - if [[ "$argbase" = _* && "$argbase" != *.* ]]; then - # probably zsh - echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2 - curShell=zsh - else - echo "installShellCompletion: warning: unknown shell for path: $arg" >&2 - retval=2 - continue - fi;; - esac - fi - outName=$argbase - fi - # Identify output path - if [[ -n "$name" ]]; then - outName=$name - elif [[ -n "$cmdname" ]]; then - case "$curShell" in - bash|fish) outName=$cmdname.$curShell;; - zsh) outName=_$cmdname;; + if [[ -z "$curShell" ]]; then + # auto-detect the shell + case "$basename" in + ?*.bash) curShell=bash;; + ?*.fish) curShell=fish;; + ?*.zsh) curShell=zsh;; *) - # Our list of shells is out of sync with the flags we accept or extensions we detect. - echo 'installShellCompletion: internal error' >&2 - return 1;; + if [[ "$basename" = _* && "$basename" != *.* ]]; then + # probably zsh + echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2 + curShell=zsh + else + echo "installShellCompletion: warning: unknown shell for path: $arg" >&2 + retval=2 + continue + fi;; esac fi - local sharePath + # Identify output path + local outName sharePath + outName=${name:-$basename} case "$curShell" in bash) sharePath=bash-completion/completions;; fish) sharePath=fish/vendor_completions.d;; zsh) sharePath=zsh/site-functions # only apply automatic renaming if we didn't have a manual rename - if [[ -z "$name" && -z "$cmdname" ]]; then + if test -z "$name"; then # convert a name like `foo.zsh` into `_foo` outName=${outName%.zsh} outName=_${outName#_} @@ -210,16 +153,8 @@ installShellCompletion() { return 1;; esac # Install file - local outDir="${!outputBin:?}/share/$sharePath" - local outPath="$outDir/$outName" - if [[ -p "$arg" ]]; then - # install handles named pipes on NixOS but not on macOS - mkdir -p "$outDir" \ - && cat "$arg" > "$outPath" - else - install -Dm644 -T "$arg" "$outPath" - fi || return - # Clear the per-path flags + install -Dm644 -T "$arg" "${!outputBin:?}/share/$sharePath/$outName" || return + # Clear the name, it only applies to one path name= done if [[ -n "$name" ]]; then diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index dc80580ff5e..367ee06390c 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -2,16 +2,16 @@ stdenv.mkDerivation rec { pname = "tzdata"; - version = "2020c"; + version = "2019c"; srcs = [ (fetchurl { url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz"; - sha256 = "1nab36g5ibs88wg2mzpzygi1wh5gh2al1qjvbk8sb90sbw8ar43q"; + sha256 = "0z7w1yv37cfk8yhix2cillam091vgp1j4g8fv84261q9mdnq1ivr"; }) (fetchurl { url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz"; - sha256 = "1r5zrk1k3jhhilkhrx82fd19rvysji8jk05gq5v0rndmyx07zacs"; + sha256 = "1m3y2rnf1nggxxhxplab5zdd5whvar3ijyrv7lifvm82irkd7szn"; }) ]; diff --git a/pkgs/development/compilers/dmd/binary.nix b/pkgs/development/compilers/dmd/binary.nix index 2ff2b35060b..cd3a15889b2 100644 --- a/pkgs/development/compilers/dmd/binary.nix +++ b/pkgs/development/compilers/dmd/binary.nix @@ -17,8 +17,7 @@ in mkDerivation { dontConfigure = true; dontBuild = true; - nativeBuildInputs = [ autoPatchelfHook ] - ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; propagatedBuildInputs = [ curl tzdata ] ++ lib.optional hostPlatform.isLinux glibc; installPhase = '' diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index e1c4768413f..2204744a4b5 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -287,12 +287,7 @@ postInstall() { done # Two identical man pages are shipped (moving and compressing is done later) - for i in "$out"/share/man/man1/*g++.1; do - if test -e "$i"; then - man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"` - ln -sf "$man_prefix"gcc.1 "$i" - fi - done + ln -sf gcc.1 "$out"/share/man/man1/g++.1 } genericBuild diff --git a/pkgs/development/compilers/ldc/binary.nix b/pkgs/development/compilers/ldc/binary.nix index cbdb56efb17..56d40be8619 100644 --- a/pkgs/development/compilers/ldc/binary.nix +++ b/pkgs/development/compilers/ldc/binary.nix @@ -17,8 +17,7 @@ in mkDerivation { dontConfigure = true; dontBuild = true; - nativeBuildInputs = [ autoPatchelfHook ] - ++ lib.optional hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ]; diff --git a/pkgs/development/compilers/llvm/10/clang/default.nix b/pkgs/development/compilers/llvm/10/clang/default.nix index fef7720d726..a3d6e7e402a 100644 --- a/pkgs/development/compilers/llvm/10/clang/default.nix +++ b/pkgs/development/compilers/llvm/10/clang/default.nix @@ -19,10 +19,10 @@ let ''; nativeBuildInputs = [ cmake python3 lld ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm ]; + buildInputs = [ libxml2 llvm ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++14" diff --git a/pkgs/development/compilers/llvm/10/libc++/default.nix b/pkgs/development/compilers/llvm/10/libc++/default.nix index 95711903932..651f1887553 100644 --- a/pkgs/development/compilers/llvm/10/libc++/default.nix +++ b/pkgs/development/compilers/llvm/10/libc++/default.nix @@ -21,10 +21,9 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; - buildInputs = [ libcxxabi ]; + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index 2de5f65b4a1..4f5e20cfe77 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 lld ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm ]; + buildInputs = [ libxml2 llvm ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++14" diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index b5e7b54fa5b..cd7d952243c 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -19,10 +19,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm ]; + buildInputs = [ libxml2 llvm ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/5/libc++/default.nix b/pkgs/development/compilers/llvm/5/libc++/default.nix index 9bebedbc044..f8185fc3ff4 100644 --- a/pkgs/development/compilers/llvm/5/libc++/default.nix +++ b/pkgs/development/compilers/llvm/5/libc++/default.nix @@ -25,11 +25,9 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3 - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; - buildInputs = [ libcxxabi ]; + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix index ec3effebfd7..8f6479fe2f4 100644 --- a/pkgs/development/compilers/llvm/6/clang/default.nix +++ b/pkgs/development/compilers/llvm/6/clang/default.nix @@ -19,10 +19,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm ]; + buildInputs = [ libxml2 llvm ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/6/libc++/default.nix b/pkgs/development/compilers/llvm/6/libc++/default.nix index 727a3226087..a922bcfaf0e 100644 --- a/pkgs/development/compilers/llvm/6/libc++/default.nix +++ b/pkgs/development/compilers/llvm/6/libc++/default.nix @@ -25,11 +25,9 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3 - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; - buildInputs = [ libcxxabi ]; + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index 969938681fe..905ec862ad7 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm lld ]; + buildInputs = [ libxml2 llvm lld ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/7/libc++/default.nix b/pkgs/development/compilers/llvm/7/libc++/default.nix index 76baadf1c6e..83c05cf0e63 100644 --- a/pkgs/development/compilers/llvm/7/libc++/default.nix +++ b/pkgs/development/compilers/llvm/7/libc++/default.nix @@ -24,12 +24,9 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; - nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3 - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - - buildInputs = [ libcxxabi ] ; + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index 5c1dca5e33b..2d7fc806890 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm lld ]; + buildInputs = [ libxml2 llvm lld ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix index 01e0d8e008c..9c0c7951c79 100644 --- a/pkgs/development/compilers/llvm/8/libc++/default.nix +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -25,10 +25,9 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; - buildInputs = [ libcxxabi ]; + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index cfaee05944c..81117e904d8 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; - buildInputs = [ libxml2 llvm lld ]; + buildInputs = [ libxml2 llvm lld ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/9/libc++/default.nix b/pkgs/development/compilers/llvm/9/libc++/default.nix index c9f0e6254ab..cec6de61ca9 100644 --- a/pkgs/development/compilers/llvm/9/libc++/default.nix +++ b/pkgs/development/compilers/llvm/9/libc++/default.nix @@ -21,10 +21,9 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; - buildInputs = [ libcxxabi ]; + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" diff --git a/pkgs/development/compilers/purescript/psc-package/default.nix b/pkgs/development/compilers/purescript/psc-package/default.nix index 88f7adce5a1..0bebd5d2f50 100644 --- a/pkgs/development/compilers/purescript/psc-package/default.nix +++ b/pkgs/development/compilers/purescript/psc-package/default.nix @@ -44,10 +44,12 @@ stdenv.mkDerivation rec { '' + '' chmod u-w $PSC_PACKAGE - installShellCompletion --cmd psc-package \ - --bash <($PSC_PACKAGE --bash-completion-script $PSC_PACKAGE) \ - --fish <($PSC_PACKAGE --fish-completion-script $PSC_PACKAGE) \ - --zsh <($PSC_PACKAGE --zsh-completion-script $PSC_PACKAGE) + $PSC_PACKAGE --bash-completion-script $PSC_PACKAGE > psc-package.bash + $PSC_PACKAGE --fish-completion-script $PSC_PACKAGE > psc-package.fish + $PSC_PACKAGE --zsh-completion-script $PSC_PACKAGE > _psc-package + installShellCompletion \ + psc-package.{bash,fish} \ + --zsh _psc-package ''; meta = with lib; { diff --git a/pkgs/development/compilers/rust/1_46.nix b/pkgs/development/compilers/rust/1_46.nix new file mode 100644 index 00000000000..c999b346ee6 --- /dev/null +++ b/pkgs/development/compilers/rust/1_46.nix @@ -0,0 +1,45 @@ +# New rust versions should first go to staging. +# Things to check after updating: +# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin: +# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github +# This testing can be also done by other volunteers as part of the pull +# request review, in case platforms cannot be covered. +# 2. The LLVM version used for building should match with rust upstream. +# Check the version number in the src/llvm-project git submodule in: +# https://github.com/rust-lang/rust/blob//.gitmodules +# 3. Firefox and Thunderbird should still build on x86_64-linux. + +{ stdenv, lib +, buildPackages +, newScope, callPackage +, CoreFoundation, Security +, llvmPackages +, pkgsBuildTarget, pkgsBuildBuild +, makeRustPlatform +} @ args: + +import ./default.nix { + rustcVersion = "1.46.0"; + rustcSha256 = "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"; + + # Note: the version MUST be one version prior to the version we're + # building + bootstrapVersion = "1.45.2"; + + # fetch hashes by running `print-hashes.sh 1.45.2` + bootstrapHashes = { + i686-unknown-linux-gnu = "5b2050dde23152750de89f7e59acaab6bf088d0beb5854c69c9a545fd254b936"; + x86_64-unknown-linux-gnu = "860feed955726a4d96ffe40758a110053326b9ae11c9e1ee059e9c6222f25643"; + arm-unknown-linux-gnueabihf = "ddb5f59bbdef84e0b7c83049461e003ed031dd881a4622365c3d475102535c60"; + armv7-unknown-linux-gnueabihf = "7a556581f87602705f9c89b04cce621cfbba9050b6fbe478166e91d164567531"; + aarch64-unknown-linux-gnu = "151fad66442d28a4e4786753d1afb559c4a3d359081c64769273a31c2f0f4d30"; + x86_64-apple-darwin = "6e8067624ede10aa23081d62e0086c6f42f7228cc0d00fb5ff24d4dac65249d6"; + }; + + selectRustPackage = pkgs: pkgs.rust_1_46; + + rustcPatches = [ + ]; +} + +(builtins.removeAttrs args [ "fetchpatch" ]) diff --git a/pkgs/development/compilers/rust/1_47.nix b/pkgs/development/compilers/rust/1_47.nix deleted file mode 100644 index e5cbae193bf..00000000000 --- a/pkgs/development/compilers/rust/1_47.nix +++ /dev/null @@ -1,45 +0,0 @@ -# New rust versions should first go to staging. -# Things to check after updating: -# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin: -# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github -# This testing can be also done by other volunteers as part of the pull -# request review, in case platforms cannot be covered. -# 2. The LLVM version used for building should match with rust upstream. -# Check the version number in the src/llvm-project git submodule in: -# https://github.com/rust-lang/rust/blob//.gitmodules -# 3. Firefox and Thunderbird should still build on x86_64-linux. - -{ stdenv, lib -, buildPackages -, newScope, callPackage -, CoreFoundation, Security -, llvmPackages -, pkgsBuildTarget, pkgsBuildBuild -, makeRustPlatform -} @ args: - -import ./default.nix { - rustcVersion = "1.47.0"; - rustcSha256 = "sha256-MYXfBkxHR/LIubuMRGjt1Y/0rW0HiAyHmsGxc7do2B0="; - - # Note: the version MUST be one version prior to the version we're - # building - bootstrapVersion = "1.46.0"; - - # fetch hashes by running `print-hashes.sh 1.45.2` - bootstrapHashes = { - i686-unknown-linux-gnu = "6ebd7e04dc18a36d08b9731cdb42d5caf8460e1eb41b75f3a8596c39f5e71206"; - x86_64-unknown-linux-gnu = "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa2fbdcf5"; - arm-unknown-linux-gnueabihf = "bb8af68565321f54608e918597083eb016ed0f9f4f3cc23f7cc5f467b934ce7f"; - armv7-unknown-linux-gnueabihf = "7c0640879d7f2c38db60352e3c0f09e3fc6fa3bac6ca8f22cbccb1eb5e950121"; - aarch64-unknown-linux-gnu = "f0c6d630f3dedb3db69d69ed9f833aa6b472363096f5164f1068c7001ca42aeb"; - x86_64-apple-darwin = "82d61582a3772932432a99789c3b3bd4abe6baca339e355048ca9efb9ea5b4db"; - }; - - selectRustPackage = pkgs: pkgs.rust_1_47; - - rustcPatches = [ - ]; -} - -(builtins.removeAttrs args [ "fetchpatch" ]) diff --git a/pkgs/development/compilers/rust/binary.nix b/pkgs/development/compilers/rust/binary.nix index b84e390e0b0..9ae7e51e5fe 100644 --- a/pkgs/development/compilers/rust/binary.nix +++ b/pkgs/development/compilers/rust/binary.nix @@ -1,4 +1,4 @@ -{ stdenv, makeWrapper, bash, curl, darwin, zlib +{ stdenv, makeWrapper, bash, curl, darwin , version , src , platform @@ -42,23 +42,17 @@ rec { ./install.sh --prefix=$out \ --components=${installComponents} - ${optionalString (stdenv.isLinux && bootstrapping) ('' + ${optionalString (stdenv.isLinux && bootstrapping) '' patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$out/bin/rustc" - '' + optionalString (stdenv.lib.versionAtLeast version "1.46") - # rustc bootstrap needs libz starting from 1.46 - '' - ln -s ${zlib}/lib/libz.so.1 $out/lib/libz.so.1 - ln -s ${zlib}/lib/libz.so $out/lib/libz.so - '' + '' patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$out/bin/rustdoc" patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$out/bin/cargo" - '')} + ''} # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc # (or similar) here. It causes strange effects where rustc loads diff --git a/pkgs/development/interpreters/ruby/rubygems/default.nix b/pkgs/development/interpreters/ruby/rubygems/default.nix index 8263a987d63..0bbcadba3f5 100644 --- a/pkgs/development/interpreters/ruby/rubygems/default.nix +++ b/pkgs/development/interpreters/ruby/rubygems/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "rubygems"; - version = "3.1.3"; + version = "3.1.2"; src = fetchurl { url = "https://rubygems.org/rubygems/rubygems-${version}.tgz"; - sha256 = "181wjclxnq5lrwnr53famy9pg8911hi9w2v0vy7dqgjqnc4iy1hp"; + sha256 = "0h7ij4jpj8rgnpkl63cwh2lnav73pw5wpfqra3va7077lsyadlgd"; }; patches = [ diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix index aa132515b3e..b54ba531301 100644 --- a/pkgs/development/libraries/atk/default.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -17,8 +17,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + + nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]; propagatedBuildInputs = [ # Required by atk.pc diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index a195a2c7bb9..8295be238fc 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -146,11 +146,11 @@ stdenv.mkDerivation { enableParallelBuilding = true; - nativeBuildInputs = [ which ] - ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ which ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ expat zlib bzip2 libiconv ] ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu + ++ optional stdenv.isDarwin fixDarwinDylibNames ++ optional enablePython python ++ optional enableNumpy python.pkgs.numpy; diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index cd3fa3bb7fd..1ffb5359992 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -18,8 +18,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "devdoc" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ autoreconfHook pruneLibtoolFiles ] - ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ autoreconfHook fixDarwinDylibNames pruneLibtoolFiles ]; buildInputs = [ openssl db gettext kerberos ] ++ lib.optional enableLdap openldap diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix index cbc3f217326..b7b86de92c0 100644 --- a/pkgs/development/libraries/enchant/2.x.nix +++ b/pkgs/development/libraries/enchant/2.x.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "enchant"; - version = "2.2.12"; + version = "2.2.11"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://github.com/AbiWord/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz"; - sha256 = "0zi20s62gax9rkhwj318kqrxa62pmks6dsdd6m9pzvhlwy5cb6vb"; + sha256 = "opxXd8TkX8rCWVwVxJ1tKqQ0+l58mT3/P582e2X+Ryo="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index 29d2c2b3acb..a356d7be1a9 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -1,18 +1,16 @@ -{ stdenv, fetchurl, lib }: +{ stdenv, fetchurl }: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or # cgit) that are needed here should be included directly in Nixpkgs as # files. -let - version = "2.2.10"; -in stdenv.mkDerivation rec { - name = "expat-${version}"; +stdenv.mkDerivation rec { + name = "expat-2.2.8"; src = fetchurl { - url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${name}.tar.xz"; - sha256 = "sha256-Xf5Tj4tbY/A+mO2sUg19mmpNIuSC5cltTQb8xUhcJfI="; + url = "https://github.com/libexpat/libexpat/releases/download/R_2_2_8/${name}.tar.xz"; + sha256 = "16vpj5mk3lps3x7fr8cs03rffx3ir4jilyqw0frayn6q94daijk1"; }; outputs = [ "out" "dev" ]; # TODO: fix referrers diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index b87e64c2afb..24757af09e3 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -14,7 +14,7 @@ let in stdenv.mkDerivation rec { pname = "freetype"; - version = "2.10.4"; + version = "2.10.2"; meta = with stdenv.lib; { description = "A font rendering engine"; @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "mirror://savannah/${pname}/${pname}-${version}.tar.xz"; - sha256 = "112pyy215chg7f7fmp2l9374chhhpihbh8wgpj5nj6avj3c59a46"; + sha256 = "12rd181yzz6952cyjqaa4253f5szam93cmhw18p33rnj4l8dchqm"; }; propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype diff --git a/pkgs/development/libraries/gamin/abstract-socket-namespace.patch b/pkgs/development/libraries/gamin/abstract-socket-namespace.patch deleted file mode 100644 index ff161055972..00000000000 --- a/pkgs/development/libraries/gamin/abstract-socket-namespace.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 737452159d521aef2041a2767f3ebf9f68f4b6a9 Mon Sep 17 00:00:00 2001 -From: Christian Kampka -Date: Tue, 1 Sep 2020 13:54:35 +0200 -Subject: [PATCH] Pin abstract namespace sockets to host_os - -Running programs with AC_RUN_IFELSE fails when cross-compiling. -Since abstract namespace sockets are linux feature, we can easily -assume it is available for linux and not for darwin. ---- - configure.in | 47 ++++++----------------------------------------- - 1 file changed, 6 insertions(+), 41 deletions(-) - -diff --git a/configure.in b/configure.in -index eb129db..0ed82ba 100644 ---- a/configure.in -+++ b/configure.in -@@ -387,47 +387,12 @@ fi - - #### Abstract sockets - --AC_MSG_CHECKING(abstract socket namespace) --AC_LANG_PUSH(C) --AC_RUN_IFELSE([AC_LANG_PROGRAM( --[[ --#include --#include --#include --#include --#include --#include --#include --]], --[[ -- int listen_fd; -- struct sockaddr_un addr; -- -- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); -- -- if (listen_fd < 0) -- { -- fprintf (stderr, "socket() failed: %s\n", strerror (errno)); -- exit (1); -- } -- -- memset (&addr, '\0', sizeof (addr)); -- addr.sun_family = AF_UNIX; -- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); -- addr.sun_path[0] = '\0'; /* this is what makes it abstract */ -- -- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) -- { -- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", -- strerror (errno)); -- exit (1); -- } -- else -- exit (0); --]])], -- [have_abstract_sockets=yes], -- [have_abstract_sockets=no]) --AC_LANG_POP(C) -+AC_MSG_CHECKING([whether target os has abstract socket namespace]) -+if test x$target_os = xlinux-gnu ; then -+ have_abstract_sockets=yes -+else -+ have_abstract_sockets=no -+fi - AC_MSG_RESULT($have_abstract_sockets) - - if test x$enable_abstract_sockets = xyes; then --- -2.25.4 - diff --git a/pkgs/development/libraries/gamin/default.nix b/pkgs/development/libraries/gamin/default.nix index 89096c88745..38451571d8b 100644 --- a/pkgs/development/libraries/gamin/default.nix +++ b/pkgs/development/libraries/gamin/default.nix @@ -1,8 +1,6 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, glib, autoreconfHook }: +{ stdenv, fetchurl, fetchpatch, pkgconfig, glib }: -let - cross = stdenv.hostPlatform != stdenv.buildPlatform; -in stdenv.mkDerivation (rec { +stdenv.mkDerivation (rec { name = "gamin-0.1.10"; src = fetchurl { @@ -10,7 +8,7 @@ in stdenv.mkDerivation (rec { sha256 = "18cr51y5qacvs2fc2p1bqv32rs8bzgs6l67zhasyl45yx055y218"; }; - nativeBuildInputs = [ pkgconfig autoreconfHook ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ glib ]; @@ -29,7 +27,7 @@ in stdenv.mkDerivation (rec { name = "fix-pthread-mutex.patch"; url = "https://git.alpinelinux.org/aports/plain/main/gamin/fix-pthread-mutex.patch?h=3.4-stable&id=a1a836b089573752c1b0da7d144c0948b04e8ea8"; sha256 = "13igdbqsxb3sz0h417k6ifmq2n4siwqspj6slhc7fdl5wd1fxmdz"; - }) ++ stdenv.lib.optional (cross) ./abstract-socket-namespace.patch ; + }); meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 9b2fd0b778b..1f4bc5c12ad 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -61,7 +61,9 @@ stdenv.mkDerivation rec { gobject-introspection makeWrapper glib - ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + ] ++ stdenv.lib.optional stdenv.isDarwin [ + fixDarwinDylibNames + ]; propagatedBuildInputs = [ glib diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index fbc1cb818ca..1b9fcb9586b 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -18,11 +18,10 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libGL ]; - nativeBuildInputs = [ cmake ] - ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ]; buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ] - ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ]; + ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel fixDarwinDylibNames ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 6c5703f521d..8110f13d14c 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -11,7 +11,7 @@ }: let - version = "2.7.2"; + version = "2.7.1"; inherit (stdenv.lib) optional optionals optionalString; mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}"; @@ -24,7 +24,7 @@ stdenv.mkDerivation { owner = "harfbuzz"; repo = "harfbuzz"; rev = version; - sha256 = "0vfyxr3lvzp80j1347nrwpr1ndv265p15rj2q8rj31lb26nyz4dm"; + sha256 = "172jmwp666xbs6yy1pc2495gnkz8xw11b8zkz3j19jxlvvp4mxcs"; }; postPatch = '' diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix index d8e9bd16ab8..81f75ad526a 100644 --- a/pkgs/development/libraries/icu/base.nix +++ b/pkgs/development/libraries/icu/base.nix @@ -57,7 +57,7 @@ let # FIXME: This fixes dylib references in the dylibs themselves, but # not in the programs in $out/bin. - nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; # remove dependency on bootstrap-tools in early stdenv build postInstall = stdenv.lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/development/libraries/jbig2dec/default.nix b/pkgs/development/libraries/jbig2dec/default.nix index 4004c9f387e..a6eb5642395 100644 --- a/pkgs/development/libraries/jbig2dec/default.nix +++ b/pkgs/development/libraries/jbig2dec/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "jbig2dec"; - version = "0.19"; + version = "0.18"; src = fetchurl { - url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9533/${pname}-${version}.tar.gz"; - sha256 = "0dwa24kjqyg9hmm40fh048sdxfpnasz43l2rm8wlkw1qbdlpd517"; + url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/${pname}-${version}.tar.gz"; + sha256 = "0pigfw2v0ppvr0lbysm69gx0zsa5q2q92yrb8af2j3im6x97f6cy"; }; postPatch = '' diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index f89d4bc4534..4ae4a71091e 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -14,8 +14,8 @@ in stdenv.mkDerivation rec { }; propagatedBuildInputs = [ glib ]; - nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection glib ]; + buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/leveldb/default.nix b/pkgs/development/libraries/leveldb/default.nix index 14d426701ba..33eca603c26 100644 --- a/pkgs/development/libraries/leveldb/default.nix +++ b/pkgs/development/libraries/leveldb/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ snappy ]; nativeBuildInputs = [] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ]; buildPhase = '' make all diff --git a/pkgs/development/libraries/libLAS/default.nix b/pkgs/development/libraries/libLAS/default.nix index 27db14e7166..95569c0a813 100644 --- a/pkgs/development/libraries/libLAS/default.nix +++ b/pkgs/development/libraries/libLAS/default.nix @@ -9,8 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws"; }; - nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ]; + buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DGDAL_CONFIG=${gdal}/bin/gdal-config" diff --git a/pkgs/development/libraries/libcbor/default.nix b/pkgs/development/libraries/libcbor/default.nix index ae5154eac03..9b6a54d92f9 100644 --- a/pkgs/development/libraries/libcbor/default.nix +++ b/pkgs/development/libraries/libcbor/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "libcbor"; - version = "0.8.0"; + version = "unstable-2019-07-25"; src = fetchFromGitHub { owner = "PJK"; repo = pname; - rev = "v${version}"; - sha256 = "01dv4vxcmbvpphqy16vqiwh25wx11x630js5wfnx7cryarsh9ld7"; + rev = "82512d851205fbc7f65d96a0b4a8e1bad2e4f3c6"; + sha256 = "01hy7n21gxz4gp3gdwm2ywz822p415bj2k9ccxgwz3plvncs4xa1"; }; nativeBuildInputs = [ cmake ]; @@ -16,7 +16,9 @@ stdenv.mkDerivation rec { doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error - cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_SHARED_LIBS=on" ]; + cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]; + + NIX_CFLAGS_COMPILE = "-fno-lto"; meta = with stdenv.lib; { description = "CBOR protocol implementation for C and others"; diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index cbde3206717..e23c7d55c5e 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -23,13 +23,10 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional sslSupport "openssl" ; - nativeBuildInputs = [] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames - ; - buildInputs = [] ++ stdenv.lib.optional sslSupport openssl ++ stdenv.lib.optional stdenv.isCygwin findutils + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames ; doCheck = false; # needs the net diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 3a651087510..576a2fec921 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, pkgconfig, meson, ninja +{ stdenv, fetchurl, pkgconfig, meson, ninja , libevdev, mtdev, udev, libwacom , documentationSupport ? false, doxygen ? null, graphviz ? null # Documentation , eventGUISupport ? false, cairo ? null, glib ? null, gtk3 ? null # GUI event viewer support @@ -27,14 +27,11 @@ in with stdenv.lib; stdenv.mkDerivation rec { pname = "libinput"; - version = "1.16.2"; - - src = fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = pname; - repo = pname; - rev = version; - sha256 = "0qii6yh3dlhgv9z970cpzbz19ii8zjvq4k7pg75sy2gmia7smwd1"; + version = "1.16.1"; + + src = fetchurl { + url = "https://www.freedesktop.org/software/libinput/${pname}-${version}.tar.xz"; + sha256 = "e6fRru3RUWi7IdF+nmKKocJ5V5Y6Qjo/6jk4pQF1hTk="; }; outputs = [ "bin" "out" "dev" ]; @@ -83,7 +80,7 @@ stdenv.mkDerivation rec { meta = { description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver"; - homepage = "https://www.freedesktop.org/wiki/Software/libinput/"; + homepage = "http://www.freedesktop.org/wiki/Software/libinput"; license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ codyopel ]; diff --git a/pkgs/development/libraries/libraw/default.nix b/pkgs/development/libraries/libraw/default.nix index f59f63c38ac..b190d36acb5 100644 --- a/pkgs/development/libraries/libraw/default.nix +++ b/pkgs/development/libraries/libraw/default.nix @@ -1,29 +1,25 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, lcms2, pkgconfig }: +{ stdenv, fetchurl, lcms2, pkgconfig }: stdenv.mkDerivation rec { pname = "libraw"; - version = "0.20.2"; + version = "0.20.0"; - src = fetchFromGitHub { - owner = "LibRaw"; - repo = "LibRaw"; - rev = version; - sha256 = "16nm4r2l5501c9zvz25pzajq5id592jhn068scjxhr8np2cblybc"; + src = fetchurl { + url = "https://www.libraw.org/data/LibRaw-${version}.tar.gz"; + sha256 = "18wlsvj6c1rv036ph3695kknpgzc3lk2ikgshy8417yfl8ykh2hz"; }; outputs = [ "out" "lib" "dev" "doc" ]; propagatedBuildInputs = [ lcms2 ]; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; - enableParallelBuilding = true; - - meta = with stdenv.lib; { + meta = { description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"; homepage = "https://www.libraw.org/"; - license = licenses.gpl2Plus; - platforms = platforms.unix; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch b/pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch new file mode 100644 index 00000000000..552c4e08d5f --- /dev/null +++ b/pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch @@ -0,0 +1,211 @@ +Backports of + +From 46e17f0cb4a80b36755c84b8bf15731d3386c08f Mon Sep 17 00:00:00 2001 +From: kyslov +Date: Fri, 4 Jan 2019 17:04:09 -0800 +Subject: [PATCH] Fix OOB memory access on fuzzed data + +From 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Tue, 24 Jul 2018 21:36:50 -0700 +Subject: [PATCH] vp9: fix OOB read in decoder_peek_si_internal + +From f00890eecdf8365ea125ac16769a83aa6b68792d Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Tue, 11 Dec 2018 18:06:20 -0800 +Subject: [PATCH] update libwebm to libwebm-1.0.0.27-352-g6ab9fcf + +From 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Tue, 9 Apr 2019 18:37:44 -0700 +Subject: [PATCH] update libwebm to libwebm-1.0.0.27-358-gdbf1d10 + +From 52add5896661d186dec284ed646a4b33b607d2c7 Mon Sep 17 00:00:00 2001 +From: Jerome Jiang +Date: Wed, 23 May 2018 15:43:00 -0700 +Subject: [PATCH] VP8: Fix use-after-free in postproc. + +to address CVE-2019-9232 CVE-2019-9325 CVE-2019-9371 CVE-2019-9433 + +--- libvpx-1.7.0.orig/test/decode_api_test.cc ++++ libvpx-1.7.0/test/decode_api_test.cc +@@ -138,8 +138,30 @@ TEST(DecodeAPI, Vp9InvalidDecode) { + EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); + } + +-TEST(DecodeAPI, Vp9PeekSI) { ++void TestPeekInfo(const uint8_t *const data, uint32_t data_sz, ++ uint32_t peek_size) { + const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo; ++ // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get ++ // to decoder_peek_si_internal on frames of size < 8. ++ if (data_sz >= 8) { ++ vpx_codec_ctx_t dec; ++ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0)); ++ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM ++ : VPX_CODEC_CORRUPT_FRAME, ++ vpx_codec_decode(&dec, data, data_sz, NULL, 0)); ++ vpx_codec_iter_t iter = NULL; ++ EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter)); ++ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); ++ } ++ ++ // Verify behavior of vpx_codec_peek_stream_info. ++ vpx_codec_stream_info_t si; ++ si.sz = sizeof(si); ++ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK, ++ vpx_codec_peek_stream_info(codec, data, data_sz, &si)); ++} ++ ++TEST(DecodeAPI, Vp9PeekStreamInfo) { + // The first 9 bytes are valid and the rest of the bytes are made up. Until + // size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it + // should return VPX_CODEC_CORRUPT_FRAME. +@@ -150,24 +172,18 @@ TEST(DecodeAPI, Vp9PeekSI) { + }; + + for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) { +- // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get +- // to decoder_peek_si_internal on frames of size < 8. +- if (data_sz >= 8) { +- vpx_codec_ctx_t dec; +- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0)); +- EXPECT_EQ( +- (data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME, +- vpx_codec_decode(&dec, data, data_sz, NULL, 0)); +- vpx_codec_iter_t iter = NULL; +- EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter)); +- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); +- } +- +- // Verify behavior of vpx_codec_peek_stream_info. +- vpx_codec_stream_info_t si; +- si.sz = sizeof(si); +- EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK, +- vpx_codec_peek_stream_info(codec, data, data_sz, &si)); ++ TestPeekInfo(data, data_sz, 10); ++ } ++} ++ ++TEST(DecodeAPI, Vp9PeekStreamInfoTruncated) { ++ // This profile 1 header requires 10.25 bytes, ensure ++ // vpx_codec_peek_stream_info doesn't over read. ++ const uint8_t profile1_data[10] = { 0xa4, 0xe9, 0x30, 0x68, 0x53, ++ 0xe9, 0x30, 0x68, 0x53, 0x04 }; ++ ++ for (uint32_t data_sz = 1; data_sz <= 10; ++data_sz) { ++ TestPeekInfo(profile1_data, data_sz, 11); + } + } + #endif // CONFIG_VP9_DECODER +--- libvpx-1.7.0.orig/third_party/libwebm/mkvparser/mkvparser.cc ++++ libvpx-1.7.0/third_party/libwebm/mkvparser/mkvparser.cc +@@ -5307,8 +5307,8 @@ long VideoTrack::Parse(Segment* pSegment + + const long long stop = pos + s.size; + +- Colour* colour = NULL; +- Projection* projection = NULL; ++ std::unique_ptr colour_ptr; ++ std::unique_ptr projection_ptr; + + while (pos < stop) { + long long id, size; +@@ -5357,11 +5357,19 @@ long VideoTrack::Parse(Segment* pSegment + if (rate <= 0) + return E_FILE_FORMAT_INVALID; + } else if (id == libwebm::kMkvColour) { +- if (!Colour::Parse(pReader, pos, size, &colour)) ++ Colour* colour = NULL; ++ if (!Colour::Parse(pReader, pos, size, &colour)) { + return E_FILE_FORMAT_INVALID; ++ } else { ++ colour_ptr.reset(colour); ++ } + } else if (id == libwebm::kMkvProjection) { +- if (!Projection::Parse(pReader, pos, size, &projection)) ++ Projection* projection = NULL; ++ if (!Projection::Parse(pReader, pos, size, &projection)) { + return E_FILE_FORMAT_INVALID; ++ } else { ++ projection_ptr.reset(projection); ++ } + } + + pos += size; // consume payload +@@ -5392,8 +5400,8 @@ long VideoTrack::Parse(Segment* pSegment + pTrack->m_display_unit = display_unit; + pTrack->m_stereo_mode = stereo_mode; + pTrack->m_rate = rate; +- pTrack->m_colour = colour; +- pTrack->m_projection = projection; ++ pTrack->m_colour = colour_ptr.release(); ++ pTrack->m_projection = projection_ptr.release(); + + pResult = pTrack; + return 0; // success +--- libvpx-1.7.0.orig/vp8/common/postproc.c ++++ libvpx-1.7.0/vp8/common/postproc.c +@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BU + double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065; + int ppl = (int)(level + .5); + +- const MODE_INFO *mode_info_context = cm->show_frame_mi; ++ const MODE_INFO *mode_info_context = cm->mi; + int mbr, mbc; + + /* The pixel thresholds are adjusted according to if or not the macroblock +--- libvpx-1.7.0.orig/vp8/decoder/dboolhuff.h ++++ libvpx-1.7.0/vp8/decoder/dboolhuff.h +@@ -76,7 +76,7 @@ static int vp8dx_decode_bool(BOOL_DECODE + } + + { +- register int shift = vp8_norm[range]; ++ const unsigned char shift = vp8_norm[(unsigned char)range]; + range <<= shift; + value <<= shift; + count -= shift; +--- libvpx-1.7.0.orig/vp9/vp9_dx_iface.c ++++ libvpx-1.7.0/vp9/vp9_dx_iface.c +@@ -97,7 +97,7 @@ static vpx_codec_err_t decoder_peek_si_i + const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si, + int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) { + int intra_only_flag = 0; +- uint8_t clear_buffer[10]; ++ uint8_t clear_buffer[11]; + + if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM; + +@@ -158,6 +158,9 @@ static vpx_codec_err_t decoder_peek_si_i + if (profile > PROFILE_0) { + if (!parse_bitdepth_colorspace_sampling(profile, &rb)) + return VPX_CODEC_UNSUP_BITSTREAM; ++ // The colorspace info may cause vp9_read_frame_size() to need 11 ++ // bytes. ++ if (data_sz < 11) return VPX_CODEC_UNSUP_BITSTREAM; + } + rb.bit_offset += REF_FRAMES; // refresh_frame_flags + vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h); +--- libvpx-1.7.0.orig/vpx_dsp/bitreader.h ++++ libvpx-1.7.0/vpx_dsp/bitreader.h +@@ -94,7 +94,7 @@ static INLINE int vpx_read(vpx_reader *r + } + + { +- register int shift = vpx_norm[range]; ++ const unsigned char shift = vpx_norm[(unsigned char)range]; + range <<= shift; + value <<= shift; + count -= shift; +--- libvpx-1.7.0.orig/vpx_dsp/bitreader_buffer.c ++++ libvpx-1.7.0/vpx_dsp/bitreader_buffer.c +@@ -23,7 +23,7 @@ int vpx_rb_read_bit(struct vpx_read_bit_ + rb->bit_offset = off + 1; + return bit; + } else { +- rb->error_handler(rb->error_handler_data); ++ if (rb->error_handler != NULL) rb->error_handler(rb->error_handler_data); + return 0; + } + } diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 83e60466c14..007df403ff7 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -56,16 +56,20 @@ assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport; stdenv.mkDerivation rec { pname = "libvpx"; - version = "1.9.0"; + version = "1.7.0"; src = fetchFromGitHub { owner = "webmproject"; - repo = pname; + repo = "libvpx"; rev = "v${version}"; - sha256 = "16xv6ambc82g14h1y0q1vyy57wp6j9fbp0nk0wd5csnrw407rhry"; + sha256 = "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"; }; - postPatch = "patchShebangs ."; + patches = [ + ./CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch + ]; + + postPatch = ''patchShebangs .''; outputs = [ "bin" "dev" "out" ]; setOutputFlags = false; @@ -131,12 +135,6 @@ stdenv.mkDerivation rec { experimentalFpMbStatsSupport || experimentalEmulateHardwareSupport) "experimental") ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - #"--extra-cflags=" - #"--extra-cxxflags=" - #"--prefix=" - #"--libc=" - #"--libdir=" - "--enable-external-build" # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 @@ -161,10 +159,6 @@ stdenv.mkDerivation rec { buildInputs = [ ] ++ optionals unitTestsSupport [ coreutils curl ]; - NIX_LDFLAGS = [ - "-lpthread" # fixes linker errors - ]; - enableParallelBuilding = true; postInstall = ''moveToOutput bin "$bin" ''; diff --git a/pkgs/development/libraries/libwebp/default.nix b/pkgs/development/libraries/libwebp/default.nix index 6d24ba7f2ed..d2a98c4a847 100644 --- a/pkgs/development/libraries/libwebp/default.nix +++ b/pkgs/development/libraries/libwebp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, libtool +{ stdenv, fetchurl , threadingSupport ? true # multi-threading , openglSupport ? false, freeglut ? null, libGL ? null, libGLU ? null # OpenGL (required for vwebp) , pngSupport ? true, libpng ? null # PNG image format @@ -27,17 +27,13 @@ in with stdenv.lib; stdenv.mkDerivation rec { pname = "libwebp"; - version = "1.1.0"; + version = "1.0.3"; - src = fetchFromGitHub { - owner = "webmproject"; - repo = pname; - rev = version; - sha256 = "1kl6qqa29ygqb2fpv140y59v539gdqx4vcf3mlaxhca2bks98qgm"; + src = fetchurl { + url = "http://downloads.webmproject.org/releases/webp/${pname}-${version}.tar.gz"; + sha256 = "0kxk4sic34bln3k09mml7crvrmhj97swdk7b1ahbp5w6bj30f2p2"; }; - prePatch = "patchShebangs ."; - configureFlags = [ (mkFlag threadingSupport "threading") (mkFlag openglSupport "gl") @@ -54,7 +50,6 @@ stdenv.mkDerivation rec { (mkFlag libwebpdecoderSupport "libwebpdecoder") ]; - nativeBuildInputs = [ autoreconfHook libtool ]; buildInputs = [ ] ++ optionals openglSupport [ freeglut libGL libGLU ] ++ optional pngSupport libpng diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index aa180b94d74..aeeb0514fab 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -8,7 +8,7 @@ , galliumDrivers ? ["auto"] , driDrivers ? ["auto"] , vulkanDrivers ? ["auto"] -, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ] +, eglPlatforms ? [ "x11" "surfaceless" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ] , OpenGL, Xplugin , withValgrind ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32, valgrind-light , enableGalliumNine ? stdenv.isLinux @@ -31,7 +31,7 @@ with stdenv.lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "20.2.1"; + version = "20.1.9"; branch = versions.major version; in @@ -46,7 +46,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0ji4s1gwcvx3fbj9h0x5zbma6kw4b75vs0266zhc06r97yd6v96i"; + sha256 = "10kk8a8k7f4ip8yaiqdyrx162nbw8pw4h3b4hs4ha8mpd43wlldj"; }; prePatch = "patchShebangs ."; @@ -58,6 +58,7 @@ stdenv.mkDerivation { ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl ./opencl-install-dir.patch ./disk_cache-include-dri-driver-path-in-cache-key.patch + ./link-radv-with-ld_args_build_id.patch ] ++ lib.optionals stdenv.hostPlatform.isMusl [ # Fix `-Werror=int-conversion` pthread warnings on musl. diff --git a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch index fa78f4ae730..acf3d827c56 100644 --- a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch +++ b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch @@ -1,4 +1,4 @@ -From 980164fd92f5c2302624cd046d30ff21e6e4ba8a Mon Sep 17 00:00:00 2001 +From 46b10f2bc28fd79d561c8c49bbae3aee6a4cf0e6 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Mon, 6 Aug 2018 15:52:11 -0300 Subject: [PATCH] disk_cache: include dri driver path in cache key @@ -12,10 +12,10 @@ timestamps in /nix/store are zero. 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt -index 2d39d13b6ad..daf06480a60 100644 +index 1a2dd8ebd12..2ac741af5a6 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -368,6 +368,12 @@ option( +@@ -348,6 +348,12 @@ option( value : true, description : 'Enable direct rendering in GLX and EGL for DRI', ) @@ -26,13 +26,13 @@ index 2d39d13b6ad..daf06480a60 100644 + description : 'Mesa cache key.' +) option( - 'prefer-iris', + 'I-love-half-baked-turnips', type : 'boolean', diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c -index a92d621927a..3bd65c6890c 100644 +index d1f14736725..2ed328f292e 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c -@@ -401,8 +401,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id, +@@ -402,8 +402,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id, /* Create driver id keys */ size_t id_size = strlen(driver_id) + 1; @@ -43,7 +43,7 @@ index a92d621927a..3bd65c6890c 100644 cache->driver_keys_blob_size += gpu_name_size; /* We sometimes store entire structs that contains a pointers in the cache, -@@ -423,6 +425,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id, +@@ -424,6 +426,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id, uint8_t *drv_key_blob = cache->driver_keys_blob; DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size) DRV_KEY_CPY(drv_key_blob, driver_id, id_size) @@ -52,23 +52,22 @@ index a92d621927a..3bd65c6890c 100644 DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size) DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size) diff --git a/src/util/meson.build b/src/util/meson.build -index 0893f64793b..d46ce85a85f 100644 +index 9da29cc7390..5f549bb1d99 100644 --- a/src/util/meson.build +++ b/src/util/meson.build -@@ -179,7 +179,12 @@ _libmesa_util = static_library( - include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], +@@ -170,7 +170,12 @@ _libmesa_util = static_library( + include_directories : inc_common, dependencies : deps_for_libmesa_util, link_with: libmesa_format, -- c_args : [c_msvc_compat_args], +- c_args : [c_msvc_compat_args, c_vis_args], + c_args : [ -+ c_msvc_compat_args, ++ c_msvc_compat_args, c_vis_args, + '-DDISK_CACHE_KEY="@0@"'.format( + get_option('disk-cache-key') + ), + ], - gnu_symbol_visibility : 'hidden', build_by_default : false ) + -- -2.28.0 - +2.25.1 diff --git a/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch b/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch new file mode 100644 index 00000000000..0a660332392 --- /dev/null +++ b/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch @@ -0,0 +1,25 @@ +From b49bcb6eece322b70fc2e8b0c8498f5a38ea7b82 Mon Sep 17 00:00:00 2001 +From: David McFarland +Date: Sun, 26 Jul 2020 17:29:49 -0300 +Subject: [PATCH] link radv with ld_args_build_id + +This is needed for radv_device_get_cache_uuid to work correctly. +--- + src/amd/vulkan/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build +index eec026e8f60..a07a0821938 100644 +--- a/src/amd/vulkan/meson.build ++++ b/src/amd/vulkan/meson.build +@@ -183,7 +183,7 @@ libvulkan_radeon = shared_library( + ], + c_args : [c_vis_args, no_override_init_args, radv_flags], + cpp_args : [cpp_vis_args, radv_flags], +- link_args : [ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args], ++ link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args], + link_depends : [libvulkan_radeon_link_depends,], + install : true, + ) +-- +2.28.0 diff --git a/pkgs/development/libraries/mesa/missing-includes.patch b/pkgs/development/libraries/mesa/missing-includes.patch index 72488893c6b..9685a1619a5 100644 --- a/pkgs/development/libraries/mesa/missing-includes.patch +++ b/pkgs/development/libraries/mesa/missing-includes.patch @@ -9,6 +9,18 @@ #include "pipe/p_compiler.h" #include "pipe/p_state.h" +--- ./src/util/rand_xor.c.orig 2017-06-20 00:38:57.199474067 +0200 ++++ ./src/util/rand_xor.c 2017-06-20 00:40:31.351279557 +0200 +@@ -23,7 +23,9 @@ + */ + + #if defined(__linux__) ++#include + #include ++#include + #include + #include + #else --- ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +++ ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -28,6 +28,8 @@ diff --git a/pkgs/development/libraries/nss/3.44.nix b/pkgs/development/libraries/nss/3.44.nix index 1c89dd79331..ad58bfccaee 100644 --- a/pkgs/development/libraries/nss/3.44.nix +++ b/pkgs/development/libraries/nss/3.44.nix @@ -19,10 +19,10 @@ in stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ perl ] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ perl ]; - buildInputs = [ zlib sqlite ]; + buildInputs = [ zlib sqlite ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; propagatedBuildInputs = [ nspr ]; diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index 395617aa7bc..e9ca475802d 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -20,9 +20,10 @@ in stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ] - ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ darwin.cctools fixDarwinDylibNames ]; + ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools; - buildInputs = [ zlib sqlite ]; + buildInputs = [ zlib sqlite ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; propagatedBuildInputs = [ nspr ]; diff --git a/pkgs/development/libraries/odpic/default.nix b/pkgs/development/libraries/odpic/default.nix index 7f27f7d1c17..6c3744493d2 100644 --- a/pkgs/development/libraries/odpic/default.nix +++ b/pkgs/development/libraries/odpic/default.nix @@ -16,7 +16,7 @@ in stdenv.mkDerivation { sha256 = "1g2wdchlwdihqj0ynx58nwyrpncxanghlnykgir97p0wimg3hnxl"; }; - nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ]; buildInputs = [ oracle-instantclient ] ++ stdenv.lib.optionals stdenv.isLinux [ libaio ]; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index c4a9a4a0180..1fc38dd8aaa 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -160,8 +160,8 @@ in { }; openssl_1_1 = common { - version = "1.1.1h"; - sha256 = "1ncmcnh5bmxkwrvm0m1q4kdcjjfpwvlyjspjhibkxc6p9dvsi72w"; + version = "1.1.1g"; + sha256 = "0ikdcc038i7jk8h7asq5xcn8b1xc2rrbc88yfm4hqbz3y5s4gc6x"; patches = [ ./1.1/nix-ssl-cert-file.patch diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index 31a7e7e9086..46f520e41e4 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -36,13 +36,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # Tests run in fakeroot for non-root users - preCheck = '' - if [ "$(id -u)" != "0" ]; then - export FAKED_MODE=1 - fi - ''; - doCheck = !stdenv.isDarwin; installFlags = [ diff --git a/pkgs/development/libraries/tiledb/default.nix b/pkgs/development/libraries/tiledb/default.nix index 89318dd4e75..2726ed7f237 100644 --- a/pkgs/development/libraries/tiledb/default.nix +++ b/pkgs/development/libraries/tiledb/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { cmake python doxygen - ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + ]; checkInputs = [ gtest @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { openssl boost libpqxx - ]; + ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; # emulate the process of pulling catch down postPatch = '' diff --git a/pkgs/development/libraries/zeromq/4.x.nix b/pkgs/development/libraries/zeromq/4.x.nix index d5819ff7ee9..8302ebbd1e8 100644 --- a/pkgs/development/libraries/zeromq/4.x.nix +++ b/pkgs/development/libraries/zeromq/4.x.nix @@ -1,19 +1,17 @@ -{ stdenv, fetchFromGitHub, cmake, asciidoc, pkg-config, libsodium -, enableDrafts ? false }: +{ stdenv, fetchFromGitHub, cmake, asciidoc, enableDrafts ? false }: stdenv.mkDerivation rec { pname = "zeromq"; - version = "4.3.3"; + version = "4.3.2"; src = fetchFromGitHub { owner = "zeromq"; repo = "libzmq"; rev = "v${version}"; - sha256 = "155kb0ih0xj4jvd39bq8d04bgvhy9143r3632ks1m04455z4qdzd"; + sha256 = "1q37z05i76ili31j6jlw8988iy6vxadlmd306f99phxfdpqa6bn9"; }; - nativeBuildInputs = [ cmake asciidoc pkg-config ]; - buildInputs = [ libsodium ]; + nativeBuildInputs = [ cmake asciidoc ]; enableParallelBuilding = true; diff --git a/pkgs/development/python-modules/arrow/default.nix b/pkgs/development/python-modules/arrow/default.nix index 7dbe3b98fca..bc3de37526a 100644 --- a/pkgs/development/python-modules/arrow/default.nix +++ b/pkgs/development/python-modules/arrow/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "arrow"; - version = "0.17.0"; + version = "0.15.8"; src = fetchPypi { inherit pname version; - sha256 = "ff08d10cda1d36c68657d6ad20d74fbea493d980f8b2d45344e00d6ed2bf6ed4"; + sha256 = "edc31dc051db12c95da9bac0271cd1027b8e36912daf6d4580af53b23e62721a"; }; propagatedBuildInputs = [ python-dateutil ] diff --git a/pkgs/development/python-modules/pycairo/default.nix b/pkgs/development/python-modules/pycairo/default.nix index 24e0f9792d7..d61279e38d5 100644 --- a/pkgs/development/python-modules/pycairo/default.nix +++ b/pkgs/development/python-modules/pycairo/default.nix @@ -1,13 +1,4 @@ -{ lib -, fetchFromGitHub -, meson -, ninja -, buildPythonPackage -, pytestCheckHook -, pkg-config -, cairo -, isPy3k -}: +{ lib, fetchFromGitHub, meson, ninja, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPy3k }: buildPythonPackage rec { pname = "pycairo"; @@ -25,25 +16,22 @@ buildPythonPackage rec { nativeBuildInputs = [ meson ninja - pkg-config + pkgconfig ]; buildInputs = [ cairo + xlibsWrapper ]; - checkInputs = [ - pytestCheckHook - ]; + checkInputs = [ pytest ]; - mesonFlags = [ - "-Dpython=${if isPy3k then "python3" else "python"}" - ]; + mesonFlags = [ "-Dpython=${if isPy3k then "python3" else "python"}" ]; meta = with lib; { description = "Python 2/3 bindings for cairo"; homepage = "https://pycairo.readthedocs.io/"; - license = with licenses; [ lgpl21Only mpl11 ]; + license = with licenses; [ lgpl2 mpl11 ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; }; } diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 010f1d9c6c2..559a4c191b6 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -5,7 +5,6 @@ , ps , isBootstrap ? false , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) -, useOpenSSL ? !isBootstrap, openssl , useNcurses ? false, ncurses , useQt4 ? false, qt4 , withQt5 ? false, qtbase @@ -45,17 +44,15 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - - nativeBuildInputs = [ setupHook pkgconfig ]; - - buildInputs = [] + buildInputs = + [ setupHook pkgconfig ] ++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ] - ++ lib.optional useOpenSSL openssl ++ lib.optional useNcurses ncurses ++ lib.optional useQt4 qt4 ++ lib.optional withQt5 qtbase; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + propagatedBuildInputs = lib.optional stdenv.isDarwin ps; preConfigure = '' @@ -94,15 +91,13 @@ stdenv.mkDerivation rec { "-DCMAKE_AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar" "-DCMAKE_RANLIB=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" "-DCMAKE_STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" - - "-DCMAKE_USE_OPENSSL=${if useOpenSSL then "ON" else "OFF"}" + ] # Avoid depending on frameworks. - "-DBUILD_CursesDialog=${if useNcurses then "ON" else "OFF"}" - ]; + ++ lib.optional (!useNcurses) "-DBUILD_CursesDialog=OFF"; # make install attempts to use the just-built cmake preInstall = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) '' - sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile + sed -i 's|bin/cmake|${buildPackages.cmake}/bin/cmake|g' Makefile ''; dontUseCmakeConfigure = true; diff --git a/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch b/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch deleted file mode 100644 index 5b9020b3d54..00000000000 --- a/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 536108b10271f2f42d41c7d9ddb4ce2ea1851f4f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= -Date: Sat, 17 Oct 2020 19:27:08 +0200 -Subject: [PATCH] boost: Do not add system paths on nix - ---- - mesonbuild/dependencies/boost.py | 17 +---------------- - 1 file changed, 1 insertion(+), 16 deletions(-) - -diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py -index 907c0c275..ecaf11b18 100644 ---- a/mesonbuild/dependencies/boost.py -+++ b/mesonbuild/dependencies/boost.py -@@ -643,22 +643,7 @@ class BoostDependency(ExternalDependency): - roots += [x for x in candidates if x.name.lower().startswith('boost') and x.is_dir()] - else: - tmp = [] # type: T.List[Path] -- -- # Homebrew -- brew_boost = Path('/usr/local/Cellar/boost') -- if brew_boost.is_dir(): -- tmp += [x for x in brew_boost.iterdir()] -- -- # Add some default system paths -- tmp += [Path('/opt/local')] -- tmp += [Path('/usr/local/opt/boost')] -- tmp += [Path('/usr/local')] -- tmp += [Path('/usr')] -- -- # Cleanup paths -- tmp = [x for x in tmp if x.is_dir()] -- tmp = [x.resolve() for x in tmp] -- roots += tmp -+ # Do not add any non-explicit paths on nix - - return roots - --- -2.25.4 - diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 1b9c3ef6477..8421fb7d70a 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -52,11 +52,6 @@ python3.pkgs.buildPythonApplication rec { # cut-in-half-by-\0 store path references. # Let’s just clear the whole rpath and hope for the best. ./clear-old-rpath.patch - - # Patch out default boost search paths to avoid impure builds on - # unsandboxed non-NixOS builds, see: - # https://github.com/NixOS/nixpkgs/issues/86131#issuecomment-711051774 - ./boost-Do-not-add-system-paths-on-nix.patch ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix index 4bbff3ca33f..02298d93b8a 100644 --- a/pkgs/development/tools/misc/ycmd/default.nix +++ b/pkgs/development/tools/misc/ycmd/default.nix @@ -18,10 +18,9 @@ stdenv.mkDerivation { sha256 = "1c5axdngxaxj5vc6lr8sxb99mr5adsm1dnjckaxc23kq78pc8cn7"; }; - nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ]; buildInputs = [ boost llvmPackages.libclang ] - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin Cocoa; + ++ stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames Cocoa ]; buildPhase = '' export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped} diff --git a/pkgs/misc/ghostscript/0001-Bug-702364-Fix-missing-echogs-dependencies.patch b/pkgs/misc/ghostscript/0001-Bug-702364-Fix-missing-echogs-dependencies.patch new file mode 100644 index 00000000000..dd31260302c --- /dev/null +++ b/pkgs/misc/ghostscript/0001-Bug-702364-Fix-missing-echogs-dependencies.patch @@ -0,0 +1,835 @@ +--- a/contrib/contrib.mak 2020-03-19 09:21:42.000000000 +0100 ++++ b/contrib/contrib.mak 2020-05-14 13:41:03.202258445 +0200 +@@ -22,6 +22,10 @@ + CONTRIB_MAK=$(CONTRIBDIR)$(D)contrib.mak $(TOP_MAKEFILES) + CONTRIBSRC=$(CONTRIBDIR)$(D) + ++# Almost all device drivers depend on the following: ++CONTDEVH=$(gserrors_h) $(gx_h) $(gxdevice_h) ++CONTDEV=$(AK) $(ECHOGS_XE) $(GDEVH) ++ + ###### --------------------------- Catalog -------------------------- ###### + + # The following drivers are user-contributed, and maintained (if at all) by +@@ -185,19 +189,19 @@ + $(DEVCC) $(DEVO_)gdevbjca.$(OBJ) $(C_) $(CONTRIBSRC)gdevbjca.c + + $(DD)bjcmono.dev : $(bjc_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bjcmono $(bjc_) + + $(DD)bjcgray.dev : $(bjc_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bjcgray $(bjc_) + + $(DD)bjccmyk.dev : $(bjc_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bjccmyk $(bjc_) + + $(DD)bjccolor.dev : $(bjc_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bjccolor $(bjc_) + + +@@ -208,25 +212,25 @@ + # Author: Uli Wortmann (uliw@erdw.ethz.ch), Martin Gerbershagen (ger@ulm.temic.de) + # Printer: HP 670 + $(DD)cdj670.dev : $(cdeskjet8_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdj670 $(cdeskjet8_) + + # Author: Uli Wortmann (uliw@erdw.ethz.ch) + # Printer: HP 850 + $(DD)cdj850.dev : $(cdeskjet8_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdj850 $(cdeskjet8_) + + # Author: Uli Wortmann (uliw@erdw.ethz.ch), Martin Gerbershagen (ger@ulm.temic.de) + # Printer: HP 890 + $(DD)cdj890.dev : $(cdeskjet8_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdj890 $(cdeskjet8_) + + # Author: Uli Wortmann (uliw@erdw.ethz.ch), Martin Gerbershagen (ger@ulm.temic.de) + # Printer: HP 1600 + $(DD)cdj1600.dev : $(cdeskjet8_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdj1600 $(cdeskjet8_) + + $(DEVOBJ)gdevcd8.$(OBJ) : $(CONTRIBSRC)gdevcd8.c $(PDEVH) $(math__h)\ +@@ -244,7 +248,8 @@ + + # Author: Matthew Gelhaus (mgelhaus@proaxis.com) + # Printer: HP 880c +-$(DD)cdj880.dev : $(cdeskjet8_) $(DD)page.dev ++$(DD)cdj880.dev : $(cdeskjet8_) $(DD)page.dev $(CONTDEV) \ ++ $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdj880 $(cdeskjet8_) + + +@@ -255,7 +260,7 @@ + # Author: Rene Harsch (rene@harsch.net) + # Printer: HP 970Cxi + $(DD)cdj970.dev : $(cdeskjet9_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdj970 $(cdeskjet9_) + + $(DEVOBJ)gdevdj9.$(OBJ) : $(CONTRIBSRC)gdevdj9.c $(PDEVH) $(math__h) $(string__h)\ +@@ -268,7 +273,7 @@ + ### NOTE: Same as chp2200 (some PJL and CRD changes). + + $(DD)cdnj500.dev : $(cdeskjet8_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)cdnj500 $(cdeskjet8_) + + +@@ -277,7 +282,7 @@ + ### NOTE: Depends on the presence of the cdj850 section. + + $(DD)chp2200.dev : $(cdeskjet8_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV2) $(DD)chp2200 $(cdeskjet8_) + + +@@ -288,11 +293,11 @@ + GDIMONO=$(DEVOBJ)gdevgdi.$(OBJ) $(HPPCL) + + $(DD)gdi.dev : $(GDIMONO) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)gdi $(GDIMONO) + + $(DD)samsunggdi.dev : $(GDIMONO) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)samsunggdi $(GDIMONO) + + $(DEVOBJ)gdevgdi.$(OBJ) : $(CONTRIBSRC)gdevgdi.c $(PDEVH) $(gdevpcl_h) \ +@@ -306,17 +311,17 @@ + + hl1250_=$(DEVOBJ)gdevhl12.$(OBJ) $(HPDLJM) + $(DD)hl1250.dev : $(hl1250_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hl1250 $(hl1250_) + + $(DD)hl1240.dev : $(hl1250_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hl1240 $(hl1250_) + + # Author: Marek Michalkiewicz + # Printer: Brother HL-1250 (may work with some other models too) + $(DEVOBJ)gdevhl12.$(OBJ) : $(CONTRIBSRC)gdevhl12.c $(PDEVH) $(gdevdljm_h) \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(DEVCC) $(DEVO_)gdevhl12.$(OBJ) $(C_) $(CONTRIBSRC)gdevhl12.c + + +@@ -327,37 +332,37 @@ + # Author: Ulrich Mueller (ulm@vsnhd1.cern.ch) + # Printer: DEC LN03 + $(DD)ln03.dev : $(ln03_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)ln03 $(ln03_) + + # Author: Nick Brown (nick.brown@coe.int) + # Printer: DEClaser 2100 + $(DD)dl2100.dev : $(ln03_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)dl2100 $(ln03_) + + # Author: Ian MacPhedran (macphed@dvinci.USask.CA) + # Printer: DEC LA50 + $(DD)la50.dev : $(ln03_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)la50 $(ln03_) + + # Author: Bruce Lowekamp (lowekamp@csugrad.cs.vt.edu) + # Printer: DEC LA70 + $(DD)la70.dev : $(ln03_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)la70 $(ln03_) + + # Author: Ian MacPhedran (macphed@dvinci.USask.CA) + # Printer: DEC LA75 + $(DD)la75.dev : $(ln03_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)la75 $(ln03_) + + # Author: Andre' Beck (Andre_Beck@IRS.Inf.TU-Dresden.de) + # Printer: DEC LA75plus + $(DD)la75plus.dev : $(ln03_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)la75plus $(ln03_) + + $(DEVOBJ)gdevln03.$(OBJ) : $(CONTRIBSRC)gdevln03.c $(PDEVH) \ +@@ -380,233 +385,233 @@ + $(DEVCC) -DA4 $(DEVO_)gdevescv.$(OBJ) $(C_) $(escv_opts) $(ESCV_SRC)gdevescv.c + + $(DD)alc1900.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc1900 $(escv_) + + $(DD)alc2000.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc2000 $(escv_) + + $(DD)alc4000.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc4000 $(escv_) + + $(DD)alc4100.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc4100 $(escv_) + + $(DD)alc8500.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc8500 $(escv_) + + $(DD)alc8600.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc8600 $(escv_) + + $(DD)alc9100.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)alc9100 $(escv_) + + $(DD)lp3000c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp3000c $(escv_) + + $(DD)lp8000c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8000c $(escv_) + + $(DD)lp8200c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8200c $(escv_) + + $(DD)lp8300c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8300c $(escv_) + + $(DD)lp8500c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8500c $(escv_) + + $(DD)lp8800c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8800c $(escv_) + + $(DD)lp9000c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9000c $(escv_) + + $(DD)lp9200c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9200c $(escv_) + + $(DD)lp9500c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9500c $(escv_) + + $(DD)lp9800c.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9800c $(escv_) + + $(DD)lps6500.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lps6500 $(escv_) + + $(DD)epl2050.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl2050 $(escv_) + + $(DD)epl2050p.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl2050p $(escv_) + + $(DD)epl2120.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl2120 $(escv_) + + $(DD)epl2500.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl2500 $(escv_) + + $(DD)epl2750.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl2750 $(escv_) + + $(DD)epl5800.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl5800 $(escv_) + + $(DD)epl5900.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl5900 $(escv_) + + $(DD)epl6100.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl6100 $(escv_) + + $(DD)epl6200.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)epl6200 $(escv_) + + $(DD)lp1800.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp1800 $(escv_) + + $(DD)lp1900.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp1900 $(escv_) + + $(DD)lp2200.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp2200 $(escv_) + + $(DD)lp2400.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp2400 $(escv_) + + $(DD)lp2500.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp2500 $(escv_) + + $(DD)lp7500.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp7500 $(escv_) + + $(DD)lp7700.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp7700 $(escv_) + + $(DD)lp7900.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp7900 $(escv_) + + $(DD)lp8100.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8100 $(escv_) + + $(DD)lp8300f.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8300f $(escv_) + + $(DD)lp8400f.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8400f $(escv_) + + $(DD)lp8600.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8600 $(escv_) + + $(DD)lp8600f.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8600f $(escv_) + + $(DD)lp8700.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8700 $(escv_) + + $(DD)lp8900.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp8900 $(escv_) + + $(DD)lp9000b.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9000b $(escv_) + + $(DD)lp9100.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9100 $(escv_) + + $(DD)lp9200b.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9200b $(escv_) + + $(DD)lp9300.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9300 $(escv_) + + $(DD)lp9400.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9400 $(escv_) + + $(DD)lp9600.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9600 $(escv_) + + $(DD)lp9600s.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp9600s $(escv_) + + $(DD)lps4500.dev : $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lps4500 $(escv_) + + $(DD)eplcolor.dev: $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)eplcolor $(escv_) + + $(DD)eplmono.dev: $(escv_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)eplmono $(escv_) + + # ------ The Lexmark 5700 and 7000 devices ------ # + + lex7000_=$(DEVOBJ)gdevlx7.$(OBJ) + $(DD)lex7000.dev : $(lex7000_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lex7000 $(lex7000_) + + lex5700_=$(DEVOBJ)gdevlx7.$(OBJ) + $(DD)lex5700.dev : $(lex5700_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lex5700 $(lex5700_) + + lex3200_=$(DEVOBJ)gdevlx7.$(OBJ) + $(DD)lex3200.dev : $(lex3200_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lex3200 $(lex3200_) + + lex2050_=$(DEVOBJ)gdevlx7.$(OBJ) + $(DD)lex2050.dev : $(lex2050_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lex2050 $(lex2050_) + + $(DEVOBJ)gdevlx7.$(OBJ) : $(CONTRIBSRC)gdevlx7.c $(PDEVH) \ +@@ -623,7 +628,7 @@ + $(DEVCC) $(DEVO_)gdevlx32.$(OBJ) $(C_) $(CONTRIBSRC)gdevlx32.c + + $(DD)lxm3200.dev : $(lxm3200_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lxm3200 $(lxm3200_) + + +@@ -649,13 +654,13 @@ + $(DEVCC) $(DEVO_)gdevlips.$(OBJ) $(LIPS_OPT) $(C_) $(LIPS_SRC)gdevlips.c + + $(DD)lips4.dev : $(lipsr_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lips4 $(lipsr_) + + lipsv_=$(DEVOBJ)gdevl4v.$(OBJ) $(DEVOBJ)gdevlips.$(OBJ) + + $(DD)lips4v.dev : $(ECHOGS_XE) $(lipsv_) $(DD)vector.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETDEV) $(DD)lips4v $(lipsv_) + $(ADDMOD) $(DD)lips4v -include $(GLD)vector + +@@ -668,11 +673,11 @@ + ### --------------- Some extra devices: lips2p, bjc880j ---------------- ### + + $(DD)lips2p.dev : $(lipsr_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lips2p $(lipsr_) + + $(DD)bjc880j.dev : $(lipsr_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bjc880j $(lipsr_) + + +@@ -681,15 +686,15 @@ + md2k_=$(DEVOBJ)gdevmd2k.$(OBJ) + + $(DD)md2k.dev : $(md2k_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)md2k $(md2k_) + + $(DD)md5k.dev : $(md2k_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)md5k $(md2k_) + + $(DEVOBJ)gdevmd2k.$(OBJ) : $(CONTRIBSRC)gdevmd2k.c $(PDEVH) $(gsparam_h) \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(DEVCC) $(DEVO_)gdevmd2k.$(OBJ) $(C_) $(CONTRIBSRC)gdevmd2k.c + + +@@ -697,7 +702,7 @@ + + oki4w_=$(DEVOBJ)gdevop4w.$(OBJ) + $(DD)oki4w.dev : $(oki4w_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)oki4w $(oki4w_) + + # Author: Ivan Schreter (ivan@shadow.sk) +@@ -720,11 +725,11 @@ + $(DEVCC) $(DEVO_)gdevopvp.$(OBJ) $(OPVP_OPT) $(C_) $(OPVP_SRC)gdevopvp.c + + $(DD)opvp.dev : $(opvp_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)opvp $(opvp_) + + $(DD)oprp.dev : $(opvp_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)oprp $(opvp_) + + +@@ -901,78 +906,78 @@ + + # The generic pcl3 device with selectable subdevices + $(DD)pcl3.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)pcl3 $(pcl3_) + + # Fixed devices for specific printers + $(DD)hpdjplus.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdjplus $(pcl3_) + $(DD)hpdjportable.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdjportable $(pcl3_) + $(DD)hpdj310.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj310 $(pcl3_) + $(DD)hpdj320.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj320 $(pcl3_) + $(DD)hpdj340.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj340 $(pcl3_) + $(DD)hpdj400.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj400 $(pcl3_) + $(DD)hpdj500.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj500 $(pcl3_) + $(DD)hpdj500c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj500c $(pcl3_) + $(DD)hpdj510.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj510 $(pcl3_) + $(DD)hpdj520.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj520 $(pcl3_) + $(DD)hpdj540.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj540 $(pcl3_) + $(DD)hpdj550c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj550c $(pcl3_) + $(DD)hpdj560c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj560c $(pcl3_) + $(DD)hpdj600.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj600 $(pcl3_) + $(DD)hpdj660c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj660c $(pcl3_) + $(DD)hpdj670c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj670c $(pcl3_) + $(DD)hpdj680c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj680c $(pcl3_) + $(DD)hpdj690c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj690c $(pcl3_) + $(DD)hpdj850c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj850c $(pcl3_) + $(DD)hpdj855c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj855c $(pcl3_) + $(DD)hpdj870c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj870c $(pcl3_) + $(DD)hpdj890c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj890c $(pcl3_) + $(DD)hpdj1120c.dev : $(pcl3_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)hpdj1120c $(pcl3_) + + #------------------------------------------------------------------------------ +@@ -1009,7 +1014,7 @@ + + xes_=$(DEVOBJ)gdevxes.$(OBJ) + $(DD)xes.dev : $(xes_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)xes $(xes_) + + # Author: Peter Flass (flass@lbdrscs.bitnet) +@@ -1029,16 +1034,16 @@ + + pr201_=$(DEVOBJ)gdevp201.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + +-$(DD)pr201.dev : $(pr201_) $(CONTRIB_MAK) $(MAKEDIRS) ++$(DD)pr201.dev : $(pr201_) $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)pr201 $(pr201_) + +-$(DD)pr150.dev : $(pr201_) $(CONTRIB_MAK) $(MAKEDIRS) ++$(DD)pr150.dev : $(pr201_) $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)pr150 $(pr201_) + +-$(DD)pr1000.dev : $(pr201_) $(CONTRIB_MAK) $(MAKEDIRS) ++$(DD)pr1000.dev : $(pr201_) $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)pr1000 $(pr201_) + +-$(DD)pr1000_4.dev : $(pr201_) $(CONTRIB_MAK) $(MAKEDIRS) ++$(DD)pr1000_4.dev : $(pr201_) $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)pr1000_4 $(pr201_) + + $(DEVOBJ)gdevp201.$(OBJ) : $(JAPSRC)gdevp201.c $(PDEVH) \ +@@ -1049,7 +1054,7 @@ + + jj100_=$(DEVOBJ)gdevj100.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + +-$(DD)jj100.dev : $(jj100_) $(CONTRIB_MAK) $(MAKEDIRS) ++$(DD)jj100.dev : $(jj100_) $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)jj100 $(jj100_) + + $(DEVOBJ)gdevj100.$(OBJ) : $(JAPSRC)gdevj100.c $(PDEVH) \ +@@ -1061,11 +1066,11 @@ + bj10v_=$(DEVOBJ)gdev10v.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + + $(DD)bj10v.dev : $(bj10v_) \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bj10v $(bj10v_) + + $(DD)bj10vh.dev : $(bj10v_) \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)bj10vh $(bj10v_) + + # Uncomment the following line if you are using MS-DOS on PC9801 series. +@@ -1080,7 +1085,7 @@ + dmprt_=$(DEVOBJ)gdevdmpr.$(OBJ) $(DEVOBJ)dviprlib.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + + $(DD)dmprt.dev : $(dmprt_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETDEV) $(DD)dmprt $(dmprt_) + $(ADDMOD) $(DD)dmprt -ps dmp_init + +@@ -1110,19 +1115,19 @@ + $(DEVCC) -DA4 $(DEVO_)gdevmjc.$(OBJ) $(C_) $(JAPSRC)gdevmjc.c + + $(DD)mj700v2c.dev : $(mj700v2c_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)mj700v2c $(mj700v2c_) + + $(DD)mj500c.dev : $(mj700v2c_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)mj500c $(mj700v2c_) + + $(DD)mj6000c.dev : $(mj700v2c_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)mj6000c $(mj700v2c_) + + $(DD)mj8000c.dev : $(mj700v2c_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)mj8000c $(mj700v2c_) + + ### ----------------- The Fujitsu FMPR printer device ----------------- ### +@@ -1130,7 +1135,7 @@ + fmpr_=$(DEVOBJ)gdevfmpr.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + + $(DD)fmpr.dev : $(fmpr_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)fmpr $(fmpr_) + + $(DEVOBJ)gdevfmpr.$(OBJ) : $(JAPSRC)gdevfmpr.c $(PDEVH) \ +@@ -1142,7 +1147,7 @@ + fmlbp_=$(DEVOBJ)gdevfmlbp.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + + $(DD)fmlbp.dev : $(fmlbp_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)fmlbp $(fmlbp_) + + $(DEVOBJ)gdevfmlbp.$(OBJ) : $(JAPSRC)gdevfmlbp.c $(PDEVH) \ +@@ -1159,7 +1164,7 @@ + ml6_=$(DEVOBJ)gdevml6.$(OBJ) $(DEVOBJ)gdevprn.$(OBJ) + + $(DD)ml600.dev : $(ml6_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)ml600 $(ml6_) + + $(DEVOBJ)gdevml6.$(OBJ) : $(JAPSRC)gdevml6.c $(PDEVH) \ +@@ -1172,11 +1177,11 @@ + lbp3x0_=$(DEVOBJ)gdevlbp3.$(OBJ) + + $(DD)lbp310.dev :$(lbp3x0_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lbp310 $(lbp3x0_) + + $(DD)lbp320.dev :$(lbp3x0_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lbp320 $(lbp3x0_) + + $(DEVOBJ)gdevlbp3.$(OBJ) : $(JAPSRC)gdevlbp3.c $(PDEVH) +@@ -1191,7 +1196,7 @@ + $(DEVCC) -DA4 $(DEVO_)gdevnpdl.$(OBJ) $(LIPS_OPT) $(C_) $(JAPSRC)gdevnpdl.c + + $(DD)npdl.dev : $(npdl_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)npdl $(npdl_) + + ### ------- EPSON ESC/Page printer device ----------------- ### +@@ -1203,11 +1208,11 @@ + $(DEVCC) -DA4 $(DEVO_)gdevespg.$(OBJ) $(LIPS_OPT) $(C_) $(JAPSRC)gdevespg.c + + $(DD)escpage.dev : $(escpage_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)escpage $(escpage_) + + $(DD)lp2000.dev : $(escpage_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)lp2000 $(escpage_) + + ### --- The RICOH RPDL language printer device ------ ### +@@ -1218,7 +1223,7 @@ + $(DEVCC) $(DEVO_)gdevrpdl.$(OBJ) $(LIPS_OPT) $(C_) $(JAPSRC)gdevrpdl.c + + $(DD)rpdl.dev : $(rpdl_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)rpdl $(rpdl_) + + ### ---------- RICOH RPDL IV(600dpi) printer devices ---------- ### +@@ -1240,15 +1245,15 @@ + alps_=$(DEVOBJ)gdevalps.$(OBJ) + + $(DD)md50Mono.dev : $(alps_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)md50Mono $(alps_) + + $(DD)md50Eco.dev : $(alps_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)md50Eco $(alps_) + + $(DD)md1xMono.dev : $(alps_) $(DD)page.dev \ +- $(CONTRIB_MAK) $(MAKEDIRS) ++ $(CONTDEV) $(CONTRIB_MAK) $(MAKEDIRS) + $(SETPDEV) $(DD)md1xMono $(alps_) + + $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \ diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 5a7762640f7..d3d06d98cb1 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,4 +1,4 @@ -{ config, stdenv, lib, fetchurl, pkg-config, zlib, expat, openssl, autoconf +{ config, stdenv, lib, fetchurl, pkgconfig, zlib, expat, openssl, autoconf , libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec , libiconv, ijs, lcms2, fetchpatch , cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups ? null @@ -9,6 +9,10 @@ assert x11Support -> xlibsWrapper != null; assert cupsSupport -> cups != null; let + version = "9.${ver_min}"; + ver_min = "52"; + sha512 = "1ksm3v4nw8acc4j817n44l1c65ijk0mr3mp4kryy17jz41bmzzql5d8vr40h59n9dmf8b2wmnbq45bj3an1zrpfagavlf0i9s436jjc"; + fonts = stdenv.mkDerivation { name = "ghostscript-fonts"; @@ -33,27 +37,31 @@ let in stdenv.mkDerivation rec { pname = "ghostscript"; - version = "9.53.3"; + inherit version; src = fetchurl { - url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${lib.versions.minor version}${lib.versions.patch version}/${pname}-${version}.tar.xz"; - sha512 = "2vif3vgxa5wma16yxvhhkymk4p309y5204yykarq94r5rk890556d2lj5w7acnaa2ymkym6y0zd4vq9sy9ca2346igg2c6dxqkjr0zb"; + url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${ver_min}/${pname}-${version}.tar.xz"; + inherit sha512; }; patches = [ (fetchpatch { - url = "https://github.com/ArtifexSoftware/ghostpdl/commit/41ef9a0bc36b9db7115fbe9623f989bfb47bbade.patch"; - sha256 = "1qpc6q1fpxshqc0mqgg36kng47kgljk50bmr8p7wn21jgfkh7m8w"; + name = "CVE-2020-15900.patch"; + url = "https://github.com/ArtifexSoftware/ghostpdl/commit/5d499272b95a6b890a1397e11d20937de000d31b.patch"; + sha256 = "1nnnrn8q33x7nc8227ygc60f3mj4bjzrhj40sxp6dah58rb5x5jz"; }) ./urw-font-files.patch ./doc-no-ref.diff + # rebased version of upstream http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=1b4c3669a20c, + # Remove on update to version > 9.52 + ./0001-Bug-702364-Fix-missing-echogs-dependencies.patch ]; outputs = [ "out" "man" "doc" ]; enableParallelBuilding = true; - nativeBuildInputs = [ pkg-config autoconf ]; + nativeBuildInputs = [ pkgconfig autoconf ]; buildInputs = [ zlib expat openssl libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec @@ -107,6 +115,8 @@ stdenv.mkDerivation rec { install_name_tool -change libgs.dylib.${version} $out/lib/libgs.dylib.${version} $out/bin/gs ''; + passthru = { inherit version; }; + meta = { homepage = "https://www.ghostscript.com/"; description = "PostScript interpreter (mainline version)"; diff --git a/pkgs/misc/sndio/default.nix b/pkgs/misc/sndio/default.nix index 34e60b8a4bb..46c505ed439 100644 --- a/pkgs/misc/sndio/default.nix +++ b/pkgs/misc/sndio/default.nix @@ -4,8 +4,8 @@ stdenv.mkDerivation rec { pname = "sndio"; version = "1.7.0"; enableParallelBuilding = true; - nativeBuildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = stdenv.lib.optional stdenv.hostPlatform.isLinux alsaLib; + buildInputs = stdenv.lib.optionals stdenv.isLinux [ alsaLib ] + ++ stdenv.lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; src = fetchurl { url = "http://www.sndio.org/sndio-${version}.tar.gz"; diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 64fa92be865..0e10add5561 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -14,7 +14,7 @@ let apparmor-series = "2.13"; - apparmor-patchver = "5"; + apparmor-patchver = "4"; apparmor-version = apparmor-series + "." + apparmor-patchver; apparmor-meta = component: with stdenv.lib; { @@ -27,10 +27,19 @@ let apparmor-sources = fetchurl { url = "https://launchpad.net/apparmor/${apparmor-series}/${apparmor-version}/+download/apparmor-${apparmor-version}.tar.gz"; - sha256 = "05x7r99k00r97v1cq2f711lv6yqzhbl8zp1i1c7kxra4v0a2lzk3"; + sha256 = "03nislxccnbxld89giak2s8xa4mdbwscfxbdwhmw5qpvgz08dgwh"; + }; + + # See This and the + # accompanying application in prePatchCommon should be removed in 2.13.5 + gnumake43Patch = fetchpatch { + url = "https://gitlab.com/apparmor/apparmor/-/merge_requests/465.patch"; + name = "2-23-fix-build-with-make-4.3.patch"; + sha256 = "0xw028iqp69j9mxv0kbwraplgkj5i5djdlgf0anpkc5cdbsf96r9"; }; prePatchCommon = '' + patch -p1 < ${gnumake43Patch} chmod a+x ./common/list_capabilities.sh ./common/list_af_names.sh patchShebangs ./common/list_capabilities.sh ./common/list_af_names.sh substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man" diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index b3de7ceedaa..a9fcf455ee4 100644 --- a/pkgs/os-specific/linux/iproute/default.nix +++ b/pkgs/os-specific/linux/iproute/default.nix @@ -5,19 +5,19 @@ stdenv.mkDerivation rec { pname = "iproute2"; - version = "5.9.0"; + version = "5.8.0"; src = fetchurl { url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1kys6dmhrl43iaq95n5sh02p39d7bq8i5y672qrzgwnwpjaaqpd2"; + sha256 = "0vk4vickrpahdhl3zazr2qn2bf99v5549ncirjpwiy4h0a4izkfg"; }; preConfigure = '' # Don't try to create /var/lib/arpd: sed -e '/ARPDDIR/d' -i Makefile - # TODO: Drop temporary version fix for 5.9 once 5.10 is out: + # TODO: Drop temporary version fix for 5.8 (53159d81) once 5.9 is out: substituteInPlace include/version.h \ - --replace "5.8.0" "${version}" + --replace "v5.7.0-77-gb687d1067169" "5.8.0" ''; outputs = [ "out" "dev" ]; diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index 7931e35a844..174f1be99db 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libcap"; - version = "2.44"; + version = "2.27"; src = fetchurl { url = "mirror://kernel/linux/libs/security/linux-privs/libcap2/${pname}-${version}.tar.xz"; - sha256 = "1qf80lifygbnxwvqjf8jz5j24n6fqqx4ixnkbf76xs2vrmcq664j"; + sha256 = "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs"; }; outputs = [ "out" "dev" "lib" "man" "doc" "pam" ]; @@ -54,7 +54,6 @@ stdenv.mkDerivation rec { meta = { description = "Library for working with POSIX capabilities"; - homepage = "https://sites.google.com/site/fullycapable"; platforms = stdenv.lib.platforms.linux; license = stdenv.lib.licenses.bsd3; }; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index da99280f63b..cef9d96ae6e 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,61 +1,27 @@ -{ stdenv, lib, fetchFromGitHub -, buildPackages -, ninja, meson, m4, pkgconfig, coreutils, gperf, getent -, patchelf, perl, glibcLocales, glib, substituteAll -, gettext, python3Packages - -# Mandatory dependencies -, libcap -, utillinux -, kbd -, kmod - -# Optional dependencies -, pam, cryptsetup, lvm2, audit, acl -, lz4, libgcrypt, libgpgerror, libidn2 -, curl, gnutar, gnupg, zlib -, xz, libuuid, libffi -, libapparmor, intltool -, bzip2, pcre2, e2fsprogs +{ stdenv, lib, fetchFromGitHub, pkgconfig, intltool, gperf, libcap +, curl, kmod, gnupg, gnutar, xz, pam, acl, libuuid, m4, e2fsprogs, utillinux, libffi +, glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor +, audit, lz4, bzip2, pcre2 , linuxHeaders ? stdenv.cc.libc.linuxHeaders -, gnu-efi -, iptables +, iptables, gnu-efi, bashInteractive +, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 +, ninja, meson, python3Packages, glibcLocales +, patchelf +, substituteAll +, getent +, cryptsetup, lvm2 +, buildPackages +, perl , withSelinux ? false, libselinux , withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools -, bashInteractive - -, withResolved ? true -, withLogind ? true -, withHostnamed ? true -, withLocaled ? true -, withNetworkd ? true -, withTimedated ? true -, withTimesyncd ? true -, withHwdb ? true -, withEfi ? stdenv.hostPlatform.isEfi -, withImportd ? true -, withCryptsetup ? true - -# name argument -, pname ? "systemd" - - -, libxslt, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 }: -assert withResolved -> (libgcrypt != null && libgpgerror != null); -assert withImportd -> - ( curl.dev != null && zlib != null && xz != null && libgcrypt != null - && gnutar != null && gnupg != null); - -assert withCryptsetup -> - ( cryptsetup != null ); - let version = "246.6"; in stdenv.mkDerivation { - inherit version pname; + inherit version; + pname = "systemd"; # We use systemd/systemd-stable for src, and ship NixOS-specific patches inside nixpkgs directly # This has proven to be less error-prone than the previous systemd fork. @@ -105,17 +71,13 @@ in stdenv.mkDerivation { outputs = [ "out" "man" "dev" ]; nativeBuildInputs = - [ pkgconfig gperf + [ pkgconfig intltool gperf libxslt gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 ninja meson coreutils # meson calls date, stat etc. glibcLocales patchelf getent m4 perl # to patch the libsystemd.so and remove dependencies on aarch64 - intltool - gettext - - libxslt docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 (buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ])) ]; buildInputs = @@ -124,10 +86,9 @@ in stdenv.mkDerivation { pcre2 ] ++ stdenv.lib.optional withKexectools kexectools ++ stdenv.lib.optional withLibseccomp libseccomp ++ - [ libffi audit lz4 bzip2 libapparmor iptables ] ++ - stdenv.lib.optional withEfi gnu-efi ++ - stdenv.lib.optional withSelinux libselinux ++ - stdenv.lib.optional withCryptsetup cryptsetup.dev; + [ libffi audit lz4 bzip2 libapparmor + iptables gnu-efi + ] ++ stdenv.lib.optional withSelinux libselinux; #dontAddPrefix = true; @@ -145,23 +106,19 @@ in stdenv.mkDerivation { "-Ddebug-shell=${bashInteractive}/bin/bash" # while we do not run tests we should also not build them. Removes about 600 targets "-Dtests=false" - "-Dimportd=${stdenv.lib.boolToString withImportd}" + "-Dimportd=true" "-Dlz4=true" "-Dhomed=false" - "-Dlogind=${stdenv.lib.boolToString withLogind}" - "-Dlocaled=${stdenv.lib.boolToString withLocaled}" - "-Dhostnamed=${stdenv.lib.boolToString withHostnamed}" - "-Dnetworkd=${stdenv.lib.boolToString withNetworkd}" - "-Dcryptsetup=${stdenv.lib.boolToString withCryptsetup}" + "-Dhostnamed=true" + "-Dnetworkd=true" "-Dportabled=false" - "-Dhwdb=${stdenv.lib.boolToString withHwdb}" "-Dremote=false" "-Dsysusers=false" - "-Dtimedated=${stdenv.lib.boolToString withTimedated}" - "-Dtimesyncd=${stdenv.lib.boolToString withTimesyncd}" + "-Dtimedated=true" + "-Dtimesyncd=true" "-Dfirstboot=false" "-Dlocaled=true" - "-Dresolve=${stdenv.lib.boolToString withResolved}" + "-Dresolve=true" "-Dsplit-usr=false" "-Dlibcurl=true" "-Dlibidn=false" @@ -184,6 +141,11 @@ in stdenv.mkDerivation { "-Dsystem-gid-max=999" # "-Dtime-epoch=1" + (if !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true") + "-Defi-libdir=${toString gnu-efi}/lib" + "-Defi-includedir=${toString gnu-efi}/include/efi" + "-Defi-ldsdir=${toString gnu-efi}/lib" + "-Dsysvinit-path=" "-Dsysvrcnd-path=" @@ -199,12 +161,6 @@ in stdenv.mkDerivation { # Upstream defaulted to disable manpages since they optimize for the much # more frequent development builds "-Dman=true" - - "-Dgnu-efi=${stdenv.lib.boolToString (withEfi && gnu-efi != null)}" - ] ++ stdenv.lib.optionals (withEfi && gnu-efi != null) [ - "-Defi-libdir=${toString gnu-efi}/lib" - "-Defi-includedir=${toString gnu-efi}/include/efi" - "-Defi-ldsdir=${toString gnu-efi}/lib" ]; preConfigure = '' @@ -328,6 +284,6 @@ in stdenv.mkDerivation { license = licenses.lgpl21Plus; platforms = platforms.linux; priority = 10; - maintainers = with maintainers; [ andir eelco flokli kloenk ]; + maintainers = with maintainers; [ andir eelco flokli ]; }; } diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 3b86d8a7394..0b91e2d4fd2 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -34,13 +34,12 @@ common = rec { # attributes common to both builds name = "mariadb-${version}.tar.gz"; }; - nativeBuildInputs = [ cmake pkgconfig ] - ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ ncurses openssl zlib pcre libiconv curl ] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ] - ++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ] + ++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ] ++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ]; diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 96f40649c0f..efc2cb2acbd 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -703,11 +703,11 @@ lib.makeScope newScope (self: with self; { }) {}; libX11 = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libxcb, xtrans }: stdenv.mkDerivation { - name = "libX11-1.6.12"; + name = "libX11-1.6.8"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/lib/libX11-1.6.12.tar.bz2"; - sha256 = "1ivfzl1qwk8zh7gc0m5vb58gdxz11jwg7w3d356w16j1d5s2427i"; + url = "mirror://xorg/individual/lib/libX11-1.6.8.tar.bz2"; + sha256 = "1mbkwhhprhf49s2iwx7kiliprsdvd690zk44x3h53ql9q52si2dj"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; @@ -1054,11 +1054,11 @@ lib.makeScope newScope (self: with self; { }) {}; libXvMC = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libX11, libXext, libXv }: stdenv.mkDerivation { - name = "libXvMC-1.0.12"; + name = "libXvMC-1.0.11"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/lib/libXvMC-1.0.12.tar.bz2"; - sha256 = "1kbdjsvkm5l7axv7g477qj18sab2wnqhliy6197syzizgfbsfgbb"; + url = "mirror://xorg/individual/lib/libXvMC-1.0.11.tar.bz2"; + sha256 = "0bb2c996p0smp2lwckffcfh4701bzv7266xh230ag0x68ka38bja"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; @@ -1158,11 +1158,11 @@ lib.makeScope newScope (self: with self; { }) {}; libxcb = callPackage ({ stdenv, pkgconfig, fetchurl, libxslt, libpthreadstubs, libXau, xcbproto, libXdmcp, python }: stdenv.mkDerivation { - name = "libxcb-1.14"; + name = "libxcb-1.13.1"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/lib/libxcb-1.14.tar.xz"; - sha256 = "0d2chjgyn5lr9sfhacfvqgnj9l9faz11vn322a06jd6lk3dxcpm5"; + url = "https://xcb.freedesktop.org/dist/libxcb-1.13.1.tar.bz2"; + sha256 = "1i27lvrcsygims1pddpl5c4qqs6z715lm12ax0n3vx0igapvg7x8"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig python ]; @@ -1431,11 +1431,11 @@ lib.makeScope newScope (self: with self; { }) {}; xcbproto = callPackage ({ stdenv, pkgconfig, fetchurl, python }: stdenv.mkDerivation { - name = "xcb-proto-1.14.1"; + name = "xcb-proto-1.13"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/proto/xcb-proto-1.14.1.tar.xz"; - sha256 = "1hzwazgyywd9mz4mjj1yv8ski27qqx7ypmyr27m39hrajyddsjph"; + url = "https://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.bz2"; + sha256 = "1qdxw9syhbvswiqj5dvj278lrmfhs81apzmvx6205s4vcqg7563v"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig python ]; @@ -1717,11 +1717,11 @@ lib.makeScope newScope (self: with self; { }) {}; xf86inputlibinput = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libinput, xorgserver }: stdenv.mkDerivation { - name = "xf86-input-libinput-0.30.0"; + name = "xf86-input-libinput-0.28.2"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/driver/xf86-input-libinput-0.30.0.tar.bz2"; - sha256 = "1h4np66p87jf0c85ig524w8f5rbhl5gx8fww1qg0c55f87yzkizr"; + url = "mirror://xorg/individual/driver/xf86-input-libinput-0.28.2.tar.bz2"; + sha256 = "0818vr0yhk9j1y1wcbxzcd458vrvp06rrhi8k43bhqkb5jb4dcxq"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; @@ -2679,11 +2679,11 @@ lib.makeScope newScope (self: with self; { }) {}; xorgproto = callPackage ({ stdenv, pkgconfig, fetchurl, libXt }: stdenv.mkDerivation { - name = "xorgproto-2020.1"; + name = "xorgproto-2019.1"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/proto/xorgproto-2020.1.tar.bz2"; - sha256 = "1llrnrkq6iprgiqakmwlv89745s9h02xsiaq0xn3fnh377qm78al"; + url = "mirror://xorg/individual/proto/xorgproto-2019.1.tar.bz2"; + sha256 = "16yll1kaffnslik5sizlw3qrigj1gpsgfgyq6903g3mwdixamnm6"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index e6047458cf2..80ea5553ad6 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -82,6 +82,13 @@ self: super: libX11 = super.libX11.overrideAttrs (attrs: { outputs = [ "out" "dev" "man" ]; + patches = [ + # Fixes an issue that happens when cross-compiling for us. + (fetchpatch { + url = "https://cgit.freedesktop.org/xorg/lib/libX11/patch/?id=0327c427d62f671eced067c6d9b69f4e216a8cac"; + sha256 = "11k2mx56hjgw886zf1cdf2nhv7052d5rggimfshg6lq20i38vpza"; + }) + ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list index cd294604884..ecc477980b8 100644 --- a/pkgs/servers/x11/xorg/tarballs.list +++ b/pkgs/servers/x11/xorg/tarballs.list @@ -1,5 +1,7 @@ https://invisible-mirror.net/archives/luit/luit-20190106.tgz https://xcb.freedesktop.org/dist/libpthread-stubs-0.4.tar.bz2 +https://xcb.freedesktop.org/dist/libxcb-1.13.1.tar.bz2 +https://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.bz2 https://xcb.freedesktop.org/dist/xcb-util-0.4.0.tar.bz2 https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.bz2 https://xcb.freedesktop.org/dist/xcb-util-errors-1.0.tar.bz2 @@ -81,7 +83,7 @@ mirror://xorg/individual/doc/xorg-sgml-doctools-1.11.tar.bz2 mirror://xorg/individual/driver/xf86-input-evdev-2.10.6.tar.bz2 mirror://xorg/individual/driver/xf86-input-joystick-1.6.3.tar.bz2 mirror://xorg/individual/driver/xf86-input-keyboard-1.9.0.tar.bz2 -mirror://xorg/individual/driver/xf86-input-libinput-0.30.0.tar.bz2 +mirror://xorg/individual/driver/xf86-input-libinput-0.28.2.tar.bz2 mirror://xorg/individual/driver/xf86-input-mouse-1.9.3.tar.bz2 mirror://xorg/individual/driver/xf86-input-synaptics-1.9.1.tar.bz2 mirror://xorg/individual/driver/xf86-input-vmmouse-13.1.0.tar.bz2 @@ -175,11 +177,10 @@ mirror://xorg/individual/lib/libICE-1.0.10.tar.bz2 mirror://xorg/individual/lib/libpciaccess-0.16.tar.bz2 mirror://xorg/individual/lib/libSM-1.2.3.tar.bz2 mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2 -mirror://xorg/individual/lib/libX11-1.6.12.tar.bz2 +mirror://xorg/individual/lib/libX11-1.6.8.tar.bz2 mirror://xorg/individual/lib/libXau-1.0.9.tar.bz2 mirror://xorg/individual/lib/libXaw-1.0.13.tar.bz2 mirror://xorg/individual/lib/libXaw3d-1.6.3.tar.bz2 -mirror://xorg/individual/lib/libxcb-1.14.tar.xz mirror://xorg/individual/lib/libXcomposite-0.4.5.tar.bz2 mirror://xorg/individual/lib/libXcursor-1.2.0.tar.bz2 mirror://xorg/individual/lib/libXdamage-1.1.5.tar.bz2 @@ -205,13 +206,12 @@ mirror://xorg/individual/lib/libXTrap-1.0.1.tar.bz2 mirror://xorg/individual/lib/libXt-1.2.0.tar.bz2 mirror://xorg/individual/lib/libXtst-1.2.3.tar.bz2 mirror://xorg/individual/lib/libXv-1.0.11.tar.bz2 -mirror://xorg/individual/lib/libXvMC-1.0.12.tar.bz2 +mirror://xorg/individual/lib/libXvMC-1.0.11.tar.bz2 mirror://xorg/individual/lib/libXxf86dga-1.1.5.tar.bz2 mirror://xorg/individual/lib/libXxf86misc-1.0.4.tar.bz2 mirror://xorg/individual/lib/libXxf86vm-1.1.4.tar.bz2 mirror://xorg/individual/lib/xtrans-1.4.0.tar.bz2 -mirror://xorg/individual/proto/xcb-proto-1.14.1.tar.xz -mirror://xorg/individual/proto/xorgproto-2020.1.tar.bz2 +mirror://xorg/individual/proto/xorgproto-2019.1.tar.bz2 mirror://xorg/individual/util/gccmakedep-1.0.3.tar.bz2 mirror://xorg/individual/util/imake-1.0.8.tar.bz2 mirror://xorg/individual/util/lndir-1.0.3.tar.bz2 diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index 5fda5704812..eeb175a5e78 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "bash-completion"; - version = "2.11"; + version = "2.10"; src = fetchFromGitHub { owner = "scop"; repo = "bash-completion"; rev = version; - sha256 = "0m3brd5jx7w07h8vxvvcmbyrlnadrx6hra3cvx6grzv6rin89liv"; + sha256 = "047yjryy9d6hp18wkigbfrw9r0sm31inlsp8l28fhxg8ii032sgq"; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 58da8b71b65..a040e6ab242 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -190,7 +190,10 @@ in rec { stage1 = prevStage: let persistent = self: super: with prevStage; { - cmake = super.cmakeMinimal; + cmake = super.cmake.override { + isBootstrap = true; + useSharedLibraries = false; + }; python3 = super.python3Minimal; diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index d9befb9350a..85142090dd4 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -27,8 +27,6 @@ with pkgs; cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; }; cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; }; - install-shell-files = callPackage ./install-shell-files {}; - kernel-config = callPackage ./kernel.nix {}; ld-library-path = callPackage ./ld-library-path {}; diff --git a/pkgs/test/install-shell-files/default.nix b/pkgs/test/install-shell-files/default.nix deleted file mode 100644 index e3729c7d250..00000000000 --- a/pkgs/test/install-shell-files/default.nix +++ /dev/null @@ -1,125 +0,0 @@ -{ stdenv, runCommandLocal, recurseIntoAttrs, installShellFiles }: - -let - runTest = name: env: buildCommand: - runCommandLocal "install-shell-files--${name}" ({ - nativeBuildInputs = [ installShellFiles ]; - meta.platforms = stdenv.lib.platforms.all; - } // env) buildCommand; -in - -recurseIntoAttrs { - # installManPage - - install-manpage = runTest "install-manpage" {} '' - mkdir -p doc - echo foo > doc/foo.1 - echo bar > doc/bar.2.gz - echo baz > doc/baz.3 - - installManPage doc/* - - cmp doc/foo.1 $out/share/man/man1/foo.1 - cmp doc/bar.2.gz $out/share/man/man2/bar.2.gz - cmp doc/baz.3 $out/share/man/man3/baz.3 - ''; - install-manpage-outputs = runTest "install-manpage-outputs" { - outputs = [ "out" "man" "devman" ]; - } '' - mkdir -p doc - echo foo > doc/foo.1 - echo bar > doc/bar.3 - - installManPage doc/* - - # assert they didn't go into $out - [[ ! -f $out/share/man/man1/foo.1 && ! -f $out/share/man/man3/bar.3 ]] - - # foo.1 alone went into man - cmp doc/foo.1 ''${!outputMan:?}/share/man/man1/foo.1 - [[ ! -f ''${!outputMan:?}/share/man/man3/bar.3 ]] - - # bar.3 alone went into devman - cmp doc/bar.3 ''${!outputDevman:?}/share/man/man3/bar.3 - [[ ! -f ''${!outputDevman:?}/share/man/man1/foo.1 ]] - - touch $out - ''; - - # installShellCompletion - - install-completion = runTest "install-completion" {} '' - echo foo > foo - echo bar > bar - echo baz > baz - echo qux > qux.zsh - echo quux > quux - - installShellCompletion --bash foo bar --zsh baz qux.zsh --fish quux - - cmp foo $out/share/bash-completion/completions/foo - cmp bar $out/share/bash-completion/completions/bar - cmp baz $out/share/zsh/site-functions/_baz - cmp qux.zsh $out/share/zsh/site-functions/_qux - cmp quux $out/share/fish/vendor_completions.d/quux - ''; - install-completion-output = runTest "install-completion-output" { - outputs = [ "out" "bin" ]; - } '' - echo foo > foo - - installShellCompletion --bash foo - - # assert it didn't go into $out - [[ ! -f $out/share/bash-completion/completions/foo ]] - - cmp foo ''${!outputBin:?}/share/bash-completion/completions/foo - - touch $out - ''; - install-completion-name = runTest "install-completion-name" {} '' - echo foo > foo - echo bar > bar - echo baz > baz - - installShellCompletion --bash --name foobar.bash foo --zsh --name _foobar bar --fish baz - - cmp foo $out/share/bash-completion/completions/foobar.bash - cmp bar $out/share/zsh/site-functions/_foobar - cmp baz $out/share/fish/vendor_completions.d/baz - ''; - install-completion-inference = runTest "install-completion-inference" {} '' - echo foo > foo.bash - echo bar > bar.zsh - echo baz > baz.fish - - installShellCompletion foo.bash bar.zsh baz.fish - - cmp foo.bash $out/share/bash-completion/completions/foo.bash - cmp bar.zsh $out/share/zsh/site-functions/_bar - cmp baz.fish $out/share/fish/vendor_completions.d/baz.fish - ''; - install-completion-cmd = runTest "install-completion-cmd" {} '' - echo foo > foo.bash - echo bar > bar.zsh - echo baz > baz.fish - echo qux > qux.fish - - installShellCompletion --cmd foobar --bash foo.bash --zsh bar.zsh --fish baz.fish --name qux qux.fish - - cmp foo.bash $out/share/bash-completion/completions/foobar.bash - cmp bar.zsh $out/share/zsh/site-functions/_foobar - cmp baz.fish $out/share/fish/vendor_completions.d/foobar.fish - cmp qux.fish $out/share/fish/vendor_completions.d/qux - ''; - install-completion-fifo = runTest "install-completion-fifo" {} '' - installShellCompletion \ - --bash --name foo.bash <(echo foo) \ - --zsh --name _foo <(echo bar) \ - --fish --name foo.fish <(echo baz) - - [[ $(<$out/share/bash-completion/completions/foo.bash) == foo ]] || { echo "foo.bash comparison failed"; exit 1; } - [[ $(<$out/share/zsh/site-functions/_foo) == bar ]] || { echo "_foo comparison failed"; exit 1; } - [[ $(<$out/share/fish/vendor_completions.d/foo.fish) == baz ]] || { echo "foo.fish comparison failed"; exit 1; } - ''; -} diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index fd4872cf844..bf20e0119ec 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "brotli"; - version = "1.0.9"; + version = "1.0.7"; src = fetchFromGitHub { owner = "google"; repo = "brotli"; rev = "v" + version; - sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c="; + sha256 = "1811b55wdfg4kbsjcgh1kc938g118jpvif97ilgrmbls25dfpvvw"; }; nativeBuildInputs = [ cmake ]; @@ -32,14 +32,7 @@ stdenv.mkDerivation rec { # This breaks on Darwin because our cmake hook tries to make a build folder # and the wonderful bazel BUILD file is already there (yay case-insensitivity?) - prePatch = '' - rm BUILD - - # Upstream fixed this reference to runtime-path after the release - # and with this references g++ complains about invalid option -R - sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in - cat scripts/libbrotli*.pc.in - ''; + prePatch = "rm BUILD"; # Don't bother with "man" output for now, # it currently only makes the manpages hard to use. diff --git a/pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch b/pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch new file mode 100644 index 00000000000..ae1a02d4d20 --- /dev/null +++ b/pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch @@ -0,0 +1,52 @@ +From 0251229bfd9617e8a35cf9dd7d338d63fff74a0c Mon Sep 17 00:00:00 2001 +From: Assaf Gordon +Date: Mon, 13 May 2019 16:37:40 -0600 +Subject: [PATCH] tests: avoid false-positive in date-debug test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When debugging an invalid date due to DST switching, the intermediate +'normalized time' should not be checked - its value can differ between +systems (e.g. glibc vs musl). + +Reported by Niklas Hambüchen in +https://lists.gnu.org/r/coreutils/2019-05/msg00031.html +Analyzed by Rich Felker in +https://lists.gnu.org/r/coreutils/2019-05/msg00039.html + +* tests/misc/date-debug.sh: Replace the exact normalized time +with 'XX:XX:XX' so different values would not trigger test failure. +--- + tests/misc/date-debug.sh | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh +index aa47f1abb..2ce6f4ce8 100755 +--- a/tests/misc/date-debug.sh ++++ b/tests/misc/date-debug.sh +@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string + date: using specified time as starting value: '02:30:00' + date: error: invalid date/time value: + date: user provided time: '(Y-M-D) 2006-04-02 02:30:00' +-date: normalized time: '(Y-M-D) 2006-04-02 03:30:00' ++date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX' + date: -- + date: possible reasons: + date: non-existing due to daylight-saving time; +@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00' + EOF + + # date should return 1 (error) for invalid date +-returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1 ++returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1 ++ ++# The output line of "normalized time" can differ between systems ++# (e.g. glibc vs musl) and should not be checked. ++# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html ++sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \ ++ out2-t > out2 || framework_failure_ ++ + compare exp2 out2 || fail=1 + + ## diff --git a/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch b/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch new file mode 100644 index 00000000000..97d95d1c5b1 --- /dev/null +++ b/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch @@ -0,0 +1,51 @@ +From 3bd82a82cf4ba693d2c31c7b95aaec4e56dc92a4 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Mon, 11 Mar 2019 16:40:29 -0700 +Subject: [PATCH 1/1] strtod: fix clash with strtold + +Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). +* lib/strtod.c (compute_minus_zero, minus_zero): +Simplify by remving the macro / external variable, +and having just a function. User changed. This avoids +the need for an external variable that might clash. +--- + ChangeLog | 9 +++++++++ + lib/strtod.c | 11 +++++------ + 2 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/lib/strtod.c b/lib/strtod.c +index b9eaa51..69b1564 100644 +--- a/lib/strtod.c ++++ b/lib/strtod.c +@@ -294,16 +294,15 @@ parse_number (const char *nptr, + ICC 10.0 has a bug when optimizing the expression -zero. + The expression -MIN * MIN does not work when cross-compiling + to PowerPC on Mac OS X 10.5. */ +-#if defined __hpux || defined __sgi || defined __ICC + static DOUBLE +-compute_minus_zero (void) ++minus_zero (void) + { ++#if defined __hpux || defined __sgi || defined __ICC + return -MIN * MIN; +-} +-# define minus_zero compute_minus_zero () + #else +-DOUBLE minus_zero = -0.0; ++ return -0.0; + #endif ++} + + /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the + character after the last one used in the number is put in *ENDPTR. */ +@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr) + /* Special case -0.0, since at least ICC miscompiles negation. We + can't use copysign(), as that drags in -lm on some platforms. */ + if (!num && negative) +- return minus_zero; ++ return minus_zero (); + return negative ? -num : num; + } +-- +1.9.1 + diff --git a/pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch b/pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch new file mode 100644 index 00000000000..02b0b85db31 --- /dev/null +++ b/pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch @@ -0,0 +1,1153 @@ +From 453ff940449bbbde9ec00f0bbf82a359c5598fc7 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sat, 23 Mar 2019 23:00:52 +0100 +Subject: [PATCH 1/1] Support cross-compilation to musl libc. + +Reported by Necktwi Ozfguah . + +* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for +musl libc. +* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise. +* m4/chown.m4 (gl_FUNC_CHOWN): Likewise. +* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise. +* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. +* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise. +* m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise. +* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. +* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. +* m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. +* m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise. +* m4/getline.m4 (gl_FUNC_GETLINE): Likewise. +* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise. +* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise. // removed +* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise. // removed +* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise. // removed +* m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise. // removed +* m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise. +* m4/log.m4 (gl_FUNC_LOG): Likewise. // removed +* m4/logf.m4 (gl_FUNC_LOGF): Likewise. // removed +* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise. // removed +* m4/log10.m4 (gl_FUNC_LOG10): Likewise. // removed +* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise. // removed +* m4/log10l.m4 (gl_FUNC_LOG10L): Likewise. // removed +* m4/log1p.m4 (gl_FUNC_LOG1P): Likewise. // removed +* m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise. // removed +* m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise. // removed +* m4/log2.m4 (gl_FUNC_LOG2): Likewise. // removed +* m4/log2f.m4 (gl_FUNC_LOG2F): Likewise. // removed +* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise. +* m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. +* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. +* m4/modf.m4 (gl_FUNC_MODF): Likewise. // removed +* m4/modff.m4 (gl_FUNC_MODFF): Likewise. // removed +* m4/modfl.m4 (gl_FUNC_MODFL): Likewise. // removed +* m4/perror.m4 (gl_FUNC_PERROR): Likewise. +* m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE, +gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A, +gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99, +gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N, +gl_VSNPRINTF_ZEROSIZE_C99): Likewise. +* m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise. // removed +* m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. +* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise. +* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise. // removed +* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise. // removed +* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise. // removed +* m4/rintl.m4 (gl_FUNC_RINTL): Likewise. // removed +* m4/round.m4 (gl_FUNC_ROUND): Likewise. // removed +* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. // removed +* m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise. // removed +* m4/setenv.m4 (gl_FUNC_SETENV): Likewise. +* m4/signbit.m4 (gl_SIGNBIT): Likewise. +* m4/sleep.m4 (gl_FUNC_SLEEP): Likewise. +* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise. +* m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise. +* m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. +* m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise. +* m4/trunc.m4 (gl_FUNC_TRUNC): Likewise. // removed +* m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise. // removed +* m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise. // removed +* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise. +* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise. +* m4/usleep.m4 (gl_FUNC_USLEEP): Likewise. +* m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. +* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise. +--- + m4/calloc.m4 | 4 ++- + m4/canonicalize.m4 | 4 ++- + m4/chown.m4 | 22 +++++++------ + m4/d-ino.m4 | 16 +++++----- + m4/fdopendir.m4 | 12 ++++--- + m4/fnmatch.m4 | 18 ++++++++--- + m4/fpurge.m4 | 24 +++++++++----- + m4/getcwd-abort-bug.m4 | 11 +++++-- + m4/getcwd.m4 | 4 ++- + m4/getdelim.m4 | 40 ++++++++++++++---------- + m4/getgroups.m4 | 6 +++- + m4/getline.m4 | 38 +++++++++++++--------- + m4/gettimeofday.m4 | 4 ++- + m4/link-follow.m4 | 4 ++- + m4/malloc.m4 | 4 +-- + m4/mkdir.m4 | 4 ++- + m4/mkstemp.m4 | 4 ++- + m4/perror.m4 | 12 ++++--- + m4/printf.m4 | 22 ++++++++++++- + m4/putenv.m4 | 4 ++- + m4/realloc.m4 | 4 +-- + m4/setenv.m4 | 4 ++- + m4/signbit.m4 | 6 +++- + m4/sleep.m4 | 4 ++- + m4/stpncpy.m4 | 14 +++++++-- + m4/strerror.m4 | 6 +++- + m4/strtod.m4 | 10 +++--- + m4/strtold.m4 | 9 ++++-- + m4/tzset.m4 | 4 ++- + m4/ungetc.m4 | 18 ++++++----- + m4/usleep.m4 | 4 ++- + m4/utimes.m4 | 10 +++--- + m4/wcwidth.m4 | 12 ++++--- + 76 files changed, 461 insertions(+), 157 deletions(-) + +diff --git a/m4/calloc.m4 b/m4/calloc.m4 +index 012a5bf..d76535d 100644 +--- a/m4/calloc.m4 ++++ b/m4/calloc.m4 +@@ -1,4 +1,4 @@ +-# calloc.m4 serial 18 ++# calloc.m4 serial 19 + + # Copyright (C) 2004-2019 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -40,6 +40,8 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # Guess yes on native Windows. + mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # If we don't know, assume the worst. +diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 +index 5b6e25d..b61747b 100644 +--- a/m4/canonicalize.m4 ++++ b/m4/canonicalize.m4 +@@ -1,4 +1,4 @@ +-# canonicalize.m4 serial 29 ++# canonicalize.m4 serial 30 + + dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc. + +@@ -113,6 +113,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_realpath_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_realpath_works="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/chown.m4 b/m4/chown.m4 +index ecfc0c0..b798325 100644 +--- a/m4/chown.m4 ++++ b/m4/chown.m4 +@@ -1,4 +1,4 @@ +-# serial 30 ++# serial 32 + # Determine whether we need the chown wrapper. + + dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2019 Free Software +@@ -109,10 +109,12 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN], + [gl_cv_func_chown_slash_works=yes], + [gl_cv_func_chown_slash_works=no], + [case "$host_os" in +- # Guess yes on glibc systems. +- *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;; +- # If we don't know, assume the worst. +- *) gl_cv_func_chown_slash_works="guessing no" ;; ++ # Guess yes on glibc systems. ++ *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;; ++ # If we don't know, assume the worst. ++ *) gl_cv_func_chown_slash_works="guessing no" ;; + esac + ]) + rm -f conftest.link conftest.file]) +@@ -145,10 +147,12 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN], + [gl_cv_func_chown_ctime_works=yes], + [gl_cv_func_chown_ctime_works=no], + [case "$host_os" in +- # Guess yes on glibc systems. +- *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;; +- # If we don't know, assume the worst. +- *) gl_cv_func_chown_ctime_works="guessing no" ;; ++ # Guess yes on glibc systems. ++ *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;; ++ # If we don't know, assume the worst. ++ *) gl_cv_func_chown_ctime_works="guessing no" ;; + esac + ]) + rm -f conftest.file]) +diff --git a/m4/d-ino.m4 b/m4/d-ino.m4 +index f1420cc..87dcacc 100644 +--- a/m4/d-ino.m4 ++++ b/m4/d-ino.m4 +@@ -1,4 +1,4 @@ +-# serial 18 ++# serial 19 + + dnl From Jim Meyering. + dnl +@@ -40,12 +40,14 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], + [gl_cv_struct_dirent_d_ino=yes], + [gl_cv_struct_dirent_d_ino=no], + [case "$host_os" in +- # Guess yes on glibc systems with Linux kernel. +- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; +- # Guess no on native Windows. +- mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; +- # If we don't know, assume the worst. +- *) gl_cv_struct_dirent_d_ino="guessing no" ;; ++ # Guess yes on glibc systems with Linux kernel. ++ linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; ++ # Guess yes on musl systems with Linux kernel. ++ linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;; ++ # Guess no on native Windows. ++ mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; ++ # If we don't know, assume the worst. ++ *) gl_cv_struct_dirent_d_ino="guessing no" ;; + esac + ])]) + case "$gl_cv_struct_dirent_d_ino" in +diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 +index 0490551..b2b3b03 100644 +--- a/m4/fdopendir.m4 ++++ b/m4/fdopendir.m4 +@@ -1,4 +1,4 @@ +-# serial 10 ++# serial 11 + # See if we need to provide fdopendir. + + dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. +@@ -45,10 +45,12 @@ DIR *fdopendir (int); + [gl_cv_func_fdopendir_works=yes], + [gl_cv_func_fdopendir_works=no], + [case "$host_os" in +- # Guess yes on glibc systems. +- *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; +- # If we don't know, assume the worst. +- *) gl_cv_func_fdopendir_works="guessing no" ;; ++ # Guess yes on glibc systems. ++ *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; ++ # If we don't know, assume the worst. ++ *) gl_cv_func_fdopendir_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_fdopendir_works" in +diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 +index c264ca7..75ba55b 100644 +--- a/m4/fnmatch.m4 ++++ b/m4/fnmatch.m4 +@@ -1,4 +1,4 @@ +-# Check for fnmatch - serial 13. -*- coding: utf-8 -*- ++# Check for fnmatch - serial 14. -*- coding: utf-8 -*- + + # Copyright (C) 2000-2007, 2009-2019 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], + m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) + + AC_REQUIRE([gl_FNMATCH_H]) ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + gl_fnmatch_required_lowercase=` + echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' + ` +@@ -117,12 +118,19 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], + ]])], + [eval "$gl_fnmatch_cache_var=yes"], + [eval "$gl_fnmatch_cache_var=no"], +- [eval "$gl_fnmatch_cache_var=\"guessing no\""]) ++ [case "$host_os" in ++ # Guess yes on musl systems. ++ *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;; ++ # Guess no otherwise, even on glibc systems. ++ *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;; ++ esac ++ ]) + ]) + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" +- if test "$gl_fnmatch_result" != yes; then +- REPLACE_FNMATCH=1 +- fi ++ case "$gl_fnmatch_result" in ++ *yes) ;; ++ *) REPLACE_FNMATCH=1 ;; ++ esac + fi + if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then + gl_REPLACE_FNMATCH_H +diff --git a/m4/fpurge.m4 b/m4/fpurge.m4 +index cb21f56..6c5b3e9 100644 +--- a/m4/fpurge.m4 ++++ b/m4/fpurge.m4 +@@ -1,4 +1,4 @@ +-# fpurge.m4 serial 8 ++# fpurge.m4 serial 9 + dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -7,12 +7,13 @@ dnl with or without modifications, as long as this notice is preserved. + AC_DEFUN([gl_FUNC_FPURGE], + [ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_FUNCS_ONCE([fpurge]) + AC_CHECK_FUNCS_ONCE([__fpurge]) + AC_CHECK_DECLS([fpurge], , , [[#include ]]) + if test "x$ac_cv_func_fpurge" = xyes; then + HAVE_FPURGE=1 +- # Detect BSD bug. Only cygwin 1.7 is known to be immune. ++ # Detect BSD bug. Only cygwin 1.7 and musl are known to be immune. + AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( +@@ -48,11 +49,20 @@ AC_DEFUN([gl_FUNC_FPURGE], + return 13; + return 0; + ])], +- [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no], +- [gl_cv_func_fpurge_works='guessing no'])]) +- if test "x$gl_cv_func_fpurge_works" != xyes; then +- REPLACE_FPURGE=1 +- fi ++ [gl_cv_func_fpurge_works=yes], ++ [gl_cv_func_fpurge_works=no], ++ [case "$host_os" in ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_fpurge_works="guessing yes" ;; ++ # Guess no otherwise. ++ *) gl_cv_func_fpurge_works="guessing no" ;; ++ esac ++ ]) ++ ]) ++ case "$gl_cv_func_fpurge_works" in ++ *yes) ;; ++ *) REPLACE_FPURGE=1 ;; ++ esac + else + HAVE_FPURGE=0 + fi +diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4 +index f0f24a5..7227f08 100644 +--- a/m4/getcwd-abort-bug.m4 ++++ b/m4/getcwd-abort-bug.m4 +@@ -1,4 +1,4 @@ +-# serial 9 ++# serial 11 + # Determine whether getcwd aborts when the length of the working directory + # name is unusually large. Any length between 4k and 16k trigger the bug + # when using glibc-2.4.90-9 or older. +@@ -13,6 +13,7 @@ + # gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], + [ ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_DECLS_ONCE([getcwd]) + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) +@@ -142,7 +143,13 @@ main () + else + gl_cv_func_getcwd_abort_bug=no + fi], +- [gl_cv_func_getcwd_abort_bug=yes]) ++ [case "$host_os" in ++ # Guess no on musl systems. ++ *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;; ++ # Guess yes otherwise, even on glibc systems. ++ *) gl_cv_func_getcwd_abort_bug="guessing yes" ++ esac ++ ]) + ]) + AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) + ]) +diff --git a/m4/getcwd.m4 b/m4/getcwd.m4 +index 4929b51..625171a 100644 +--- a/m4/getcwd.m4 ++++ b/m4/getcwd.m4 +@@ -6,7 +6,7 @@ + # with or without modifications, as long as this notice is preserved. + + # Written by Paul Eggert. +-# serial 16 ++# serial 17 + + AC_DEFUN([gl_FUNC_GETCWD_NULL], + [ +@@ -50,6 +50,8 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], + [[case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. +diff --git a/m4/getdelim.m4 b/m4/getdelim.m4 +index bf17c57..e77c379 100644 +--- a/m4/getdelim.m4 ++++ b/m4/getdelim.m4 +@@ -1,4 +1,4 @@ +-# getdelim.m4 serial 12 ++# getdelim.m4 serial 13 + + dnl Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc. + dnl +@@ -11,6 +11,7 @@ AC_PREREQ([2.59]) + AC_DEFUN([gl_FUNC_GETDELIM], + [ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade glibc to declare getdelim(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +@@ -21,9 +22,10 @@ AC_DEFUN([gl_FUNC_GETDELIM], + if test $ac_cv_func_getdelim = yes; then + HAVE_GETDELIM=1 + dnl Found it in some library. Verify that it works. +- AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], +- [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ AC_CACHE_CHECK([for working getdelim function], ++ [gl_cv_func_working_getdelim], ++ [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + # include + # include + # include +@@ -53,25 +55,31 @@ AC_DEFUN([gl_FUNC_GETDELIM], + fclose (in); + return 0; + } +- ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. +- , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. +- , dnl We're cross compiling. Assume it works on glibc2 systems. +- [AC_EGREP_CPP([Lucky GNU user], +- [ ++ ]])], ++ [gl_cv_func_working_getdelim=yes], ++ [gl_cv_func_working_getdelim=no], ++ [dnl We're cross compiling. ++ dnl Guess it works on glibc2 systems and musl systems. ++ AC_EGREP_CPP([Lucky GNU user], ++ [ + #include + #ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif + #endif +- ], +- [gl_cv_func_working_getdelim="guessing yes"], +- [gl_cv_func_working_getdelim="guessing no"])] +- )]) ++ ], ++ [gl_cv_func_working_getdelim="guessing yes"], ++ [case "$host_os" in ++ *-musl*) gl_cv_func_working_getdelim="guessing yes" ;; ++ *) gl_cv_func_working_getdelim="guessing no" ;; ++ esac ++ ]) ++ ]) ++ ]) + case "$gl_cv_func_working_getdelim" in +- *no) +- REPLACE_GETDELIM=1 +- ;; ++ *yes) ;; ++ *) REPLACE_GETDELIM=1 ;; + esac + else + HAVE_GETDELIM=0 +diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 +index 2ce986e..c93447b 100644 +--- a/m4/getgroups.m4 ++++ b/m4/getgroups.m4 +@@ -1,4 +1,4 @@ +-# serial 21 ++# serial 22 + + dnl From Jim Meyering. + dnl A wrapper around AC_FUNC_GETGROUPS. +@@ -42,6 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS], + [case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) ac_cv_func_getgroups_works="guessing no" ;; + esac +@@ -95,6 +97,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_getgroups_works="guessing no" ;; + esac +diff --git a/m4/getline.m4 b/m4/getline.m4 +index 5b2ead2..32f771c 100644 +--- a/m4/getline.m4 ++++ b/m4/getline.m4 +@@ -1,4 +1,4 @@ +-# getline.m4 serial 28 ++# getline.m4 serial 29 + + dnl Copyright (C) 1998-2003, 2005-2007, 2009-2019 Free Software Foundation, + dnl Inc. +@@ -16,6 +16,7 @@ dnl to do with the function we need. + AC_DEFUN([gl_FUNC_GETLINE], + [ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade glibc to declare getline(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +@@ -28,9 +29,10 @@ AC_DEFUN([gl_FUNC_GETLINE], + gl_getline_needs_run_time_check=yes], + [am_cv_func_working_getline=no]) + if test $gl_getline_needs_run_time_check = yes; then +- AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], +- [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ AC_CACHE_CHECK([for working getline function], ++ [am_cv_func_working_getline], ++ [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + # include + # include + # include +@@ -61,21 +63,28 @@ AC_DEFUN([gl_FUNC_GETLINE], + fclose (in); + return 0; + } +- ]])], [am_cv_func_working_getline=yes] dnl The library version works. +- , [am_cv_func_working_getline=no] dnl The library version does NOT work. +- , dnl We're cross compiling. Assume it works on glibc2 systems. +- [AC_EGREP_CPP([Lucky GNU user], +- [ ++ ]])], ++ [am_cv_func_working_getline=yes], ++ [am_cv_func_working_getline=no], ++ [dnl We're cross compiling. ++ dnl Guess it works on glibc2 systems and musl systems. ++ AC_EGREP_CPP([Lucky GNU user], ++ [ + #include + #ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif + #endif +- ], +- [am_cv_func_working_getline="guessing yes"], +- [am_cv_func_working_getline="guessing no"])] +- )]) ++ ], ++ [am_cv_func_working_getline="guessing yes"], ++ [case "$host_os" in ++ *-musl*) am_cv_func_working_getline="guessing yes" ;; ++ *) am_cv_func_working_getline="guessing no" ;; ++ esac ++ ]) ++ ]) ++ ]) + fi + + if test $ac_cv_have_decl_getline = no; then +@@ -83,7 +92,8 @@ AC_DEFUN([gl_FUNC_GETLINE], + fi + + case "$am_cv_func_working_getline" in +- *no) ++ *yes) ;; ++ *) + dnl Set REPLACE_GETLINE always: Even if we have not found the broken + dnl getline function among $LIBS, it may exist in libinet and the + dnl executable may be linked with -linet. +diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 +index d29b4bf..5e2ef6f 100644 +--- a/m4/gettimeofday.m4 ++++ b/m4/gettimeofday.m4 +@@ -1,4 +1,4 @@ +-# serial 25 ++# serial 26 + + # Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -105,6 +105,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; ++ # Guess all is fine on musl systems. ++ *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/link-follow.m4 b/m4/link-follow.m4 +index cbd2dca..8ac7301 100644 +--- a/m4/link-follow.m4 ++++ b/m4/link-follow.m4 +@@ -1,4 +1,4 @@ +-# serial 20 ++# serial 21 + dnl Run a program to determine whether link(2) follows symlinks. + dnl Set LINK_FOLLOWS_SYMLINKS accordingly. + +@@ -88,6 +88,8 @@ AC_DEFUN([gl_FUNC_LINK_FOLLOWS_SYMLINK], + case "$host_os" in + # On glibc/Linux we know the result. + linux*-gnu* | gnu*) gl_cv_func_link_follows_symlink="guessing no" ;; ++ # On musl/Linux we know the result. ++ linux*-musl*) gl_cv_func_link_follows_symlink="guessing no" ;; + # Otherwise, we don't know. + *) gl_cv_func_link_follows_symlink=unknown ;; + esac +diff --git a/m4/malloc.m4 b/m4/malloc.m4 +index b9b8d4b..c469c45 100644 +--- a/m4/malloc.m4 ++++ b/m4/malloc.m4 +@@ -1,4 +1,4 @@ +-# malloc.m4 serial 17 ++# malloc.m4 serial 19 + dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF], + [ac_cv_func_malloc_0_nonnull=no], + [case "$host_os" in + # Guess yes on platforms where we know the result. +- *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ ++ *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull="guessing yes" ;; + # If we don't know, assume the worst. +diff --git a/m4/mkdir.m4 b/m4/mkdir.m4 +index 4cd9590..366a3cd 100644 +--- a/m4/mkdir.m4 ++++ b/m4/mkdir.m4 +@@ -1,4 +1,4 @@ +-# serial 14 ++# serial 15 + + # Copyright (C) 2001, 2003-2004, 2006, 2008-2019 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -62,6 +62,8 @@ AC_DEFUN([gl_FUNC_MKDIR], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 +index ae24c3b..1b15c2e 100644 +--- a/m4/mkstemp.m4 ++++ b/m4/mkstemp.m4 +@@ -1,4 +1,4 @@ +-#serial 25 ++#serial 26 + + # Copyright (C) 2001, 2003-2007, 2009-2019 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -59,6 +59,8 @@ AC_DEFUN([gl_FUNC_MKSTEMP], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_working_mkstemp="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_working_mkstemp="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/perror.m4 b/m4/perror.m4 +index 335be72..08e2db1 100644 +--- a/m4/perror.m4 ++++ b/m4/perror.m4 +@@ -1,4 +1,4 @@ +-# perror.m4 serial 7 ++# perror.m4 serial 8 + dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -48,10 +48,12 @@ AC_DEFUN([gl_FUNC_PERROR], + rm -rf conftest.txt1 conftest.txt2], + [gl_cv_func_perror_works=no], + [case "$host_os" in +- # Guess yes on native Windows. +- mingw*) gl_cv_func_perror_works="guessing yes" ;; +- # Otherwise guess no. +- *) gl_cv_func_perror_works="guessing no" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_perror_works="guessing yes" ;; ++ # Guess yes on native Windows. ++ mingw*) gl_cv_func_perror_works="guessing yes" ;; ++ # Otherwise guess no. ++ *) gl_cv_func_perror_works="guessing no" ;; + esac + ]) + ]) +diff --git a/m4/printf.m4 b/m4/printf.m4 +index cbf6ae4..6d2280e 100644 +--- a/m4/printf.m4 ++++ b/m4/printf.m4 +@@ -1,4 +1,4 @@ +-# printf.m4 serial 60 ++# printf.m4 serial 61 + dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -62,6 +62,8 @@ int main () + changequote(,)dnl + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; +@@ -240,6 +242,8 @@ int main () + changequote(,)dnl + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; +@@ -457,6 +461,8 @@ int main () + changequote(,)dnl + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; +@@ -575,6 +581,8 @@ int main () + [gl_cv_func_printf_directive_a="guessing yes"], + [gl_cv_func_printf_directive_a="guessing no"]) + ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_printf_directive_a="guessing yes";; + # Guess no on Android. + linux*-android*) gl_cv_func_printf_directive_a="guessing no";; + # Guess no on native Windows. +@@ -625,6 +633,8 @@ int main () + changequote(,)dnl + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_printf_directive_f="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; +@@ -960,6 +970,8 @@ changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess no on Android. +@@ -1206,6 +1218,8 @@ changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; +@@ -1308,6 +1322,8 @@ int main () + changequote(,)dnl + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; +@@ -1400,6 +1416,8 @@ changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; +@@ -1554,6 +1572,8 @@ changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; +diff --git a/m4/putenv.m4 b/m4/putenv.m4 +index f8960f6..342ba26 100644 +--- a/m4/putenv.m4 ++++ b/m4/putenv.m4 +@@ -1,4 +1,4 @@ +-# putenv.m4 serial 22 ++# putenv.m4 serial 23 + dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_PUTENV], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_svid_putenv="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_svid_putenv="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/realloc.m4 b/m4/realloc.m4 +index f9f15ad..93066e8 100644 +--- a/m4/realloc.m4 ++++ b/m4/realloc.m4 +@@ -1,4 +1,4 @@ +-# realloc.m4 serial 15 ++# realloc.m4 serial 17 + dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF], + [ac_cv_func_realloc_0_nonnull=no], + [case "$host_os" in + # Guess yes on platforms where we know the result. +- *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ ++ *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_realloc_0_nonnull="guessing yes" ;; + # If we don't know, assume the worst. +diff --git a/m4/setenv.m4 b/m4/setenv.m4 +index 6101274..a8f83d6 100644 +--- a/m4/setenv.m4 ++++ b/m4/setenv.m4 +@@ -1,4 +1,4 @@ +-# setenv.m4 serial 27 ++# setenv.m4 serial 28 + dnl Copyright (C) 2001-2004, 2006-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -37,6 +37,8 @@ AC_DEFUN([gl_FUNC_SETENV], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; + esac +diff --git a/m4/signbit.m4 b/m4/signbit.m4 +index bf5bce5..f7f2f3d 100644 +--- a/m4/signbit.m4 ++++ b/m4/signbit.m4 +@@ -1,4 +1,4 @@ +-# signbit.m4 serial 16 ++# signbit.m4 serial 17 + dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -31,6 +31,8 @@ AC_DEFUN([gl_SIGNBIT], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_signbit="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_signbit="guessing yes" ;; + # If we don't know, assume the worst. +@@ -62,6 +64,8 @@ AC_DEFUN([gl_SIGNBIT], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_signbit_gcc="guessing yes" ;; + # Guess yes on mingw, no on MSVC. + mingw*) if test -n "$GCC"; then + gl_cv_func_signbit_gcc="guessing yes" +diff --git a/m4/sleep.m4 b/m4/sleep.m4 +index 5f71cc7..7bab467 100644 +--- a/m4/sleep.m4 ++++ b/m4/sleep.m4 +@@ -1,4 +1,4 @@ +-# sleep.m4 serial 9 ++# sleep.m4 serial 10 + dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -48,6 +48,8 @@ handle_alarm (int sig) + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_sleep_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_sleep_works="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4 +index 83425dd..f8e1a7c 100644 +--- a/m4/stpncpy.m4 ++++ b/m4/stpncpy.m4 +@@ -1,4 +1,4 @@ +-# stpncpy.m4 serial 16 ++# stpncpy.m4 serial 17 + dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, + dnl Inc. + dnl This file is free software; the Free Software Foundation +@@ -7,6 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_FUNC_STPNCPY], + [ ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles ++ + dnl Persuade glibc to declare stpncpy(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + +@@ -69,12 +71,18 @@ int main () + ]])], + [gl_cv_func_stpncpy=yes], + [gl_cv_func_stpncpy=no], +- [AC_EGREP_CPP([Thanks for using GNU], [ ++ [dnl Guess yes on glibc systems and musl systems. ++ AC_EGREP_CPP([Thanks for using GNU], [ + #include + #ifdef __GNU_LIBRARY__ + Thanks for using GNU + #endif +-], [gl_cv_func_stpncpy="guessing yes"], [gl_cv_func_stpncpy="guessing no"]) ++], [gl_cv_func_stpncpy="guessing yes"], ++ [case "$host_os" in ++ *-musl*) gl_cv_func_stpncpy="guessing yes" ;; ++ *) gl_cv_func_stpncpy="guessing no" ;; ++ esac ++ ]) + ]) + ]) + case "$gl_cv_func_stpncpy" in +diff --git a/m4/strerror.m4 b/m4/strerror.m4 +index b452f7f..2c90f31 100644 +--- a/m4/strerror.m4 ++++ b/m4/strerror.m4 +@@ -1,4 +1,4 @@ +-# strerror.m4 serial 19 ++# strerror.m4 serial 20 + dnl Copyright (C) 2002, 2007-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -26,6 +26,8 @@ AC_DEFUN([gl_FUNC_STRERROR], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; + esac +@@ -80,6 +82,8 @@ AC_DEFUN([gl_FUNC_STRERROR_0], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. +diff --git a/m4/strtod.m4 b/m4/strtod.m4 +index 9912217..d68ab75 100644 +--- a/m4/strtod.m4 ++++ b/m4/strtod.m4 +@@ -1,4 +1,4 @@ +-# strtod.m4 serial 24 ++# strtod.m4 serial 25 + dnl Copyright (C) 2002-2003, 2006-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -115,9 +115,11 @@ numeric_equal (double x, double y) + ], + [gl_cv_func_strtod_works="guessing yes"], + [case "$host_os" in +- # Guess yes on native Windows. +- mingw*) gl_cv_func_strtod_works="guessing yes" ;; +- *) gl_cv_func_strtod_works="guessing no" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_strtod_works="guessing yes" ;; ++ # Guess yes on native Windows. ++ mingw*) gl_cv_func_strtod_works="guessing yes" ;; ++ *) gl_cv_func_strtod_works="guessing no" ;; + esac + ]) + ]) +diff --git a/m4/strtold.m4 b/m4/strtold.m4 +index 16b4eda..17125fe 100644 +--- a/m4/strtold.m4 ++++ b/m4/strtold.m4 +@@ -1,4 +1,4 @@ +-# strtold.m4 serial 2 ++# strtold.m4 serial 4 + dnl Copyright (C) 2002-2003, 2006-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -98,7 +98,12 @@ numeric_equal (long double x, long double y) + #endif + ], + [gl_cv_func_strtold_works="guessing yes"], +- [gl_cv_func_strtod_works="guessing no"]) ++ [case "$host_os" in ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_strtold_works="guessing yes" ;; ++ *) gl_cv_func_strtold_works="guessing no" ;; ++ esac ++ ]) + ]) + ]) + case "$gl_cv_func_strtold_works" in +diff --git a/m4/tzset.m4 b/m4/tzset.m4 +index 1278801..afdfa8e 100644 +--- a/m4/tzset.m4 ++++ b/m4/tzset.m4 +@@ -1,4 +1,4 @@ +-# serial 11 ++# serial 12 + + # Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation +@@ -70,6 +70,8 @@ main () + [case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;; ++ # Guess all is fine on musl systems. ++ *-musl*) gl_cv_func_tzset_clobber="guessing no" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_tzset_clobber="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/ungetc.m4 b/m4/ungetc.m4 +index ab8757b..08baf33 100644 +--- a/m4/ungetc.m4 ++++ b/m4/ungetc.m4 +@@ -1,4 +1,4 @@ +-# ungetc.m4 serial 6 ++# ungetc.m4 serial 7 + dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -41,12 +41,16 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], + remove ("conftest.tmp");])], + [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], + [case "$host_os" in +- # Guess yes on glibc and bionic systems. +- *-gnu* | gnu* | *-android*) gl_cv_func_ungetc_works="guessing yes" ;; +- # Guess yes on native Windows. +- mingw*) gl_cv_func_ungetc_works="guessing yes" ;; +- # If we don't know, assume the worst. +- *) gl_cv_func_ungetc_works="guessing no" ;; ++ # Guess yes on glibc systems. ++ *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_ungetc_works="guessing yes" ;; ++ # Guess yes on bionic systems. ++ *-android*) gl_cv_func_ungetc_works="guessing yes" ;; ++ # Guess yes on native Windows. ++ mingw*) gl_cv_func_ungetc_works="guessing yes" ;; ++ # If we don't know, assume the worst. ++ *) gl_cv_func_ungetc_works="guessing no" ;; + esac + ]) + ]) +diff --git a/m4/usleep.m4 b/m4/usleep.m4 +index 59605a8..4a6bff0 100644 +--- a/m4/usleep.m4 ++++ b/m4/usleep.m4 +@@ -1,4 +1,4 @@ +-# usleep.m4 serial 5 ++# usleep.m4 serial 6 + dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -31,6 +31,8 @@ AC_DEFUN([gl_FUNC_USLEEP], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_usleep_works="guessing yes" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_usleep_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_usleep_works="guessing no" ;; + # If we don't know, assume the worst. +diff --git a/m4/utimes.m4 b/m4/utimes.m4 +index 7209b6d..5806d8f 100644 +--- a/m4/utimes.m4 ++++ b/m4/utimes.m4 +@@ -1,5 +1,5 @@ + # Detect some bugs in glibc's implementation of utimes. +-# serial 5 ++# serial 6 + + dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation +@@ -143,9 +143,11 @@ main () + [gl_cv_func_working_utimes=yes], + [gl_cv_func_working_utimes=no], + [case "$host_os" in +- # Guess no on native Windows. +- mingw*) gl_cv_func_working_utimes="guessing no" ;; +- *) gl_cv_func_working_utimes="guessing no" ;; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_working_utimes="guessing yes" ;; ++ # Guess no on native Windows. ++ mingw*) gl_cv_func_working_utimes="guessing no" ;; ++ *) gl_cv_func_working_utimes="guessing no" ;; + esac + ]) + ]) +diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4 +index baa2002..3952fd2 100644 +--- a/m4/wcwidth.m4 ++++ b/m4/wcwidth.m4 +@@ -1,4 +1,4 @@ +-# wcwidth.m4 serial 27 ++# wcwidth.m4 serial 28 + dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -98,9 +98,13 @@ int main () + [ + changequote(,)dnl + case "$host_os" in +- # Guess yes on glibc and AIX 7 systems. +- *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; +- *) gl_cv_func_wcwidth_works="guessing no";; ++ # Guess yes on glibc systems. ++ *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";; ++ # Guess yes on musl systems. ++ *-musl*) gl_cv_func_wcwidth_works="guessing yes";; ++ # Guess yes on AIX 7 systems. ++ aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; ++ *) gl_cv_func_wcwidth_works="guessing no";; + esac + changequote([,])dnl + ]) +-- +1.9.1 + + diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index c4ce510c642..50d3a2437d7 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -22,14 +22,21 @@ with lib; stdenv.mkDerivation (rec { pname = "coreutils"; - version = "8.32"; + version = "8.31"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; - sha256 = "sha256-RFjY3nhJ30TMqxXhaxVIsoUiTbul8I+sBwwcDgvMTPo="; + sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz"; }; - patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch; + patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch + # Fix failing test with musl. See https://lists.gnu.org/r/coreutils/2019-05/msg00031.html + # To be removed in coreutils-8.32. + ++ optional stdenv.hostPlatform.isMusl ./avoid-false-positive-in-date-debug-test.patch + # Fix compilation in musl-cross environments. To be removed in coreutils-8.32. + ++ optional stdenv.hostPlatform.isMusl ./coreutils-8.31-musl-cross.patch + # Fix compilation in android-cross environments. To be removed in coreutils-8.32. + ++ [ ./coreutils-8.31-android-cross.patch ]; postPatch = '' # The test tends to fail on btrfs,f2fs and maybe other unusual filesystems. diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index c466a48434f..8e151bc2ead 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -34,14 +34,14 @@ assert gssSupport -> libkrb5 != null; stdenv.mkDerivation rec { pname = "curl"; - version = "7.73.0"; + version = "7.72.0"; src = fetchurl { urls = [ "https://curl.haxx.se/download/${pname}-${version}.tar.bz2" "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2" ]; - sha256 = "sha256-zzT+Cwe4APHAGkmabosq9Uj20OBE3KSinYikvuFG0TE="; + sha256 = "1vq3ay87vayfrv67l7s7h79nm7gwdqhidki0brv5jahhch49g4dd"; }; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index d2fa0deca00..9b33d53e54f 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "unbound"; - version = "1.12.0"; + version = "1.11.0"; src = fetchurl { url = "https://unbound.net/downloads/${pname}-${version}.tar.gz"; - sha256 = "0daqxzvknvcz7sgag3wcrxhp4a39ik93lsrfpwcl9whjg2lm74jv"; + sha256 = "1xqywn2qdmjjq0csrqxh9p2rnizdrr1f99zdx87z7f3fyyc0fbwz"; }; outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB diff --git a/pkgs/tools/security/sudolikeaboss/default.nix b/pkgs/tools/security/sudolikeaboss/default.nix index 639926578c7..97db4a28c45 100644 --- a/pkgs/tools/security/sudolikeaboss/default.nix +++ b/pkgs/tools/security/sudolikeaboss/default.nix @@ -1,5 +1,5 @@ # This file was generated by go2nix, then modified by hand for Darwin support. -{ stdenv, buildGoPackage, fetchFromGitHub, darwin }: +{ stdenv, buildGoPackage, fetchFromGitHub, fixDarwinDylibNames, darwin }: buildGoPackage rec { pname = "sudolikeaboss-unstable"; @@ -17,8 +17,9 @@ buildGoPackage rec { goDeps = ./deps.nix; - buildInputs = with darwin.apple_sdk.frameworks; [ + propagatedBuildInputs = with darwin.apple_sdk.frameworks; [ Cocoa + fixDarwinDylibNames ]; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d0c522e689..38774895209 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8346,7 +8346,9 @@ in zssh = callPackage ../tools/networking/zssh { }; zstd = callPackage ../tools/compression/zstd { - cmake = buildPackages.cmakeMinimal; + cmake = buildPackages.cmake.override { + libarchive = buildPackages.libarchive.override { zstd = null; }; + }; }; zsync = callPackage ../tools/compression/zsync { }; @@ -9674,15 +9676,15 @@ in inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10; }; - rust_1_47 = callPackage ../development/compilers/rust/1_47.nix { + rust_1_46 = callPackage ../development/compilers/rust/1_46.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; - llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_11; + llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10; }; - rust = rust_1_47; + rust = rust_1_46; rustPackages_1_45 = rust_1_45.packages.stable; - rustPackages_1_47 = rust_1_47.packages.stable; - rustPackages = rustPackages_1_47; + rustPackages_1_46 = rust_1_46.packages.stable; + rustPackages = rustPackages_1_46; inherit (rustPackages) cargo clippy rustc rustPlatform; @@ -10858,10 +10860,6 @@ in cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { }; - cmakeMinimal = libsForQt5.callPackage ../development/tools/build-managers/cmake { - isBootstrap = true; - }; - cmakeCurses = cmake.override { useNcurses = true; }; cmakeWithGui = cmakeCurses.override { withQt5 = true; }; @@ -18292,7 +18290,7 @@ in # udev is the same package as systemd which depends on cryptsetup # which depends on lvm2 again. But we only need the libudev part # which does not depend on cryptsetup. - udev = systemdMinimal; + udev = udev.override { cryptsetup = null; }; }; lvm2_dmeventd = callPackage ../os-specific/linux/lvm2 { enableDmeventd = true; @@ -18643,23 +18641,8 @@ in bzip2 = null; }; }; - systemdMinimal = systemd.override { - pname = "systemd-minimal"; - withResolved = false; - withLogind = false; - withHostnamed = false; - withLocaled = false; - withTimedated = false; - withHwdb = false; - withEfi = false; - withImportd = false; - withCryptsetup = false; - cryptsetup = null; - lvm2 = null; - }; - - udev = systemd; # TODO: change to systemdMinimal + udev = systemd; # TODO: move to aliases.nix systemd-wait = callPackage ../os-specific/linux/systemd-wait { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0961e3c264d..945f55adc70 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4828,7 +4828,7 @@ in { pybullet = callPackage ../development/python-modules/pybullet { }; - pycairo = callPackage ../development/python-modules/pycairo { inherit (pkgs) meson pkg-config; }; + pycairo = callPackage ../development/python-modules/pycairo { inherit (pkgs) meson pkgconfig; }; pycallgraph = callPackage ../development/python-modules/pycallgraph { }; -- cgit 1.4.1 From 89023c38fcef79ad135bf6070563be611c4c8d39 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 25 Oct 2020 22:17:24 +0100 Subject: Recover the complicated situation after my bad merge I made a mistake merge. Reverting it in c778945806b undid the state on master, but now I realize it crippled the git merge mechanism. As the merge contained a mix of commits from `master..staging-next` and other commits from `staging-next..staging`, it got the `staging-next` branch into a state that was difficult to recover. I reconstructed the "desired" state of staging-next tree by: - checking out the last commit of the problematic range: 4effe769e2b - `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken merge commit and its revert from that range (while keeping reapplication from 4effe769e2) - merging the last unaffected staging-next commit (803ca85c209) - fortunately no other commits have been pushed to staging-next yet - applying a diff on staging-next to get it into that state --- doc/stdenv/stdenv.xml | 7 +- .../git-and-tools/git/default.nix | 4 +- pkgs/build-support/install-shell-files/default.nix | 12 +- .../setup-hooks/install-shell-files.sh | 125 ++- pkgs/data/misc/tzdata/default.nix | 6 +- pkgs/development/compilers/gcc/builder.sh | 7 +- .../compilers/purescript/psc-package/default.nix | 10 +- pkgs/development/compilers/rust/1_46.nix | 45 - pkgs/development/compilers/rust/1_47.nix | 45 + pkgs/development/compilers/rust/binary.nix | 12 +- .../interpreters/ruby/rubygems/default.nix | 4 +- pkgs/development/libraries/enchant/2.x.nix | 4 +- pkgs/development/libraries/expat/default.nix | 12 +- pkgs/development/libraries/freetype/default.nix | 4 +- .../gamin/abstract-socket-namespace.patch | 73 ++ pkgs/development/libraries/gamin/default.nix | 10 +- pkgs/development/libraries/harfbuzz/default.nix | 4 +- pkgs/development/libraries/libinput/default.nix | 17 +- ...CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch | 211 ---- pkgs/development/libraries/libvpx/default.nix | 22 +- pkgs/development/libraries/libwebp/default.nix | 15 +- pkgs/development/libraries/mesa/default.nix | 7 +- ...ache-include-dri-driver-path-in-cache-key.patch | 29 +- .../mesa/link-radv-with-ld_args_build_id.patch | 25 - .../libraries/mesa/missing-includes.patch | 12 - pkgs/development/libraries/openssl/default.nix | 4 +- pkgs/development/libraries/p11-kit/default.nix | 7 + pkgs/development/libraries/zeromq/4.x.nix | 10 +- pkgs/development/python-modules/arrow/default.nix | 4 +- .../development/python-modules/pycairo/default.nix | 24 +- .../tools/build-managers/cmake/default.nix | 19 +- .../boost-Do-not-add-system-paths-on-nix.patch | 40 + .../tools/build-managers/meson/default.nix | 5 + pkgs/os-specific/linux/apparmor/default.nix | 13 +- pkgs/os-specific/linux/iproute/default.nix | 8 +- pkgs/os-specific/linux/libcap/default.nix | 5 +- pkgs/os-specific/linux/systemd/default.nix | 106 +- pkgs/servers/x11/xorg/default.nix | 36 +- pkgs/servers/x11/xorg/overrides.nix | 7 - pkgs/servers/x11/xorg/tarballs.list | 12 +- pkgs/shells/bash/bash-completion/default.nix | 4 +- pkgs/stdenv/darwin/default.nix | 5 +- pkgs/test/default.nix | 2 + pkgs/test/install-shell-files/default.nix | 125 +++ pkgs/tools/compression/brotli/default.nix | 13 +- .../avoid-false-positive-in-date-debug-test.patch | 52 - .../coreutils/coreutils-8.31-android-cross.patch | 51 - .../misc/coreutils/coreutils-8.31-musl-cross.patch | 1153 -------------------- pkgs/tools/misc/coreutils/default.nix | 13 +- pkgs/tools/networking/curl/default.nix | 4 +- pkgs/tools/networking/unbound/default.nix | 4 +- pkgs/top-level/all-packages.nix | 37 +- pkgs/top-level/python-packages.nix | 2 +- 53 files changed, 702 insertions(+), 1785 deletions(-) delete mode 100644 pkgs/development/compilers/rust/1_46.nix create mode 100644 pkgs/development/compilers/rust/1_47.nix create mode 100644 pkgs/development/libraries/gamin/abstract-socket-namespace.patch delete mode 100644 pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch delete mode 100644 pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch create mode 100644 pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch create mode 100644 pkgs/test/install-shell-files/default.nix delete mode 100644 pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch delete mode 100644 pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch delete mode 100644 pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch (limited to 'pkgs/test/default.nix') diff --git a/doc/stdenv/stdenv.xml b/doc/stdenv/stdenv.xml index 4c069b57edd..46ee97927ea 100644 --- a/doc/stdenv/stdenv.xml +++ b/doc/stdenv/stdenv.xml @@ -2070,7 +2070,7 @@ nativeBuildInputs = [ breakpointHook ]; The installManPage function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with .gz suffix). This function will place them into the correct directory. - The installShellCompletion function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of --bash, --fish, or --zsh. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag --name NAME before the path. If this flag is not provided, zsh completions will be renamed automatically such that foobar.zsh becomes _foobar. + The installShellCompletion function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of --bash, --fish, or --zsh. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag --name NAME before the path. If this flag is not provided, zsh completions will be renamed automatically such that foobar.zsh becomes _foobar. A root name may be provided for all paths using the flag --cmd NAME; this synthesizes the appropriate name depending on the shell (e.g. --cmd foo will synthesize the name foo.bash for bash and _foo for zsh). The path may also be a fifo or named fd (such as produced by <(cmd)), in which case the shell and name must be provided. nativeBuildInputs = [ installShellFiles ]; postInstall = '' @@ -2081,6 +2081,11 @@ postInstall = '' installShellCompletion --zsh --name _foobar share/completions.zsh # implicit behavior installShellCompletion share/completions/foobar.{bash,fish,zsh} + # using named fd + installShellCompletion --cmd foobar \ + --bash <($out/bin/foobar --bash-completion) \ + --fish <($out/bin/foobar --fish-completion) \ + --zsh <($out/bin/foobar --zsh-completion) ''; diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 7e40366142a..49dc7866dbd 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -22,7 +22,7 @@ assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; let - version = "2.28.0"; + version = "2.29.0"; svn = subversionClient.override { perlBindings = perlSupport; }; gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; @@ -34,7 +34,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; - sha256 = "17a311vzimqn1glc9d7x82rhb1mb81m5rr4g8xji8idaafid39fz"; + sha256 = "KEMtmVJXxGJv4PsgkfWI327tmOlXFBnnLIO8Izcua4k="; }; outputs = [ "out" ] ++ stdenv.lib.optional withManual "doc"; diff --git a/pkgs/build-support/install-shell-files/default.nix b/pkgs/build-support/install-shell-files/default.nix index e1f2e24dd87..d50661ddc65 100644 --- a/pkgs/build-support/install-shell-files/default.nix +++ b/pkgs/build-support/install-shell-files/default.nix @@ -1,4 +1,12 @@ -{ makeSetupHook }: +{ makeSetupHook, tests }: # See the header comment in ../setup-hooks/install-shell-files.sh for example usage. -makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh +let + setupHook = makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh; +in + +setupHook.overrideAttrs (oldAttrs: { + passthru = (oldAttrs.passthru or {}) // { + tests = tests.install-shell-files; + }; +}) diff --git a/pkgs/build-support/setup-hooks/install-shell-files.sh b/pkgs/build-support/setup-hooks/install-shell-files.sh index e0ea1f7f30a..194b408b105 100644 --- a/pkgs/build-support/setup-hooks/install-shell-files.sh +++ b/pkgs/build-support/setup-hooks/install-shell-files.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# shellcheck shell=bash # Setup hook for the `installShellFiles` package. # # Example usage in a derivation: @@ -19,8 +19,8 @@ # installManPage [...] # # Each argument is checked for its man section suffix and installed into the appropriate -# share/man/ directory. The function returns an error if any paths don't have the man section -# suffix (with optional .gz compression). +# share/man/man/ directory. The function returns an error if any paths don't have the man +# section suffix (with optional .gz compression). installManPage() { local path for path in "$@"; do @@ -49,7 +49,7 @@ installManPage() { done } -# installShellCompletion [--bash|--fish|--zsh] ([--name ] )... +# installShellCompletion [--cmd ] ([--bash|--fish|--zsh] [--name ] )... # # Each path is installed into the appropriate directory for shell completions for the given shell. # If one of `--bash`, `--fish`, or `--zsh` is given the path is assumed to belong to that shell. @@ -61,9 +61,20 @@ installManPage() { # If the shell completion needs to be renamed before installing the optional `--name ` flag # may be given. Any name provided with this flag only applies to the next path. # +# If all shell completions need to be renamed before installing the optional `--cmd ` flag +# may be given. This will synthesize a name for each file, unless overridden with an explicit +# `--name` flag. For example, `--cmd foobar` will synthesize the name `_foobar` for zsh and +# `foobar.bash` for bash. +# # For zsh completions, if the `--name` flag is not given, the path will be automatically renamed # such that `foobar.zsh` becomes `_foobar`. # +# A path may be a named fd, such as produced by the bash construct `<(cmd)`. When using a named fd, +# the shell type flag must be provided, and either the `--name` or `--cmd` flag must be provided. +# This might look something like: +# +# installShellCompletion --zsh --name _foobar <($out/bin/foobar --zsh-completion) +# # This command accepts multiple shell flags in conjunction with multiple paths if you wish to # install them all in one command: # @@ -76,9 +87,16 @@ installManPage() { # installShellCompletion --fish --name foobar.fish share/completions.fish # installShellCompletion --zsh --name _foobar share/completions.zsh # +# Or to use shell newline escaping to split a single invocation across multiple lines: +# +# installShellCompletion --cmd foobar \ +# --bash <($out/bin/foobar --bash-completion) \ +# --fish <($out/bin/foobar --fish-completion) \ +# --zsh <($out/bin/foobar --zsh-completion) +# # If any argument is `--` the remaining arguments will be treated as paths. installShellCompletion() { - local shell='' name='' retval=0 parseArgs=1 arg + local shell='' name='' cmdname='' retval=0 parseArgs=1 arg while { arg=$1; shift; }; do # Parse arguments if (( parseArgs )); then @@ -97,6 +115,17 @@ installShellCompletion() { # treat `--name=foo` the same as `--name foo` name=${arg#--name=} continue;; + --cmd) + cmdname=$1 + shift || { + echo 'installShellCompletion: error: --cmd flag expected an argument' >&2 + return 1 + } + continue;; + --cmd=*) + # treat `--cmd=foo` the same as `--cmd foo` + cmdname=${arg#--cmd=} + continue;; --?*) echo "installShellCompletion: warning: unknown flag ${arg%%=*}" >&2 retval=2 @@ -110,39 +139,67 @@ installShellCompletion() { if (( "${NIX_DEBUG:-0}" >= 1 )); then echo "installShellCompletion: installing $arg${name:+ as $name}" fi - # if we get here, this is a path - # Identify shell - local basename - basename=$(stripHash "$arg") + # if we get here, this is a path or named pipe + # Identify shell and output name local curShell=$shell - if [[ -z "$curShell" ]]; then - # auto-detect the shell - case "$basename" in - ?*.bash) curShell=bash;; - ?*.fish) curShell=fish;; - ?*.zsh) curShell=zsh;; + local outName='' + if [[ -z "$arg" ]]; then + echo "installShellCompletion: error: empty path is not allowed" >&2 + return 1 + elif [[ -p "$arg" ]]; then + # this is a named fd or fifo + if [[ -z "$curShell" ]]; then + echo "installShellCompletion: error: named pipe requires one of --bash, --fish, or --zsh" >&2 + return 1 + elif [[ -z "$name" && -z "$cmdname" ]]; then + echo "installShellCompletion: error: named pipe requires one of --cmd or --name" >&2 + return 1 + fi + else + # this is a path + local argbase + argbase=$(stripHash "$arg") + if [[ -z "$curShell" ]]; then + # auto-detect the shell + case "$argbase" in + ?*.bash) curShell=bash;; + ?*.fish) curShell=fish;; + ?*.zsh) curShell=zsh;; + *) + if [[ "$argbase" = _* && "$argbase" != *.* ]]; then + # probably zsh + echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2 + curShell=zsh + else + echo "installShellCompletion: warning: unknown shell for path: $arg" >&2 + retval=2 + continue + fi;; + esac + fi + outName=$argbase + fi + # Identify output path + if [[ -n "$name" ]]; then + outName=$name + elif [[ -n "$cmdname" ]]; then + case "$curShell" in + bash|fish) outName=$cmdname.$curShell;; + zsh) outName=_$cmdname;; *) - if [[ "$basename" = _* && "$basename" != *.* ]]; then - # probably zsh - echo "installShellCompletion: warning: assuming path \`$arg' is zsh; please specify with --zsh" >&2 - curShell=zsh - else - echo "installShellCompletion: warning: unknown shell for path: $arg" >&2 - retval=2 - continue - fi;; + # Our list of shells is out of sync with the flags we accept or extensions we detect. + echo 'installShellCompletion: internal error' >&2 + return 1;; esac fi - # Identify output path - local outName sharePath - outName=${name:-$basename} + local sharePath case "$curShell" in bash) sharePath=bash-completion/completions;; fish) sharePath=fish/vendor_completions.d;; zsh) sharePath=zsh/site-functions # only apply automatic renaming if we didn't have a manual rename - if test -z "$name"; then + if [[ -z "$name" && -z "$cmdname" ]]; then # convert a name like `foo.zsh` into `_foo` outName=${outName%.zsh} outName=_${outName#_} @@ -153,8 +210,16 @@ installShellCompletion() { return 1;; esac # Install file - install -Dm644 -T "$arg" "${!outputBin:?}/share/$sharePath/$outName" || return - # Clear the name, it only applies to one path + local outDir="${!outputBin:?}/share/$sharePath" + local outPath="$outDir/$outName" + if [[ -p "$arg" ]]; then + # install handles named pipes on NixOS but not on macOS + mkdir -p "$outDir" \ + && cat "$arg" > "$outPath" + else + install -Dm644 -T "$arg" "$outPath" + fi || return + # Clear the per-path flags name= done if [[ -n "$name" ]]; then diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 367ee06390c..dc80580ff5e 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -2,16 +2,16 @@ stdenv.mkDerivation rec { pname = "tzdata"; - version = "2019c"; + version = "2020c"; srcs = [ (fetchurl { url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz"; - sha256 = "0z7w1yv37cfk8yhix2cillam091vgp1j4g8fv84261q9mdnq1ivr"; + sha256 = "1nab36g5ibs88wg2mzpzygi1wh5gh2al1qjvbk8sb90sbw8ar43q"; }) (fetchurl { url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz"; - sha256 = "1m3y2rnf1nggxxhxplab5zdd5whvar3ijyrv7lifvm82irkd7szn"; + sha256 = "1r5zrk1k3jhhilkhrx82fd19rvysji8jk05gq5v0rndmyx07zacs"; }) ]; diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 2204744a4b5..e1c4768413f 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -287,7 +287,12 @@ postInstall() { done # Two identical man pages are shipped (moving and compressing is done later) - ln -sf gcc.1 "$out"/share/man/man1/g++.1 + for i in "$out"/share/man/man1/*g++.1; do + if test -e "$i"; then + man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"` + ln -sf "$man_prefix"gcc.1 "$i" + fi + done } genericBuild diff --git a/pkgs/development/compilers/purescript/psc-package/default.nix b/pkgs/development/compilers/purescript/psc-package/default.nix index 0bebd5d2f50..88f7adce5a1 100644 --- a/pkgs/development/compilers/purescript/psc-package/default.nix +++ b/pkgs/development/compilers/purescript/psc-package/default.nix @@ -44,12 +44,10 @@ stdenv.mkDerivation rec { '' + '' chmod u-w $PSC_PACKAGE - $PSC_PACKAGE --bash-completion-script $PSC_PACKAGE > psc-package.bash - $PSC_PACKAGE --fish-completion-script $PSC_PACKAGE > psc-package.fish - $PSC_PACKAGE --zsh-completion-script $PSC_PACKAGE > _psc-package - installShellCompletion \ - psc-package.{bash,fish} \ - --zsh _psc-package + installShellCompletion --cmd psc-package \ + --bash <($PSC_PACKAGE --bash-completion-script $PSC_PACKAGE) \ + --fish <($PSC_PACKAGE --fish-completion-script $PSC_PACKAGE) \ + --zsh <($PSC_PACKAGE --zsh-completion-script $PSC_PACKAGE) ''; meta = with lib; { diff --git a/pkgs/development/compilers/rust/1_46.nix b/pkgs/development/compilers/rust/1_46.nix deleted file mode 100644 index c999b346ee6..00000000000 --- a/pkgs/development/compilers/rust/1_46.nix +++ /dev/null @@ -1,45 +0,0 @@ -# New rust versions should first go to staging. -# Things to check after updating: -# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin: -# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github -# This testing can be also done by other volunteers as part of the pull -# request review, in case platforms cannot be covered. -# 2. The LLVM version used for building should match with rust upstream. -# Check the version number in the src/llvm-project git submodule in: -# https://github.com/rust-lang/rust/blob//.gitmodules -# 3. Firefox and Thunderbird should still build on x86_64-linux. - -{ stdenv, lib -, buildPackages -, newScope, callPackage -, CoreFoundation, Security -, llvmPackages -, pkgsBuildTarget, pkgsBuildBuild -, makeRustPlatform -} @ args: - -import ./default.nix { - rustcVersion = "1.46.0"; - rustcSha256 = "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"; - - # Note: the version MUST be one version prior to the version we're - # building - bootstrapVersion = "1.45.2"; - - # fetch hashes by running `print-hashes.sh 1.45.2` - bootstrapHashes = { - i686-unknown-linux-gnu = "5b2050dde23152750de89f7e59acaab6bf088d0beb5854c69c9a545fd254b936"; - x86_64-unknown-linux-gnu = "860feed955726a4d96ffe40758a110053326b9ae11c9e1ee059e9c6222f25643"; - arm-unknown-linux-gnueabihf = "ddb5f59bbdef84e0b7c83049461e003ed031dd881a4622365c3d475102535c60"; - armv7-unknown-linux-gnueabihf = "7a556581f87602705f9c89b04cce621cfbba9050b6fbe478166e91d164567531"; - aarch64-unknown-linux-gnu = "151fad66442d28a4e4786753d1afb559c4a3d359081c64769273a31c2f0f4d30"; - x86_64-apple-darwin = "6e8067624ede10aa23081d62e0086c6f42f7228cc0d00fb5ff24d4dac65249d6"; - }; - - selectRustPackage = pkgs: pkgs.rust_1_46; - - rustcPatches = [ - ]; -} - -(builtins.removeAttrs args [ "fetchpatch" ]) diff --git a/pkgs/development/compilers/rust/1_47.nix b/pkgs/development/compilers/rust/1_47.nix new file mode 100644 index 00000000000..e5cbae193bf --- /dev/null +++ b/pkgs/development/compilers/rust/1_47.nix @@ -0,0 +1,45 @@ +# New rust versions should first go to staging. +# Things to check after updating: +# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin: +# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github +# This testing can be also done by other volunteers as part of the pull +# request review, in case platforms cannot be covered. +# 2. The LLVM version used for building should match with rust upstream. +# Check the version number in the src/llvm-project git submodule in: +# https://github.com/rust-lang/rust/blob//.gitmodules +# 3. Firefox and Thunderbird should still build on x86_64-linux. + +{ stdenv, lib +, buildPackages +, newScope, callPackage +, CoreFoundation, Security +, llvmPackages +, pkgsBuildTarget, pkgsBuildBuild +, makeRustPlatform +} @ args: + +import ./default.nix { + rustcVersion = "1.47.0"; + rustcSha256 = "sha256-MYXfBkxHR/LIubuMRGjt1Y/0rW0HiAyHmsGxc7do2B0="; + + # Note: the version MUST be one version prior to the version we're + # building + bootstrapVersion = "1.46.0"; + + # fetch hashes by running `print-hashes.sh 1.45.2` + bootstrapHashes = { + i686-unknown-linux-gnu = "6ebd7e04dc18a36d08b9731cdb42d5caf8460e1eb41b75f3a8596c39f5e71206"; + x86_64-unknown-linux-gnu = "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa2fbdcf5"; + arm-unknown-linux-gnueabihf = "bb8af68565321f54608e918597083eb016ed0f9f4f3cc23f7cc5f467b934ce7f"; + armv7-unknown-linux-gnueabihf = "7c0640879d7f2c38db60352e3c0f09e3fc6fa3bac6ca8f22cbccb1eb5e950121"; + aarch64-unknown-linux-gnu = "f0c6d630f3dedb3db69d69ed9f833aa6b472363096f5164f1068c7001ca42aeb"; + x86_64-apple-darwin = "82d61582a3772932432a99789c3b3bd4abe6baca339e355048ca9efb9ea5b4db"; + }; + + selectRustPackage = pkgs: pkgs.rust_1_47; + + rustcPatches = [ + ]; +} + +(builtins.removeAttrs args [ "fetchpatch" ]) diff --git a/pkgs/development/compilers/rust/binary.nix b/pkgs/development/compilers/rust/binary.nix index 9ae7e51e5fe..b84e390e0b0 100644 --- a/pkgs/development/compilers/rust/binary.nix +++ b/pkgs/development/compilers/rust/binary.nix @@ -1,4 +1,4 @@ -{ stdenv, makeWrapper, bash, curl, darwin +{ stdenv, makeWrapper, bash, curl, darwin, zlib , version , src , platform @@ -42,17 +42,23 @@ rec { ./install.sh --prefix=$out \ --components=${installComponents} - ${optionalString (stdenv.isLinux && bootstrapping) '' + ${optionalString (stdenv.isLinux && bootstrapping) ('' patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$out/bin/rustc" + '' + optionalString (stdenv.lib.versionAtLeast version "1.46") + # rustc bootstrap needs libz starting from 1.46 + '' + ln -s ${zlib}/lib/libz.so.1 $out/lib/libz.so.1 + ln -s ${zlib}/lib/libz.so $out/lib/libz.so + '' + '' patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$out/bin/rustdoc" patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$out/bin/cargo" - ''} + '')} # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc # (or similar) here. It causes strange effects where rustc loads diff --git a/pkgs/development/interpreters/ruby/rubygems/default.nix b/pkgs/development/interpreters/ruby/rubygems/default.nix index 0bbcadba3f5..8263a987d63 100644 --- a/pkgs/development/interpreters/ruby/rubygems/default.nix +++ b/pkgs/development/interpreters/ruby/rubygems/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "rubygems"; - version = "3.1.2"; + version = "3.1.3"; src = fetchurl { url = "https://rubygems.org/rubygems/rubygems-${version}.tgz"; - sha256 = "0h7ij4jpj8rgnpkl63cwh2lnav73pw5wpfqra3va7077lsyadlgd"; + sha256 = "181wjclxnq5lrwnr53famy9pg8911hi9w2v0vy7dqgjqnc4iy1hp"; }; patches = [ diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix index b7b86de92c0..cbc3f217326 100644 --- a/pkgs/development/libraries/enchant/2.x.nix +++ b/pkgs/development/libraries/enchant/2.x.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "enchant"; - version = "2.2.11"; + version = "2.2.12"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://github.com/AbiWord/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz"; - sha256 = "opxXd8TkX8rCWVwVxJ1tKqQ0+l58mT3/P582e2X+Ryo="; + sha256 = "0zi20s62gax9rkhwj318kqrxa62pmks6dsdd6m9pzvhlwy5cb6vb"; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index a356d7be1a9..29d2c2b3acb 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -1,16 +1,18 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, lib }: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or # cgit) that are needed here should be included directly in Nixpkgs as # files. -stdenv.mkDerivation rec { - name = "expat-2.2.8"; +let + version = "2.2.10"; +in stdenv.mkDerivation rec { + name = "expat-${version}"; src = fetchurl { - url = "https://github.com/libexpat/libexpat/releases/download/R_2_2_8/${name}.tar.xz"; - sha256 = "16vpj5mk3lps3x7fr8cs03rffx3ir4jilyqw0frayn6q94daijk1"; + url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${name}.tar.xz"; + sha256 = "sha256-Xf5Tj4tbY/A+mO2sUg19mmpNIuSC5cltTQb8xUhcJfI="; }; outputs = [ "out" "dev" ]; # TODO: fix referrers diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 24757af09e3..b87e64c2afb 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -14,7 +14,7 @@ let in stdenv.mkDerivation rec { pname = "freetype"; - version = "2.10.2"; + version = "2.10.4"; meta = with stdenv.lib; { description = "A font rendering engine"; @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "mirror://savannah/${pname}/${pname}-${version}.tar.xz"; - sha256 = "12rd181yzz6952cyjqaa4253f5szam93cmhw18p33rnj4l8dchqm"; + sha256 = "112pyy215chg7f7fmp2l9374chhhpihbh8wgpj5nj6avj3c59a46"; }; propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype diff --git a/pkgs/development/libraries/gamin/abstract-socket-namespace.patch b/pkgs/development/libraries/gamin/abstract-socket-namespace.patch new file mode 100644 index 00000000000..ff161055972 --- /dev/null +++ b/pkgs/development/libraries/gamin/abstract-socket-namespace.patch @@ -0,0 +1,73 @@ +From 737452159d521aef2041a2767f3ebf9f68f4b6a9 Mon Sep 17 00:00:00 2001 +From: Christian Kampka +Date: Tue, 1 Sep 2020 13:54:35 +0200 +Subject: [PATCH] Pin abstract namespace sockets to host_os + +Running programs with AC_RUN_IFELSE fails when cross-compiling. +Since abstract namespace sockets are linux feature, we can easily +assume it is available for linux and not for darwin. +--- + configure.in | 47 ++++++----------------------------------------- + 1 file changed, 6 insertions(+), 41 deletions(-) + +diff --git a/configure.in b/configure.in +index eb129db..0ed82ba 100644 +--- a/configure.in ++++ b/configure.in +@@ -387,47 +387,12 @@ fi + + #### Abstract sockets + +-AC_MSG_CHECKING(abstract socket namespace) +-AC_LANG_PUSH(C) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( +-[[ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-]], +-[[ +- int listen_fd; +- struct sockaddr_un addr; +- +- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); +- +- if (listen_fd < 0) +- { +- fprintf (stderr, "socket() failed: %s\n", strerror (errno)); +- exit (1); +- } +- +- memset (&addr, '\0', sizeof (addr)); +- addr.sun_family = AF_UNIX; +- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); +- addr.sun_path[0] = '\0'; /* this is what makes it abstract */ +- +- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) +- { +- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", +- strerror (errno)); +- exit (1); +- } +- else +- exit (0); +-]])], +- [have_abstract_sockets=yes], +- [have_abstract_sockets=no]) +-AC_LANG_POP(C) ++AC_MSG_CHECKING([whether target os has abstract socket namespace]) ++if test x$target_os = xlinux-gnu ; then ++ have_abstract_sockets=yes ++else ++ have_abstract_sockets=no ++fi + AC_MSG_RESULT($have_abstract_sockets) + + if test x$enable_abstract_sockets = xyes; then +-- +2.25.4 + diff --git a/pkgs/development/libraries/gamin/default.nix b/pkgs/development/libraries/gamin/default.nix index 38451571d8b..89096c88745 100644 --- a/pkgs/development/libraries/gamin/default.nix +++ b/pkgs/development/libraries/gamin/default.nix @@ -1,6 +1,8 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, glib }: +{ stdenv, fetchurl, fetchpatch, pkgconfig, glib, autoreconfHook }: -stdenv.mkDerivation (rec { +let + cross = stdenv.hostPlatform != stdenv.buildPlatform; +in stdenv.mkDerivation (rec { name = "gamin-0.1.10"; src = fetchurl { @@ -8,7 +10,7 @@ stdenv.mkDerivation (rec { sha256 = "18cr51y5qacvs2fc2p1bqv32rs8bzgs6l67zhasyl45yx055y218"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig autoreconfHook ]; buildInputs = [ glib ]; @@ -27,7 +29,7 @@ stdenv.mkDerivation (rec { name = "fix-pthread-mutex.patch"; url = "https://git.alpinelinux.org/aports/plain/main/gamin/fix-pthread-mutex.patch?h=3.4-stable&id=a1a836b089573752c1b0da7d144c0948b04e8ea8"; sha256 = "13igdbqsxb3sz0h417k6ifmq2n4siwqspj6slhc7fdl5wd1fxmdz"; - }); + }) ++ stdenv.lib.optional (cross) ./abstract-socket-namespace.patch ; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 8110f13d14c..6c5703f521d 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -11,7 +11,7 @@ }: let - version = "2.7.1"; + version = "2.7.2"; inherit (stdenv.lib) optional optionals optionalString; mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}"; @@ -24,7 +24,7 @@ stdenv.mkDerivation { owner = "harfbuzz"; repo = "harfbuzz"; rev = version; - sha256 = "172jmwp666xbs6yy1pc2495gnkz8xw11b8zkz3j19jxlvvp4mxcs"; + sha256 = "0vfyxr3lvzp80j1347nrwpr1ndv265p15rj2q8rj31lb26nyz4dm"; }; postPatch = '' diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 576a2fec921..3a651087510 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, meson, ninja +{ stdenv, fetchFromGitLab, pkgconfig, meson, ninja , libevdev, mtdev, udev, libwacom , documentationSupport ? false, doxygen ? null, graphviz ? null # Documentation , eventGUISupport ? false, cairo ? null, glib ? null, gtk3 ? null # GUI event viewer support @@ -27,11 +27,14 @@ in with stdenv.lib; stdenv.mkDerivation rec { pname = "libinput"; - version = "1.16.1"; - - src = fetchurl { - url = "https://www.freedesktop.org/software/libinput/${pname}-${version}.tar.xz"; - sha256 = "e6fRru3RUWi7IdF+nmKKocJ5V5Y6Qjo/6jk4pQF1hTk="; + version = "1.16.2"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = pname; + repo = pname; + rev = version; + sha256 = "0qii6yh3dlhgv9z970cpzbz19ii8zjvq4k7pg75sy2gmia7smwd1"; }; outputs = [ "bin" "out" "dev" ]; @@ -80,7 +83,7 @@ stdenv.mkDerivation rec { meta = { description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver"; - homepage = "http://www.freedesktop.org/wiki/Software/libinput"; + homepage = "https://www.freedesktop.org/wiki/Software/libinput/"; license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ codyopel ]; diff --git a/pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch b/pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch deleted file mode 100644 index 552c4e08d5f..00000000000 --- a/pkgs/development/libraries/libvpx/CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch +++ /dev/null @@ -1,211 +0,0 @@ -Backports of - -From 46e17f0cb4a80b36755c84b8bf15731d3386c08f Mon Sep 17 00:00:00 2001 -From: kyslov -Date: Fri, 4 Jan 2019 17:04:09 -0800 -Subject: [PATCH] Fix OOB memory access on fuzzed data - -From 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 Mon Sep 17 00:00:00 2001 -From: James Zern -Date: Tue, 24 Jul 2018 21:36:50 -0700 -Subject: [PATCH] vp9: fix OOB read in decoder_peek_si_internal - -From f00890eecdf8365ea125ac16769a83aa6b68792d Mon Sep 17 00:00:00 2001 -From: James Zern -Date: Tue, 11 Dec 2018 18:06:20 -0800 -Subject: [PATCH] update libwebm to libwebm-1.0.0.27-352-g6ab9fcf - -From 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 Mon Sep 17 00:00:00 2001 -From: James Zern -Date: Tue, 9 Apr 2019 18:37:44 -0700 -Subject: [PATCH] update libwebm to libwebm-1.0.0.27-358-gdbf1d10 - -From 52add5896661d186dec284ed646a4b33b607d2c7 Mon Sep 17 00:00:00 2001 -From: Jerome Jiang -Date: Wed, 23 May 2018 15:43:00 -0700 -Subject: [PATCH] VP8: Fix use-after-free in postproc. - -to address CVE-2019-9232 CVE-2019-9325 CVE-2019-9371 CVE-2019-9433 - ---- libvpx-1.7.0.orig/test/decode_api_test.cc -+++ libvpx-1.7.0/test/decode_api_test.cc -@@ -138,8 +138,30 @@ TEST(DecodeAPI, Vp9InvalidDecode) { - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); - } - --TEST(DecodeAPI, Vp9PeekSI) { -+void TestPeekInfo(const uint8_t *const data, uint32_t data_sz, -+ uint32_t peek_size) { - const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo; -+ // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get -+ // to decoder_peek_si_internal on frames of size < 8. -+ if (data_sz >= 8) { -+ vpx_codec_ctx_t dec; -+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0)); -+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM -+ : VPX_CODEC_CORRUPT_FRAME, -+ vpx_codec_decode(&dec, data, data_sz, NULL, 0)); -+ vpx_codec_iter_t iter = NULL; -+ EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter)); -+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); -+ } -+ -+ // Verify behavior of vpx_codec_peek_stream_info. -+ vpx_codec_stream_info_t si; -+ si.sz = sizeof(si); -+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK, -+ vpx_codec_peek_stream_info(codec, data, data_sz, &si)); -+} -+ -+TEST(DecodeAPI, Vp9PeekStreamInfo) { - // The first 9 bytes are valid and the rest of the bytes are made up. Until - // size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it - // should return VPX_CODEC_CORRUPT_FRAME. -@@ -150,24 +172,18 @@ TEST(DecodeAPI, Vp9PeekSI) { - }; - - for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) { -- // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get -- // to decoder_peek_si_internal on frames of size < 8. -- if (data_sz >= 8) { -- vpx_codec_ctx_t dec; -- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0)); -- EXPECT_EQ( -- (data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME, -- vpx_codec_decode(&dec, data, data_sz, NULL, 0)); -- vpx_codec_iter_t iter = NULL; -- EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter)); -- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); -- } -- -- // Verify behavior of vpx_codec_peek_stream_info. -- vpx_codec_stream_info_t si; -- si.sz = sizeof(si); -- EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK, -- vpx_codec_peek_stream_info(codec, data, data_sz, &si)); -+ TestPeekInfo(data, data_sz, 10); -+ } -+} -+ -+TEST(DecodeAPI, Vp9PeekStreamInfoTruncated) { -+ // This profile 1 header requires 10.25 bytes, ensure -+ // vpx_codec_peek_stream_info doesn't over read. -+ const uint8_t profile1_data[10] = { 0xa4, 0xe9, 0x30, 0x68, 0x53, -+ 0xe9, 0x30, 0x68, 0x53, 0x04 }; -+ -+ for (uint32_t data_sz = 1; data_sz <= 10; ++data_sz) { -+ TestPeekInfo(profile1_data, data_sz, 11); - } - } - #endif // CONFIG_VP9_DECODER ---- libvpx-1.7.0.orig/third_party/libwebm/mkvparser/mkvparser.cc -+++ libvpx-1.7.0/third_party/libwebm/mkvparser/mkvparser.cc -@@ -5307,8 +5307,8 @@ long VideoTrack::Parse(Segment* pSegment - - const long long stop = pos + s.size; - -- Colour* colour = NULL; -- Projection* projection = NULL; -+ std::unique_ptr colour_ptr; -+ std::unique_ptr projection_ptr; - - while (pos < stop) { - long long id, size; -@@ -5357,11 +5357,19 @@ long VideoTrack::Parse(Segment* pSegment - if (rate <= 0) - return E_FILE_FORMAT_INVALID; - } else if (id == libwebm::kMkvColour) { -- if (!Colour::Parse(pReader, pos, size, &colour)) -+ Colour* colour = NULL; -+ if (!Colour::Parse(pReader, pos, size, &colour)) { - return E_FILE_FORMAT_INVALID; -+ } else { -+ colour_ptr.reset(colour); -+ } - } else if (id == libwebm::kMkvProjection) { -- if (!Projection::Parse(pReader, pos, size, &projection)) -+ Projection* projection = NULL; -+ if (!Projection::Parse(pReader, pos, size, &projection)) { - return E_FILE_FORMAT_INVALID; -+ } else { -+ projection_ptr.reset(projection); -+ } - } - - pos += size; // consume payload -@@ -5392,8 +5400,8 @@ long VideoTrack::Parse(Segment* pSegment - pTrack->m_display_unit = display_unit; - pTrack->m_stereo_mode = stereo_mode; - pTrack->m_rate = rate; -- pTrack->m_colour = colour; -- pTrack->m_projection = projection; -+ pTrack->m_colour = colour_ptr.release(); -+ pTrack->m_projection = projection_ptr.release(); - - pResult = pTrack; - return 0; // success ---- libvpx-1.7.0.orig/vp8/common/postproc.c -+++ libvpx-1.7.0/vp8/common/postproc.c -@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BU - double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065; - int ppl = (int)(level + .5); - -- const MODE_INFO *mode_info_context = cm->show_frame_mi; -+ const MODE_INFO *mode_info_context = cm->mi; - int mbr, mbc; - - /* The pixel thresholds are adjusted according to if or not the macroblock ---- libvpx-1.7.0.orig/vp8/decoder/dboolhuff.h -+++ libvpx-1.7.0/vp8/decoder/dboolhuff.h -@@ -76,7 +76,7 @@ static int vp8dx_decode_bool(BOOL_DECODE - } - - { -- register int shift = vp8_norm[range]; -+ const unsigned char shift = vp8_norm[(unsigned char)range]; - range <<= shift; - value <<= shift; - count -= shift; ---- libvpx-1.7.0.orig/vp9/vp9_dx_iface.c -+++ libvpx-1.7.0/vp9/vp9_dx_iface.c -@@ -97,7 +97,7 @@ static vpx_codec_err_t decoder_peek_si_i - const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si, - int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) { - int intra_only_flag = 0; -- uint8_t clear_buffer[10]; -+ uint8_t clear_buffer[11]; - - if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM; - -@@ -158,6 +158,9 @@ static vpx_codec_err_t decoder_peek_si_i - if (profile > PROFILE_0) { - if (!parse_bitdepth_colorspace_sampling(profile, &rb)) - return VPX_CODEC_UNSUP_BITSTREAM; -+ // The colorspace info may cause vp9_read_frame_size() to need 11 -+ // bytes. -+ if (data_sz < 11) return VPX_CODEC_UNSUP_BITSTREAM; - } - rb.bit_offset += REF_FRAMES; // refresh_frame_flags - vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h); ---- libvpx-1.7.0.orig/vpx_dsp/bitreader.h -+++ libvpx-1.7.0/vpx_dsp/bitreader.h -@@ -94,7 +94,7 @@ static INLINE int vpx_read(vpx_reader *r - } - - { -- register int shift = vpx_norm[range]; -+ const unsigned char shift = vpx_norm[(unsigned char)range]; - range <<= shift; - value <<= shift; - count -= shift; ---- libvpx-1.7.0.orig/vpx_dsp/bitreader_buffer.c -+++ libvpx-1.7.0/vpx_dsp/bitreader_buffer.c -@@ -23,7 +23,7 @@ int vpx_rb_read_bit(struct vpx_read_bit_ - rb->bit_offset = off + 1; - return bit; - } else { -- rb->error_handler(rb->error_handler_data); -+ if (rb->error_handler != NULL) rb->error_handler(rb->error_handler_data); - return 0; - } - } diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 007df403ff7..83e60466c14 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -56,20 +56,16 @@ assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport; stdenv.mkDerivation rec { pname = "libvpx"; - version = "1.7.0"; + version = "1.9.0"; src = fetchFromGitHub { owner = "webmproject"; - repo = "libvpx"; + repo = pname; rev = "v${version}"; - sha256 = "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"; + sha256 = "16xv6ambc82g14h1y0q1vyy57wp6j9fbp0nk0wd5csnrw407rhry"; }; - patches = [ - ./CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch - ]; - - postPatch = ''patchShebangs .''; + postPatch = "patchShebangs ."; outputs = [ "bin" "dev" "out" ]; setOutputFlags = false; @@ -135,6 +131,12 @@ stdenv.mkDerivation rec { experimentalFpMbStatsSupport || experimentalEmulateHardwareSupport) "experimental") ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + #"--extra-cflags=" + #"--extra-cxxflags=" + #"--prefix=" + #"--libc=" + #"--libdir=" + "--enable-external-build" # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 @@ -159,6 +161,10 @@ stdenv.mkDerivation rec { buildInputs = [ ] ++ optionals unitTestsSupport [ coreutils curl ]; + NIX_LDFLAGS = [ + "-lpthread" # fixes linker errors + ]; + enableParallelBuilding = true; postInstall = ''moveToOutput bin "$bin" ''; diff --git a/pkgs/development/libraries/libwebp/default.nix b/pkgs/development/libraries/libwebp/default.nix index d2a98c4a847..6d24ba7f2ed 100644 --- a/pkgs/development/libraries/libwebp/default.nix +++ b/pkgs/development/libraries/libwebp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchFromGitHub, autoreconfHook, libtool , threadingSupport ? true # multi-threading , openglSupport ? false, freeglut ? null, libGL ? null, libGLU ? null # OpenGL (required for vwebp) , pngSupport ? true, libpng ? null # PNG image format @@ -27,13 +27,17 @@ in with stdenv.lib; stdenv.mkDerivation rec { pname = "libwebp"; - version = "1.0.3"; + version = "1.1.0"; - src = fetchurl { - url = "http://downloads.webmproject.org/releases/webp/${pname}-${version}.tar.gz"; - sha256 = "0kxk4sic34bln3k09mml7crvrmhj97swdk7b1ahbp5w6bj30f2p2"; + src = fetchFromGitHub { + owner = "webmproject"; + repo = pname; + rev = version; + sha256 = "1kl6qqa29ygqb2fpv140y59v539gdqx4vcf3mlaxhca2bks98qgm"; }; + prePatch = "patchShebangs ."; + configureFlags = [ (mkFlag threadingSupport "threading") (mkFlag openglSupport "gl") @@ -50,6 +54,7 @@ stdenv.mkDerivation rec { (mkFlag libwebpdecoderSupport "libwebpdecoder") ]; + nativeBuildInputs = [ autoreconfHook libtool ]; buildInputs = [ ] ++ optionals openglSupport [ freeglut libGL libGLU ] ++ optional pngSupport libpng diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index aeeb0514fab..aa180b94d74 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -8,7 +8,7 @@ , galliumDrivers ? ["auto"] , driDrivers ? ["auto"] , vulkanDrivers ? ["auto"] -, eglPlatforms ? [ "x11" "surfaceless" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ] +, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ] , OpenGL, Xplugin , withValgrind ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32, valgrind-light , enableGalliumNine ? stdenv.isLinux @@ -31,7 +31,7 @@ with stdenv.lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "20.1.9"; + version = "20.2.1"; branch = versions.major version; in @@ -46,7 +46,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "10kk8a8k7f4ip8yaiqdyrx162nbw8pw4h3b4hs4ha8mpd43wlldj"; + sha256 = "0ji4s1gwcvx3fbj9h0x5zbma6kw4b75vs0266zhc06r97yd6v96i"; }; prePatch = "patchShebangs ."; @@ -58,7 +58,6 @@ stdenv.mkDerivation { ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl ./opencl-install-dir.patch ./disk_cache-include-dri-driver-path-in-cache-key.patch - ./link-radv-with-ld_args_build_id.patch ] ++ lib.optionals stdenv.hostPlatform.isMusl [ # Fix `-Werror=int-conversion` pthread warnings on musl. diff --git a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch index acf3d827c56..fa78f4ae730 100644 --- a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch +++ b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch @@ -1,4 +1,4 @@ -From 46b10f2bc28fd79d561c8c49bbae3aee6a4cf0e6 Mon Sep 17 00:00:00 2001 +From 980164fd92f5c2302624cd046d30ff21e6e4ba8a Mon Sep 17 00:00:00 2001 From: David McFarland Date: Mon, 6 Aug 2018 15:52:11 -0300 Subject: [PATCH] disk_cache: include dri driver path in cache key @@ -12,10 +12,10 @@ timestamps in /nix/store are zero. 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt -index 1a2dd8ebd12..2ac741af5a6 100644 +index 2d39d13b6ad..daf06480a60 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -348,6 +348,12 @@ option( +@@ -368,6 +368,12 @@ option( value : true, description : 'Enable direct rendering in GLX and EGL for DRI', ) @@ -26,13 +26,13 @@ index 1a2dd8ebd12..2ac741af5a6 100644 + description : 'Mesa cache key.' +) option( - 'I-love-half-baked-turnips', + 'prefer-iris', type : 'boolean', diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c -index d1f14736725..2ed328f292e 100644 +index a92d621927a..3bd65c6890c 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c -@@ -402,8 +402,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id, +@@ -401,8 +401,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id, /* Create driver id keys */ size_t id_size = strlen(driver_id) + 1; @@ -43,7 +43,7 @@ index d1f14736725..2ed328f292e 100644 cache->driver_keys_blob_size += gpu_name_size; /* We sometimes store entire structs that contains a pointers in the cache, -@@ -424,6 +426,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id, +@@ -423,6 +425,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id, uint8_t *drv_key_blob = cache->driver_keys_blob; DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size) DRV_KEY_CPY(drv_key_blob, driver_id, id_size) @@ -52,22 +52,23 @@ index d1f14736725..2ed328f292e 100644 DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size) DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size) diff --git a/src/util/meson.build b/src/util/meson.build -index 9da29cc7390..5f549bb1d99 100644 +index 0893f64793b..d46ce85a85f 100644 --- a/src/util/meson.build +++ b/src/util/meson.build -@@ -170,7 +170,12 @@ _libmesa_util = static_library( - include_directories : inc_common, +@@ -179,7 +179,12 @@ _libmesa_util = static_library( + include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : deps_for_libmesa_util, link_with: libmesa_format, -- c_args : [c_msvc_compat_args, c_vis_args], +- c_args : [c_msvc_compat_args], + c_args : [ -+ c_msvc_compat_args, c_vis_args, ++ c_msvc_compat_args, + '-DDISK_CACHE_KEY="@0@"'.format( + get_option('disk-cache-key') + ), + ], + gnu_symbol_visibility : 'hidden', build_by_default : false ) - -- -2.25.1 +2.28.0 + diff --git a/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch b/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch deleted file mode 100644 index 0a660332392..00000000000 --- a/pkgs/development/libraries/mesa/link-radv-with-ld_args_build_id.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b49bcb6eece322b70fc2e8b0c8498f5a38ea7b82 Mon Sep 17 00:00:00 2001 -From: David McFarland -Date: Sun, 26 Jul 2020 17:29:49 -0300 -Subject: [PATCH] link radv with ld_args_build_id - -This is needed for radv_device_get_cache_uuid to work correctly. ---- - src/amd/vulkan/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build -index eec026e8f60..a07a0821938 100644 ---- a/src/amd/vulkan/meson.build -+++ b/src/amd/vulkan/meson.build -@@ -183,7 +183,7 @@ libvulkan_radeon = shared_library( - ], - c_args : [c_vis_args, no_override_init_args, radv_flags], - cpp_args : [cpp_vis_args, radv_flags], -- link_args : [ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args], -+ link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args], - link_depends : [libvulkan_radeon_link_depends,], - install : true, - ) --- -2.28.0 diff --git a/pkgs/development/libraries/mesa/missing-includes.patch b/pkgs/development/libraries/mesa/missing-includes.patch index 9685a1619a5..72488893c6b 100644 --- a/pkgs/development/libraries/mesa/missing-includes.patch +++ b/pkgs/development/libraries/mesa/missing-includes.patch @@ -9,18 +9,6 @@ #include "pipe/p_compiler.h" #include "pipe/p_state.h" ---- ./src/util/rand_xor.c.orig 2017-06-20 00:38:57.199474067 +0200 -+++ ./src/util/rand_xor.c 2017-06-20 00:40:31.351279557 +0200 -@@ -23,7 +23,9 @@ - */ - - #if defined(__linux__) -+#include - #include -+#include - #include - #include - #else --- ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +++ ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -28,6 +28,8 @@ diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 1fc38dd8aaa..c4a9a4a0180 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -160,8 +160,8 @@ in { }; openssl_1_1 = common { - version = "1.1.1g"; - sha256 = "0ikdcc038i7jk8h7asq5xcn8b1xc2rrbc88yfm4hqbz3y5s4gc6x"; + version = "1.1.1h"; + sha256 = "1ncmcnh5bmxkwrvm0m1q4kdcjjfpwvlyjspjhibkxc6p9dvsi72w"; patches = [ ./1.1/nix-ssl-cert-file.patch diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index 46f520e41e4..31a7e7e9086 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -36,6 +36,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Tests run in fakeroot for non-root users + preCheck = '' + if [ "$(id -u)" != "0" ]; then + export FAKED_MODE=1 + fi + ''; + doCheck = !stdenv.isDarwin; installFlags = [ diff --git a/pkgs/development/libraries/zeromq/4.x.nix b/pkgs/development/libraries/zeromq/4.x.nix index 8302ebbd1e8..d5819ff7ee9 100644 --- a/pkgs/development/libraries/zeromq/4.x.nix +++ b/pkgs/development/libraries/zeromq/4.x.nix @@ -1,17 +1,19 @@ -{ stdenv, fetchFromGitHub, cmake, asciidoc, enableDrafts ? false }: +{ stdenv, fetchFromGitHub, cmake, asciidoc, pkg-config, libsodium +, enableDrafts ? false }: stdenv.mkDerivation rec { pname = "zeromq"; - version = "4.3.2"; + version = "4.3.3"; src = fetchFromGitHub { owner = "zeromq"; repo = "libzmq"; rev = "v${version}"; - sha256 = "1q37z05i76ili31j6jlw8988iy6vxadlmd306f99phxfdpqa6bn9"; + sha256 = "155kb0ih0xj4jvd39bq8d04bgvhy9143r3632ks1m04455z4qdzd"; }; - nativeBuildInputs = [ cmake asciidoc ]; + nativeBuildInputs = [ cmake asciidoc pkg-config ]; + buildInputs = [ libsodium ]; enableParallelBuilding = true; diff --git a/pkgs/development/python-modules/arrow/default.nix b/pkgs/development/python-modules/arrow/default.nix index bc3de37526a..7dbe3b98fca 100644 --- a/pkgs/development/python-modules/arrow/default.nix +++ b/pkgs/development/python-modules/arrow/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "arrow"; - version = "0.15.8"; + version = "0.17.0"; src = fetchPypi { inherit pname version; - sha256 = "edc31dc051db12c95da9bac0271cd1027b8e36912daf6d4580af53b23e62721a"; + sha256 = "ff08d10cda1d36c68657d6ad20d74fbea493d980f8b2d45344e00d6ed2bf6ed4"; }; propagatedBuildInputs = [ python-dateutil ] diff --git a/pkgs/development/python-modules/pycairo/default.nix b/pkgs/development/python-modules/pycairo/default.nix index d61279e38d5..24e0f9792d7 100644 --- a/pkgs/development/python-modules/pycairo/default.nix +++ b/pkgs/development/python-modules/pycairo/default.nix @@ -1,4 +1,13 @@ -{ lib, fetchFromGitHub, meson, ninja, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPy3k }: +{ lib +, fetchFromGitHub +, meson +, ninja +, buildPythonPackage +, pytestCheckHook +, pkg-config +, cairo +, isPy3k +}: buildPythonPackage rec { pname = "pycairo"; @@ -16,22 +25,25 @@ buildPythonPackage rec { nativeBuildInputs = [ meson ninja - pkgconfig + pkg-config ]; buildInputs = [ cairo - xlibsWrapper ]; - checkInputs = [ pytest ]; + checkInputs = [ + pytestCheckHook + ]; - mesonFlags = [ "-Dpython=${if isPy3k then "python3" else "python"}" ]; + mesonFlags = [ + "-Dpython=${if isPy3k then "python3" else "python"}" + ]; meta = with lib; { description = "Python 2/3 bindings for cairo"; homepage = "https://pycairo.readthedocs.io/"; - license = with licenses; [ lgpl2 mpl11 ]; + license = with licenses; [ lgpl21Only mpl11 ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; }; } diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 559a4c191b6..010f1d9c6c2 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -5,6 +5,7 @@ , ps , isBootstrap ? false , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) +, useOpenSSL ? !isBootstrap, openssl , useNcurses ? false, ncurses , useQt4 ? false, qt4 , withQt5 ? false, qtbase @@ -44,15 +45,17 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - buildInputs = - [ setupHook pkgconfig ] + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + nativeBuildInputs = [ setupHook pkgconfig ]; + + buildInputs = [] ++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ] + ++ lib.optional useOpenSSL openssl ++ lib.optional useNcurses ncurses ++ lib.optional useQt4 qt4 ++ lib.optional withQt5 qtbase; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - propagatedBuildInputs = lib.optional stdenv.isDarwin ps; preConfigure = '' @@ -91,13 +94,15 @@ stdenv.mkDerivation rec { "-DCMAKE_AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar" "-DCMAKE_RANLIB=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" "-DCMAKE_STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" - ] + + "-DCMAKE_USE_OPENSSL=${if useOpenSSL then "ON" else "OFF"}" # Avoid depending on frameworks. - ++ lib.optional (!useNcurses) "-DBUILD_CursesDialog=OFF"; + "-DBUILD_CursesDialog=${if useNcurses then "ON" else "OFF"}" + ]; # make install attempts to use the just-built cmake preInstall = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) '' - sed -i 's|bin/cmake|${buildPackages.cmake}/bin/cmake|g' Makefile + sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile ''; dontUseCmakeConfigure = true; diff --git a/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch b/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch new file mode 100644 index 00000000000..5b9020b3d54 --- /dev/null +++ b/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch @@ -0,0 +1,40 @@ +From 536108b10271f2f42d41c7d9ddb4ce2ea1851f4f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= +Date: Sat, 17 Oct 2020 19:27:08 +0200 +Subject: [PATCH] boost: Do not add system paths on nix + +--- + mesonbuild/dependencies/boost.py | 17 +---------------- + 1 file changed, 1 insertion(+), 16 deletions(-) + +diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py +index 907c0c275..ecaf11b18 100644 +--- a/mesonbuild/dependencies/boost.py ++++ b/mesonbuild/dependencies/boost.py +@@ -643,22 +643,7 @@ class BoostDependency(ExternalDependency): + roots += [x for x in candidates if x.name.lower().startswith('boost') and x.is_dir()] + else: + tmp = [] # type: T.List[Path] +- +- # Homebrew +- brew_boost = Path('/usr/local/Cellar/boost') +- if brew_boost.is_dir(): +- tmp += [x for x in brew_boost.iterdir()] +- +- # Add some default system paths +- tmp += [Path('/opt/local')] +- tmp += [Path('/usr/local/opt/boost')] +- tmp += [Path('/usr/local')] +- tmp += [Path('/usr')] +- +- # Cleanup paths +- tmp = [x for x in tmp if x.is_dir()] +- tmp = [x.resolve() for x in tmp] +- roots += tmp ++ # Do not add any non-explicit paths on nix + + return roots + +-- +2.25.4 + diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 8421fb7d70a..1b9c3ef6477 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -52,6 +52,11 @@ python3.pkgs.buildPythonApplication rec { # cut-in-half-by-\0 store path references. # Let’s just clear the whole rpath and hope for the best. ./clear-old-rpath.patch + + # Patch out default boost search paths to avoid impure builds on + # unsandboxed non-NixOS builds, see: + # https://github.com/NixOS/nixpkgs/issues/86131#issuecomment-711051774 + ./boost-Do-not-add-system-paths-on-nix.patch ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 0e10add5561..64fa92be865 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -14,7 +14,7 @@ let apparmor-series = "2.13"; - apparmor-patchver = "4"; + apparmor-patchver = "5"; apparmor-version = apparmor-series + "." + apparmor-patchver; apparmor-meta = component: with stdenv.lib; { @@ -27,19 +27,10 @@ let apparmor-sources = fetchurl { url = "https://launchpad.net/apparmor/${apparmor-series}/${apparmor-version}/+download/apparmor-${apparmor-version}.tar.gz"; - sha256 = "03nislxccnbxld89giak2s8xa4mdbwscfxbdwhmw5qpvgz08dgwh"; - }; - - # See This and the - # accompanying application in prePatchCommon should be removed in 2.13.5 - gnumake43Patch = fetchpatch { - url = "https://gitlab.com/apparmor/apparmor/-/merge_requests/465.patch"; - name = "2-23-fix-build-with-make-4.3.patch"; - sha256 = "0xw028iqp69j9mxv0kbwraplgkj5i5djdlgf0anpkc5cdbsf96r9"; + sha256 = "05x7r99k00r97v1cq2f711lv6yqzhbl8zp1i1c7kxra4v0a2lzk3"; }; prePatchCommon = '' - patch -p1 < ${gnumake43Patch} chmod a+x ./common/list_capabilities.sh ./common/list_af_names.sh patchShebangs ./common/list_capabilities.sh ./common/list_af_names.sh substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man" diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index a9fcf455ee4..b3de7ceedaa 100644 --- a/pkgs/os-specific/linux/iproute/default.nix +++ b/pkgs/os-specific/linux/iproute/default.nix @@ -5,19 +5,19 @@ stdenv.mkDerivation rec { pname = "iproute2"; - version = "5.8.0"; + version = "5.9.0"; src = fetchurl { url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0vk4vickrpahdhl3zazr2qn2bf99v5549ncirjpwiy4h0a4izkfg"; + sha256 = "1kys6dmhrl43iaq95n5sh02p39d7bq8i5y672qrzgwnwpjaaqpd2"; }; preConfigure = '' # Don't try to create /var/lib/arpd: sed -e '/ARPDDIR/d' -i Makefile - # TODO: Drop temporary version fix for 5.8 (53159d81) once 5.9 is out: + # TODO: Drop temporary version fix for 5.9 once 5.10 is out: substituteInPlace include/version.h \ - --replace "v5.7.0-77-gb687d1067169" "5.8.0" + --replace "5.8.0" "${version}" ''; outputs = [ "out" "dev" ]; diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index 174f1be99db..7931e35a844 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libcap"; - version = "2.27"; + version = "2.44"; src = fetchurl { url = "mirror://kernel/linux/libs/security/linux-privs/libcap2/${pname}-${version}.tar.xz"; - sha256 = "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs"; + sha256 = "1qf80lifygbnxwvqjf8jz5j24n6fqqx4ixnkbf76xs2vrmcq664j"; }; outputs = [ "out" "dev" "lib" "man" "doc" "pam" ]; @@ -54,6 +54,7 @@ stdenv.mkDerivation rec { meta = { description = "Library for working with POSIX capabilities"; + homepage = "https://sites.google.com/site/fullycapable"; platforms = stdenv.lib.platforms.linux; license = stdenv.lib.licenses.bsd3; }; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index cef9d96ae6e..da99280f63b 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,27 +1,61 @@ -{ stdenv, lib, fetchFromGitHub, pkgconfig, intltool, gperf, libcap -, curl, kmod, gnupg, gnutar, xz, pam, acl, libuuid, m4, e2fsprogs, utillinux, libffi -, glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor -, audit, lz4, bzip2, pcre2 -, linuxHeaders ? stdenv.cc.libc.linuxHeaders -, iptables, gnu-efi, bashInteractive -, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 -, ninja, meson, python3Packages, glibcLocales -, patchelf -, substituteAll -, getent -, cryptsetup, lvm2 +{ stdenv, lib, fetchFromGitHub , buildPackages -, perl +, ninja, meson, m4, pkgconfig, coreutils, gperf, getent +, patchelf, perl, glibcLocales, glib, substituteAll +, gettext, python3Packages + +# Mandatory dependencies +, libcap +, utillinux +, kbd +, kmod + +# Optional dependencies +, pam, cryptsetup, lvm2, audit, acl +, lz4, libgcrypt, libgpgerror, libidn2 +, curl, gnutar, gnupg, zlib +, xz, libuuid, libffi +, libapparmor, intltool +, bzip2, pcre2, e2fsprogs +, linuxHeaders ? stdenv.cc.libc.linuxHeaders +, gnu-efi +, iptables , withSelinux ? false, libselinux , withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools +, bashInteractive + +, withResolved ? true +, withLogind ? true +, withHostnamed ? true +, withLocaled ? true +, withNetworkd ? true +, withTimedated ? true +, withTimesyncd ? true +, withHwdb ? true +, withEfi ? stdenv.hostPlatform.isEfi +, withImportd ? true +, withCryptsetup ? true + +# name argument +, pname ? "systemd" + + +, libxslt, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 }: +assert withResolved -> (libgcrypt != null && libgpgerror != null); +assert withImportd -> + ( curl.dev != null && zlib != null && xz != null && libgcrypt != null + && gnutar != null && gnupg != null); + +assert withCryptsetup -> + ( cryptsetup != null ); + let version = "246.6"; in stdenv.mkDerivation { - inherit version; - pname = "systemd"; + inherit version pname; # We use systemd/systemd-stable for src, and ship NixOS-specific patches inside nixpkgs directly # This has proven to be less error-prone than the previous systemd fork. @@ -71,13 +105,17 @@ in stdenv.mkDerivation { outputs = [ "out" "man" "dev" ]; nativeBuildInputs = - [ pkgconfig intltool gperf libxslt gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 + [ pkgconfig gperf ninja meson coreutils # meson calls date, stat etc. glibcLocales patchelf getent m4 perl # to patch the libsystemd.so and remove dependencies on aarch64 + intltool + gettext + + libxslt docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 (buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ])) ]; buildInputs = @@ -86,9 +124,10 @@ in stdenv.mkDerivation { pcre2 ] ++ stdenv.lib.optional withKexectools kexectools ++ stdenv.lib.optional withLibseccomp libseccomp ++ - [ libffi audit lz4 bzip2 libapparmor - iptables gnu-efi - ] ++ stdenv.lib.optional withSelinux libselinux; + [ libffi audit lz4 bzip2 libapparmor iptables ] ++ + stdenv.lib.optional withEfi gnu-efi ++ + stdenv.lib.optional withSelinux libselinux ++ + stdenv.lib.optional withCryptsetup cryptsetup.dev; #dontAddPrefix = true; @@ -106,19 +145,23 @@ in stdenv.mkDerivation { "-Ddebug-shell=${bashInteractive}/bin/bash" # while we do not run tests we should also not build them. Removes about 600 targets "-Dtests=false" - "-Dimportd=true" + "-Dimportd=${stdenv.lib.boolToString withImportd}" "-Dlz4=true" "-Dhomed=false" - "-Dhostnamed=true" - "-Dnetworkd=true" + "-Dlogind=${stdenv.lib.boolToString withLogind}" + "-Dlocaled=${stdenv.lib.boolToString withLocaled}" + "-Dhostnamed=${stdenv.lib.boolToString withHostnamed}" + "-Dnetworkd=${stdenv.lib.boolToString withNetworkd}" + "-Dcryptsetup=${stdenv.lib.boolToString withCryptsetup}" "-Dportabled=false" + "-Dhwdb=${stdenv.lib.boolToString withHwdb}" "-Dremote=false" "-Dsysusers=false" - "-Dtimedated=true" - "-Dtimesyncd=true" + "-Dtimedated=${stdenv.lib.boolToString withTimedated}" + "-Dtimesyncd=${stdenv.lib.boolToString withTimesyncd}" "-Dfirstboot=false" "-Dlocaled=true" - "-Dresolve=true" + "-Dresolve=${stdenv.lib.boolToString withResolved}" "-Dsplit-usr=false" "-Dlibcurl=true" "-Dlibidn=false" @@ -141,11 +184,6 @@ in stdenv.mkDerivation { "-Dsystem-gid-max=999" # "-Dtime-epoch=1" - (if !stdenv.hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true") - "-Defi-libdir=${toString gnu-efi}/lib" - "-Defi-includedir=${toString gnu-efi}/include/efi" - "-Defi-ldsdir=${toString gnu-efi}/lib" - "-Dsysvinit-path=" "-Dsysvrcnd-path=" @@ -161,6 +199,12 @@ in stdenv.mkDerivation { # Upstream defaulted to disable manpages since they optimize for the much # more frequent development builds "-Dman=true" + + "-Dgnu-efi=${stdenv.lib.boolToString (withEfi && gnu-efi != null)}" + ] ++ stdenv.lib.optionals (withEfi && gnu-efi != null) [ + "-Defi-libdir=${toString gnu-efi}/lib" + "-Defi-includedir=${toString gnu-efi}/include/efi" + "-Defi-ldsdir=${toString gnu-efi}/lib" ]; preConfigure = '' @@ -284,6 +328,6 @@ in stdenv.mkDerivation { license = licenses.lgpl21Plus; platforms = platforms.linux; priority = 10; - maintainers = with maintainers; [ andir eelco flokli ]; + maintainers = with maintainers; [ andir eelco flokli kloenk ]; }; } diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index efc2cb2acbd..96f40649c0f 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -703,11 +703,11 @@ lib.makeScope newScope (self: with self; { }) {}; libX11 = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libxcb, xtrans }: stdenv.mkDerivation { - name = "libX11-1.6.8"; + name = "libX11-1.6.12"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/lib/libX11-1.6.8.tar.bz2"; - sha256 = "1mbkwhhprhf49s2iwx7kiliprsdvd690zk44x3h53ql9q52si2dj"; + url = "mirror://xorg/individual/lib/libX11-1.6.12.tar.bz2"; + sha256 = "1ivfzl1qwk8zh7gc0m5vb58gdxz11jwg7w3d356w16j1d5s2427i"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; @@ -1054,11 +1054,11 @@ lib.makeScope newScope (self: with self; { }) {}; libXvMC = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libX11, libXext, libXv }: stdenv.mkDerivation { - name = "libXvMC-1.0.11"; + name = "libXvMC-1.0.12"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/lib/libXvMC-1.0.11.tar.bz2"; - sha256 = "0bb2c996p0smp2lwckffcfh4701bzv7266xh230ag0x68ka38bja"; + url = "mirror://xorg/individual/lib/libXvMC-1.0.12.tar.bz2"; + sha256 = "1kbdjsvkm5l7axv7g477qj18sab2wnqhliy6197syzizgfbsfgbb"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; @@ -1158,11 +1158,11 @@ lib.makeScope newScope (self: with self; { }) {}; libxcb = callPackage ({ stdenv, pkgconfig, fetchurl, libxslt, libpthreadstubs, libXau, xcbproto, libXdmcp, python }: stdenv.mkDerivation { - name = "libxcb-1.13.1"; + name = "libxcb-1.14"; builder = ./builder.sh; src = fetchurl { - url = "https://xcb.freedesktop.org/dist/libxcb-1.13.1.tar.bz2"; - sha256 = "1i27lvrcsygims1pddpl5c4qqs6z715lm12ax0n3vx0igapvg7x8"; + url = "mirror://xorg/individual/lib/libxcb-1.14.tar.xz"; + sha256 = "0d2chjgyn5lr9sfhacfvqgnj9l9faz11vn322a06jd6lk3dxcpm5"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig python ]; @@ -1431,11 +1431,11 @@ lib.makeScope newScope (self: with self; { }) {}; xcbproto = callPackage ({ stdenv, pkgconfig, fetchurl, python }: stdenv.mkDerivation { - name = "xcb-proto-1.13"; + name = "xcb-proto-1.14.1"; builder = ./builder.sh; src = fetchurl { - url = "https://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.bz2"; - sha256 = "1qdxw9syhbvswiqj5dvj278lrmfhs81apzmvx6205s4vcqg7563v"; + url = "mirror://xorg/individual/proto/xcb-proto-1.14.1.tar.xz"; + sha256 = "1hzwazgyywd9mz4mjj1yv8ski27qqx7ypmyr27m39hrajyddsjph"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig python ]; @@ -1717,11 +1717,11 @@ lib.makeScope newScope (self: with self; { }) {}; xf86inputlibinput = callPackage ({ stdenv, pkgconfig, fetchurl, xorgproto, libinput, xorgserver }: stdenv.mkDerivation { - name = "xf86-input-libinput-0.28.2"; + name = "xf86-input-libinput-0.30.0"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/driver/xf86-input-libinput-0.28.2.tar.bz2"; - sha256 = "0818vr0yhk9j1y1wcbxzcd458vrvp06rrhi8k43bhqkb5jb4dcxq"; + url = "mirror://xorg/individual/driver/xf86-input-libinput-0.30.0.tar.bz2"; + sha256 = "1h4np66p87jf0c85ig524w8f5rbhl5gx8fww1qg0c55f87yzkizr"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; @@ -2679,11 +2679,11 @@ lib.makeScope newScope (self: with self; { }) {}; xorgproto = callPackage ({ stdenv, pkgconfig, fetchurl, libXt }: stdenv.mkDerivation { - name = "xorgproto-2019.1"; + name = "xorgproto-2020.1"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/proto/xorgproto-2019.1.tar.bz2"; - sha256 = "16yll1kaffnslik5sizlw3qrigj1gpsgfgyq6903g3mwdixamnm6"; + url = "mirror://xorg/individual/proto/xorgproto-2020.1.tar.bz2"; + sha256 = "1llrnrkq6iprgiqakmwlv89745s9h02xsiaq0xn3fnh377qm78al"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 80ea5553ad6..e6047458cf2 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -82,13 +82,6 @@ self: super: libX11 = super.libX11.overrideAttrs (attrs: { outputs = [ "out" "dev" "man" ]; - patches = [ - # Fixes an issue that happens when cross-compiling for us. - (fetchpatch { - url = "https://cgit.freedesktop.org/xorg/lib/libX11/patch/?id=0327c427d62f671eced067c6d9b69f4e216a8cac"; - sha256 = "11k2mx56hjgw886zf1cdf2nhv7052d5rggimfshg6lq20i38vpza"; - }) - ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; depsBuildBuild = [ buildPackages.stdenv.cc ]; diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list index ecc477980b8..cd294604884 100644 --- a/pkgs/servers/x11/xorg/tarballs.list +++ b/pkgs/servers/x11/xorg/tarballs.list @@ -1,7 +1,5 @@ https://invisible-mirror.net/archives/luit/luit-20190106.tgz https://xcb.freedesktop.org/dist/libpthread-stubs-0.4.tar.bz2 -https://xcb.freedesktop.org/dist/libxcb-1.13.1.tar.bz2 -https://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.bz2 https://xcb.freedesktop.org/dist/xcb-util-0.4.0.tar.bz2 https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.bz2 https://xcb.freedesktop.org/dist/xcb-util-errors-1.0.tar.bz2 @@ -83,7 +81,7 @@ mirror://xorg/individual/doc/xorg-sgml-doctools-1.11.tar.bz2 mirror://xorg/individual/driver/xf86-input-evdev-2.10.6.tar.bz2 mirror://xorg/individual/driver/xf86-input-joystick-1.6.3.tar.bz2 mirror://xorg/individual/driver/xf86-input-keyboard-1.9.0.tar.bz2 -mirror://xorg/individual/driver/xf86-input-libinput-0.28.2.tar.bz2 +mirror://xorg/individual/driver/xf86-input-libinput-0.30.0.tar.bz2 mirror://xorg/individual/driver/xf86-input-mouse-1.9.3.tar.bz2 mirror://xorg/individual/driver/xf86-input-synaptics-1.9.1.tar.bz2 mirror://xorg/individual/driver/xf86-input-vmmouse-13.1.0.tar.bz2 @@ -177,10 +175,11 @@ mirror://xorg/individual/lib/libICE-1.0.10.tar.bz2 mirror://xorg/individual/lib/libpciaccess-0.16.tar.bz2 mirror://xorg/individual/lib/libSM-1.2.3.tar.bz2 mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2 -mirror://xorg/individual/lib/libX11-1.6.8.tar.bz2 +mirror://xorg/individual/lib/libX11-1.6.12.tar.bz2 mirror://xorg/individual/lib/libXau-1.0.9.tar.bz2 mirror://xorg/individual/lib/libXaw-1.0.13.tar.bz2 mirror://xorg/individual/lib/libXaw3d-1.6.3.tar.bz2 +mirror://xorg/individual/lib/libxcb-1.14.tar.xz mirror://xorg/individual/lib/libXcomposite-0.4.5.tar.bz2 mirror://xorg/individual/lib/libXcursor-1.2.0.tar.bz2 mirror://xorg/individual/lib/libXdamage-1.1.5.tar.bz2 @@ -206,12 +205,13 @@ mirror://xorg/individual/lib/libXTrap-1.0.1.tar.bz2 mirror://xorg/individual/lib/libXt-1.2.0.tar.bz2 mirror://xorg/individual/lib/libXtst-1.2.3.tar.bz2 mirror://xorg/individual/lib/libXv-1.0.11.tar.bz2 -mirror://xorg/individual/lib/libXvMC-1.0.11.tar.bz2 +mirror://xorg/individual/lib/libXvMC-1.0.12.tar.bz2 mirror://xorg/individual/lib/libXxf86dga-1.1.5.tar.bz2 mirror://xorg/individual/lib/libXxf86misc-1.0.4.tar.bz2 mirror://xorg/individual/lib/libXxf86vm-1.1.4.tar.bz2 mirror://xorg/individual/lib/xtrans-1.4.0.tar.bz2 -mirror://xorg/individual/proto/xorgproto-2019.1.tar.bz2 +mirror://xorg/individual/proto/xcb-proto-1.14.1.tar.xz +mirror://xorg/individual/proto/xorgproto-2020.1.tar.bz2 mirror://xorg/individual/util/gccmakedep-1.0.3.tar.bz2 mirror://xorg/individual/util/imake-1.0.8.tar.bz2 mirror://xorg/individual/util/lndir-1.0.3.tar.bz2 diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index eeb175a5e78..5fda5704812 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "bash-completion"; - version = "2.10"; + version = "2.11"; src = fetchFromGitHub { owner = "scop"; repo = "bash-completion"; rev = version; - sha256 = "047yjryy9d6hp18wkigbfrw9r0sm31inlsp8l28fhxg8ii032sgq"; + sha256 = "0m3brd5jx7w07h8vxvvcmbyrlnadrx6hra3cvx6grzv6rin89liv"; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index a040e6ab242..58da8b71b65 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -190,10 +190,7 @@ in rec { stage1 = prevStage: let persistent = self: super: with prevStage; { - cmake = super.cmake.override { - isBootstrap = true; - useSharedLibraries = false; - }; + cmake = super.cmakeMinimal; python3 = super.python3Minimal; diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 85142090dd4..d9befb9350a 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -27,6 +27,8 @@ with pkgs; cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; }; cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; }; + install-shell-files = callPackage ./install-shell-files {}; + kernel-config = callPackage ./kernel.nix {}; ld-library-path = callPackage ./ld-library-path {}; diff --git a/pkgs/test/install-shell-files/default.nix b/pkgs/test/install-shell-files/default.nix new file mode 100644 index 00000000000..e3729c7d250 --- /dev/null +++ b/pkgs/test/install-shell-files/default.nix @@ -0,0 +1,125 @@ +{ stdenv, runCommandLocal, recurseIntoAttrs, installShellFiles }: + +let + runTest = name: env: buildCommand: + runCommandLocal "install-shell-files--${name}" ({ + nativeBuildInputs = [ installShellFiles ]; + meta.platforms = stdenv.lib.platforms.all; + } // env) buildCommand; +in + +recurseIntoAttrs { + # installManPage + + install-manpage = runTest "install-manpage" {} '' + mkdir -p doc + echo foo > doc/foo.1 + echo bar > doc/bar.2.gz + echo baz > doc/baz.3 + + installManPage doc/* + + cmp doc/foo.1 $out/share/man/man1/foo.1 + cmp doc/bar.2.gz $out/share/man/man2/bar.2.gz + cmp doc/baz.3 $out/share/man/man3/baz.3 + ''; + install-manpage-outputs = runTest "install-manpage-outputs" { + outputs = [ "out" "man" "devman" ]; + } '' + mkdir -p doc + echo foo > doc/foo.1 + echo bar > doc/bar.3 + + installManPage doc/* + + # assert they didn't go into $out + [[ ! -f $out/share/man/man1/foo.1 && ! -f $out/share/man/man3/bar.3 ]] + + # foo.1 alone went into man + cmp doc/foo.1 ''${!outputMan:?}/share/man/man1/foo.1 + [[ ! -f ''${!outputMan:?}/share/man/man3/bar.3 ]] + + # bar.3 alone went into devman + cmp doc/bar.3 ''${!outputDevman:?}/share/man/man3/bar.3 + [[ ! -f ''${!outputDevman:?}/share/man/man1/foo.1 ]] + + touch $out + ''; + + # installShellCompletion + + install-completion = runTest "install-completion" {} '' + echo foo > foo + echo bar > bar + echo baz > baz + echo qux > qux.zsh + echo quux > quux + + installShellCompletion --bash foo bar --zsh baz qux.zsh --fish quux + + cmp foo $out/share/bash-completion/completions/foo + cmp bar $out/share/bash-completion/completions/bar + cmp baz $out/share/zsh/site-functions/_baz + cmp qux.zsh $out/share/zsh/site-functions/_qux + cmp quux $out/share/fish/vendor_completions.d/quux + ''; + install-completion-output = runTest "install-completion-output" { + outputs = [ "out" "bin" ]; + } '' + echo foo > foo + + installShellCompletion --bash foo + + # assert it didn't go into $out + [[ ! -f $out/share/bash-completion/completions/foo ]] + + cmp foo ''${!outputBin:?}/share/bash-completion/completions/foo + + touch $out + ''; + install-completion-name = runTest "install-completion-name" {} '' + echo foo > foo + echo bar > bar + echo baz > baz + + installShellCompletion --bash --name foobar.bash foo --zsh --name _foobar bar --fish baz + + cmp foo $out/share/bash-completion/completions/foobar.bash + cmp bar $out/share/zsh/site-functions/_foobar + cmp baz $out/share/fish/vendor_completions.d/baz + ''; + install-completion-inference = runTest "install-completion-inference" {} '' + echo foo > foo.bash + echo bar > bar.zsh + echo baz > baz.fish + + installShellCompletion foo.bash bar.zsh baz.fish + + cmp foo.bash $out/share/bash-completion/completions/foo.bash + cmp bar.zsh $out/share/zsh/site-functions/_bar + cmp baz.fish $out/share/fish/vendor_completions.d/baz.fish + ''; + install-completion-cmd = runTest "install-completion-cmd" {} '' + echo foo > foo.bash + echo bar > bar.zsh + echo baz > baz.fish + echo qux > qux.fish + + installShellCompletion --cmd foobar --bash foo.bash --zsh bar.zsh --fish baz.fish --name qux qux.fish + + cmp foo.bash $out/share/bash-completion/completions/foobar.bash + cmp bar.zsh $out/share/zsh/site-functions/_foobar + cmp baz.fish $out/share/fish/vendor_completions.d/foobar.fish + cmp qux.fish $out/share/fish/vendor_completions.d/qux + ''; + install-completion-fifo = runTest "install-completion-fifo" {} '' + installShellCompletion \ + --bash --name foo.bash <(echo foo) \ + --zsh --name _foo <(echo bar) \ + --fish --name foo.fish <(echo baz) + + [[ $(<$out/share/bash-completion/completions/foo.bash) == foo ]] || { echo "foo.bash comparison failed"; exit 1; } + [[ $(<$out/share/zsh/site-functions/_foo) == bar ]] || { echo "_foo comparison failed"; exit 1; } + [[ $(<$out/share/fish/vendor_completions.d/foo.fish) == baz ]] || { echo "foo.fish comparison failed"; exit 1; } + ''; +} diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index bf20e0119ec..fd4872cf844 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "brotli"; - version = "1.0.7"; + version = "1.0.9"; src = fetchFromGitHub { owner = "google"; repo = "brotli"; rev = "v" + version; - sha256 = "1811b55wdfg4kbsjcgh1kc938g118jpvif97ilgrmbls25dfpvvw"; + sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c="; }; nativeBuildInputs = [ cmake ]; @@ -32,7 +32,14 @@ stdenv.mkDerivation rec { # This breaks on Darwin because our cmake hook tries to make a build folder # and the wonderful bazel BUILD file is already there (yay case-insensitivity?) - prePatch = "rm BUILD"; + prePatch = '' + rm BUILD + + # Upstream fixed this reference to runtime-path after the release + # and with this references g++ complains about invalid option -R + sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in + cat scripts/libbrotli*.pc.in + ''; # Don't bother with "man" output for now, # it currently only makes the manpages hard to use. diff --git a/pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch b/pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch deleted file mode 100644 index ae1a02d4d20..00000000000 --- a/pkgs/tools/misc/coreutils/avoid-false-positive-in-date-debug-test.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0251229bfd9617e8a35cf9dd7d338d63fff74a0c Mon Sep 17 00:00:00 2001 -From: Assaf Gordon -Date: Mon, 13 May 2019 16:37:40 -0600 -Subject: [PATCH] tests: avoid false-positive in date-debug test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When debugging an invalid date due to DST switching, the intermediate -'normalized time' should not be checked - its value can differ between -systems (e.g. glibc vs musl). - -Reported by Niklas Hambüchen in -https://lists.gnu.org/r/coreutils/2019-05/msg00031.html -Analyzed by Rich Felker in -https://lists.gnu.org/r/coreutils/2019-05/msg00039.html - -* tests/misc/date-debug.sh: Replace the exact normalized time -with 'XX:XX:XX' so different values would not trigger test failure. ---- - tests/misc/date-debug.sh | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh -index aa47f1abb..2ce6f4ce8 100755 ---- a/tests/misc/date-debug.sh -+++ b/tests/misc/date-debug.sh -@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string - date: using specified time as starting value: '02:30:00' - date: error: invalid date/time value: - date: user provided time: '(Y-M-D) 2006-04-02 02:30:00' --date: normalized time: '(Y-M-D) 2006-04-02 03:30:00' -+date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX' - date: -- - date: possible reasons: - date: non-existing due to daylight-saving time; -@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00' - EOF - - # date should return 1 (error) for invalid date --returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1 -+returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1 -+ -+# The output line of "normalized time" can differ between systems -+# (e.g. glibc vs musl) and should not be checked. -+# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html -+sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \ -+ out2-t > out2 || framework_failure_ -+ - compare exp2 out2 || fail=1 - - ## diff --git a/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch b/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch deleted file mode 100644 index 97d95d1c5b1..00000000000 --- a/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 3bd82a82cf4ba693d2c31c7b95aaec4e56dc92a4 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Mon, 11 Mar 2019 16:40:29 -0700 -Subject: [PATCH 1/1] strtod: fix clash with strtold - -Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). -* lib/strtod.c (compute_minus_zero, minus_zero): -Simplify by remving the macro / external variable, -and having just a function. User changed. This avoids -the need for an external variable that might clash. ---- - ChangeLog | 9 +++++++++ - lib/strtod.c | 11 +++++------ - 2 files changed, 14 insertions(+), 6 deletions(-) - -diff --git a/lib/strtod.c b/lib/strtod.c -index b9eaa51..69b1564 100644 ---- a/lib/strtod.c -+++ b/lib/strtod.c -@@ -294,16 +294,15 @@ parse_number (const char *nptr, - ICC 10.0 has a bug when optimizing the expression -zero. - The expression -MIN * MIN does not work when cross-compiling - to PowerPC on Mac OS X 10.5. */ --#if defined __hpux || defined __sgi || defined __ICC - static DOUBLE --compute_minus_zero (void) -+minus_zero (void) - { -+#if defined __hpux || defined __sgi || defined __ICC - return -MIN * MIN; --} --# define minus_zero compute_minus_zero () - #else --DOUBLE minus_zero = -0.0; -+ return -0.0; - #endif -+} - - /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the - character after the last one used in the number is put in *ENDPTR. */ -@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr) - /* Special case -0.0, since at least ICC miscompiles negation. We - can't use copysign(), as that drags in -lm on some platforms. */ - if (!num && negative) -- return minus_zero; -+ return minus_zero (); - return negative ? -num : num; - } --- -1.9.1 - diff --git a/pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch b/pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch deleted file mode 100644 index 02b0b85db31..00000000000 --- a/pkgs/tools/misc/coreutils/coreutils-8.31-musl-cross.patch +++ /dev/null @@ -1,1153 +0,0 @@ -From 453ff940449bbbde9ec00f0bbf82a359c5598fc7 Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Sat, 23 Mar 2019 23:00:52 +0100 -Subject: [PATCH 1/1] Support cross-compilation to musl libc. - -Reported by Necktwi Ozfguah . - -* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for -musl libc. -* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise. -* m4/chown.m4 (gl_FUNC_CHOWN): Likewise. -* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise. -* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. -* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise. -* m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise. -* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. -* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. -* m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. -* m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise. -* m4/getline.m4 (gl_FUNC_GETLINE): Likewise. -* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise. -* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise. // removed -* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise. // removed -* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise. // removed -* m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise. // removed -* m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise. -* m4/log.m4 (gl_FUNC_LOG): Likewise. // removed -* m4/logf.m4 (gl_FUNC_LOGF): Likewise. // removed -* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise. // removed -* m4/log10.m4 (gl_FUNC_LOG10): Likewise. // removed -* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise. // removed -* m4/log10l.m4 (gl_FUNC_LOG10L): Likewise. // removed -* m4/log1p.m4 (gl_FUNC_LOG1P): Likewise. // removed -* m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise. // removed -* m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise. // removed -* m4/log2.m4 (gl_FUNC_LOG2): Likewise. // removed -* m4/log2f.m4 (gl_FUNC_LOG2F): Likewise. // removed -* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise. -* m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. -* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. -* m4/modf.m4 (gl_FUNC_MODF): Likewise. // removed -* m4/modff.m4 (gl_FUNC_MODFF): Likewise. // removed -* m4/modfl.m4 (gl_FUNC_MODFL): Likewise. // removed -* m4/perror.m4 (gl_FUNC_PERROR): Likewise. -* m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE, -gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A, -gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99, -gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N, -gl_VSNPRINTF_ZEROSIZE_C99): Likewise. -* m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise. // removed -* m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. -* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise. -* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise. // removed -* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise. // removed -* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise. // removed -* m4/rintl.m4 (gl_FUNC_RINTL): Likewise. // removed -* m4/round.m4 (gl_FUNC_ROUND): Likewise. // removed -* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. // removed -* m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise. // removed -* m4/setenv.m4 (gl_FUNC_SETENV): Likewise. -* m4/signbit.m4 (gl_SIGNBIT): Likewise. -* m4/sleep.m4 (gl_FUNC_SLEEP): Likewise. -* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise. -* m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise. -* m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. -* m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise. -* m4/trunc.m4 (gl_FUNC_TRUNC): Likewise. // removed -* m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise. // removed -* m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise. // removed -* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise. -* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise. -* m4/usleep.m4 (gl_FUNC_USLEEP): Likewise. -* m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. -* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise. ---- - m4/calloc.m4 | 4 ++- - m4/canonicalize.m4 | 4 ++- - m4/chown.m4 | 22 +++++++------ - m4/d-ino.m4 | 16 +++++----- - m4/fdopendir.m4 | 12 ++++--- - m4/fnmatch.m4 | 18 ++++++++--- - m4/fpurge.m4 | 24 +++++++++----- - m4/getcwd-abort-bug.m4 | 11 +++++-- - m4/getcwd.m4 | 4 ++- - m4/getdelim.m4 | 40 ++++++++++++++---------- - m4/getgroups.m4 | 6 +++- - m4/getline.m4 | 38 +++++++++++++--------- - m4/gettimeofday.m4 | 4 ++- - m4/link-follow.m4 | 4 ++- - m4/malloc.m4 | 4 +-- - m4/mkdir.m4 | 4 ++- - m4/mkstemp.m4 | 4 ++- - m4/perror.m4 | 12 ++++--- - m4/printf.m4 | 22 ++++++++++++- - m4/putenv.m4 | 4 ++- - m4/realloc.m4 | 4 +-- - m4/setenv.m4 | 4 ++- - m4/signbit.m4 | 6 +++- - m4/sleep.m4 | 4 ++- - m4/stpncpy.m4 | 14 +++++++-- - m4/strerror.m4 | 6 +++- - m4/strtod.m4 | 10 +++--- - m4/strtold.m4 | 9 ++++-- - m4/tzset.m4 | 4 ++- - m4/ungetc.m4 | 18 ++++++----- - m4/usleep.m4 | 4 ++- - m4/utimes.m4 | 10 +++--- - m4/wcwidth.m4 | 12 ++++--- - 76 files changed, 461 insertions(+), 157 deletions(-) - -diff --git a/m4/calloc.m4 b/m4/calloc.m4 -index 012a5bf..d76535d 100644 ---- a/m4/calloc.m4 -+++ b/m4/calloc.m4 -@@ -1,4 +1,4 @@ --# calloc.m4 serial 18 -+# calloc.m4 serial 19 - - # Copyright (C) 2004-2019 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation -@@ -40,6 +40,8 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; - # Guess yes on native Windows. - mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; - # If we don't know, assume the worst. -diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 -index 5b6e25d..b61747b 100644 ---- a/m4/canonicalize.m4 -+++ b/m4/canonicalize.m4 -@@ -1,4 +1,4 @@ --# canonicalize.m4 serial 29 -+# canonicalize.m4 serial 30 - - dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc. - -@@ -113,6 +113,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_realpath_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_realpath_works="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/chown.m4 b/m4/chown.m4 -index ecfc0c0..b798325 100644 ---- a/m4/chown.m4 -+++ b/m4/chown.m4 -@@ -1,4 +1,4 @@ --# serial 30 -+# serial 32 - # Determine whether we need the chown wrapper. - - dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2019 Free Software -@@ -109,10 +109,12 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN], - [gl_cv_func_chown_slash_works=yes], - [gl_cv_func_chown_slash_works=no], - [case "$host_os" in -- # Guess yes on glibc systems. -- *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;; -- # If we don't know, assume the worst. -- *) gl_cv_func_chown_slash_works="guessing no" ;; -+ # Guess yes on glibc systems. -+ *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_func_chown_slash_works="guessing no" ;; - esac - ]) - rm -f conftest.link conftest.file]) -@@ -145,10 +147,12 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN], - [gl_cv_func_chown_ctime_works=yes], - [gl_cv_func_chown_ctime_works=no], - [case "$host_os" in -- # Guess yes on glibc systems. -- *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;; -- # If we don't know, assume the worst. -- *) gl_cv_func_chown_ctime_works="guessing no" ;; -+ # Guess yes on glibc systems. -+ *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_func_chown_ctime_works="guessing no" ;; - esac - ]) - rm -f conftest.file]) -diff --git a/m4/d-ino.m4 b/m4/d-ino.m4 -index f1420cc..87dcacc 100644 ---- a/m4/d-ino.m4 -+++ b/m4/d-ino.m4 -@@ -1,4 +1,4 @@ --# serial 18 -+# serial 19 - - dnl From Jim Meyering. - dnl -@@ -40,12 +40,14 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], - [gl_cv_struct_dirent_d_ino=yes], - [gl_cv_struct_dirent_d_ino=no], - [case "$host_os" in -- # Guess yes on glibc systems with Linux kernel. -- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; -- # Guess no on native Windows. -- mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; -- # If we don't know, assume the worst. -- *) gl_cv_struct_dirent_d_ino="guessing no" ;; -+ # Guess yes on glibc systems with Linux kernel. -+ linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; -+ # Guess yes on musl systems with Linux kernel. -+ linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;; -+ # Guess no on native Windows. -+ mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_struct_dirent_d_ino="guessing no" ;; - esac - ])]) - case "$gl_cv_struct_dirent_d_ino" in -diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 -index 0490551..b2b3b03 100644 ---- a/m4/fdopendir.m4 -+++ b/m4/fdopendir.m4 -@@ -1,4 +1,4 @@ --# serial 10 -+# serial 11 - # See if we need to provide fdopendir. - - dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. -@@ -45,10 +45,12 @@ DIR *fdopendir (int); - [gl_cv_func_fdopendir_works=yes], - [gl_cv_func_fdopendir_works=no], - [case "$host_os" in -- # Guess yes on glibc systems. -- *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; -- # If we don't know, assume the worst. -- *) gl_cv_func_fdopendir_works="guessing no" ;; -+ # Guess yes on glibc systems. -+ *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_func_fdopendir_works="guessing no" ;; - esac - ])]) - case "$gl_cv_func_fdopendir_works" in -diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 -index c264ca7..75ba55b 100644 ---- a/m4/fnmatch.m4 -+++ b/m4/fnmatch.m4 -@@ -1,4 +1,4 @@ --# Check for fnmatch - serial 13. -*- coding: utf-8 -*- -+# Check for fnmatch - serial 14. -*- coding: utf-8 -*- - - # Copyright (C) 2000-2007, 2009-2019 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation -@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], - m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) - - AC_REQUIRE([gl_FNMATCH_H]) -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' - ` -@@ -117,12 +118,19 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], - ]])], - [eval "$gl_fnmatch_cache_var=yes"], - [eval "$gl_fnmatch_cache_var=no"], -- [eval "$gl_fnmatch_cache_var=\"guessing no\""]) -+ [case "$host_os" in -+ # Guess yes on musl systems. -+ *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;; -+ # Guess no otherwise, even on glibc systems. -+ *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;; -+ esac -+ ]) - ]) - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" -- if test "$gl_fnmatch_result" != yes; then -- REPLACE_FNMATCH=1 -- fi -+ case "$gl_fnmatch_result" in -+ *yes) ;; -+ *) REPLACE_FNMATCH=1 ;; -+ esac - fi - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then - gl_REPLACE_FNMATCH_H -diff --git a/m4/fpurge.m4 b/m4/fpurge.m4 -index cb21f56..6c5b3e9 100644 ---- a/m4/fpurge.m4 -+++ b/m4/fpurge.m4 -@@ -1,4 +1,4 @@ --# fpurge.m4 serial 8 -+# fpurge.m4 serial 9 - dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -7,12 +7,13 @@ dnl with or without modifications, as long as this notice is preserved. - AC_DEFUN([gl_FUNC_FPURGE], - [ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS_ONCE([fpurge]) - AC_CHECK_FUNCS_ONCE([__fpurge]) - AC_CHECK_DECLS([fpurge], , , [[#include ]]) - if test "x$ac_cv_func_fpurge" = xyes; then - HAVE_FPURGE=1 -- # Detect BSD bug. Only cygwin 1.7 is known to be immune. -+ # Detect BSD bug. Only cygwin 1.7 and musl are known to be immune. - AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( -@@ -48,11 +49,20 @@ AC_DEFUN([gl_FUNC_FPURGE], - return 13; - return 0; - ])], -- [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no], -- [gl_cv_func_fpurge_works='guessing no'])]) -- if test "x$gl_cv_func_fpurge_works" != xyes; then -- REPLACE_FPURGE=1 -- fi -+ [gl_cv_func_fpurge_works=yes], -+ [gl_cv_func_fpurge_works=no], -+ [case "$host_os" in -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_fpurge_works="guessing yes" ;; -+ # Guess no otherwise. -+ *) gl_cv_func_fpurge_works="guessing no" ;; -+ esac -+ ]) -+ ]) -+ case "$gl_cv_func_fpurge_works" in -+ *yes) ;; -+ *) REPLACE_FPURGE=1 ;; -+ esac - else - HAVE_FPURGE=0 - fi -diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4 -index f0f24a5..7227f08 100644 ---- a/m4/getcwd-abort-bug.m4 -+++ b/m4/getcwd-abort-bug.m4 -@@ -1,4 +1,4 @@ --# serial 9 -+# serial 11 - # Determine whether getcwd aborts when the length of the working directory - # name is unusually large. Any length between 4k and 16k trigger the bug - # when using glibc-2.4.90-9 or older. -@@ -13,6 +13,7 @@ - # gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) - AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], - [ -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_DECLS_ONCE([getcwd]) - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) -@@ -142,7 +143,13 @@ main () - else - gl_cv_func_getcwd_abort_bug=no - fi], -- [gl_cv_func_getcwd_abort_bug=yes]) -+ [case "$host_os" in -+ # Guess no on musl systems. -+ *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;; -+ # Guess yes otherwise, even on glibc systems. -+ *) gl_cv_func_getcwd_abort_bug="guessing yes" -+ esac -+ ]) - ]) - AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) - ]) -diff --git a/m4/getcwd.m4 b/m4/getcwd.m4 -index 4929b51..625171a 100644 ---- a/m4/getcwd.m4 -+++ b/m4/getcwd.m4 -@@ -6,7 +6,7 @@ - # with or without modifications, as long as this notice is preserved. - - # Written by Paul Eggert. --# serial 16 -+# serial 17 - - AC_DEFUN([gl_FUNC_GETCWD_NULL], - [ -@@ -50,6 +50,8 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], - [[case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. -diff --git a/m4/getdelim.m4 b/m4/getdelim.m4 -index bf17c57..e77c379 100644 ---- a/m4/getdelim.m4 -+++ b/m4/getdelim.m4 -@@ -1,4 +1,4 @@ --# getdelim.m4 serial 12 -+# getdelim.m4 serial 13 - - dnl Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc. - dnl -@@ -11,6 +11,7 @@ AC_PREREQ([2.59]) - AC_DEFUN([gl_FUNC_GETDELIM], - [ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Persuade glibc to declare getdelim(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -@@ -21,9 +22,10 @@ AC_DEFUN([gl_FUNC_GETDELIM], - if test $ac_cv_func_getdelim = yes; then - HAVE_GETDELIM=1 - dnl Found it in some library. Verify that it works. -- AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], -- [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+ AC_CACHE_CHECK([for working getdelim function], -+ [gl_cv_func_working_getdelim], -+ [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data -+ AC_RUN_IFELSE([AC_LANG_SOURCE([[ - # include - # include - # include -@@ -53,25 +55,31 @@ AC_DEFUN([gl_FUNC_GETDELIM], - fclose (in); - return 0; - } -- ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. -- , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. -- , dnl We're cross compiling. Assume it works on glibc2 systems. -- [AC_EGREP_CPP([Lucky GNU user], -- [ -+ ]])], -+ [gl_cv_func_working_getdelim=yes], -+ [gl_cv_func_working_getdelim=no], -+ [dnl We're cross compiling. -+ dnl Guess it works on glibc2 systems and musl systems. -+ AC_EGREP_CPP([Lucky GNU user], -+ [ - #include - #ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif - #endif -- ], -- [gl_cv_func_working_getdelim="guessing yes"], -- [gl_cv_func_working_getdelim="guessing no"])] -- )]) -+ ], -+ [gl_cv_func_working_getdelim="guessing yes"], -+ [case "$host_os" in -+ *-musl*) gl_cv_func_working_getdelim="guessing yes" ;; -+ *) gl_cv_func_working_getdelim="guessing no" ;; -+ esac -+ ]) -+ ]) -+ ]) - case "$gl_cv_func_working_getdelim" in -- *no) -- REPLACE_GETDELIM=1 -- ;; -+ *yes) ;; -+ *) REPLACE_GETDELIM=1 ;; - esac - else - HAVE_GETDELIM=0 -diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 -index 2ce986e..c93447b 100644 ---- a/m4/getgroups.m4 -+++ b/m4/getgroups.m4 -@@ -1,4 +1,4 @@ --# serial 21 -+# serial 22 - - dnl From Jim Meyering. - dnl A wrapper around AC_FUNC_GETGROUPS. -@@ -42,6 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS], - [case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) ac_cv_func_getgroups_works="guessing no" ;; - esac -@@ -95,6 +97,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_getgroups_works="guessing no" ;; - esac -diff --git a/m4/getline.m4 b/m4/getline.m4 -index 5b2ead2..32f771c 100644 ---- a/m4/getline.m4 -+++ b/m4/getline.m4 -@@ -1,4 +1,4 @@ --# getline.m4 serial 28 -+# getline.m4 serial 29 - - dnl Copyright (C) 1998-2003, 2005-2007, 2009-2019 Free Software Foundation, - dnl Inc. -@@ -16,6 +16,7 @@ dnl to do with the function we need. - AC_DEFUN([gl_FUNC_GETLINE], - [ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Persuade glibc to declare getline(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -@@ -28,9 +29,10 @@ AC_DEFUN([gl_FUNC_GETLINE], - gl_getline_needs_run_time_check=yes], - [am_cv_func_working_getline=no]) - if test $gl_getline_needs_run_time_check = yes; then -- AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], -- [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+ AC_CACHE_CHECK([for working getline function], -+ [am_cv_func_working_getline], -+ [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data -+ AC_RUN_IFELSE([AC_LANG_SOURCE([[ - # include - # include - # include -@@ -61,21 +63,28 @@ AC_DEFUN([gl_FUNC_GETLINE], - fclose (in); - return 0; - } -- ]])], [am_cv_func_working_getline=yes] dnl The library version works. -- , [am_cv_func_working_getline=no] dnl The library version does NOT work. -- , dnl We're cross compiling. Assume it works on glibc2 systems. -- [AC_EGREP_CPP([Lucky GNU user], -- [ -+ ]])], -+ [am_cv_func_working_getline=yes], -+ [am_cv_func_working_getline=no], -+ [dnl We're cross compiling. -+ dnl Guess it works on glibc2 systems and musl systems. -+ AC_EGREP_CPP([Lucky GNU user], -+ [ - #include - #ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif - #endif -- ], -- [am_cv_func_working_getline="guessing yes"], -- [am_cv_func_working_getline="guessing no"])] -- )]) -+ ], -+ [am_cv_func_working_getline="guessing yes"], -+ [case "$host_os" in -+ *-musl*) am_cv_func_working_getline="guessing yes" ;; -+ *) am_cv_func_working_getline="guessing no" ;; -+ esac -+ ]) -+ ]) -+ ]) - fi - - if test $ac_cv_have_decl_getline = no; then -@@ -83,7 +92,8 @@ AC_DEFUN([gl_FUNC_GETLINE], - fi - - case "$am_cv_func_working_getline" in -- *no) -+ *yes) ;; -+ *) - dnl Set REPLACE_GETLINE always: Even if we have not found the broken - dnl getline function among $LIBS, it may exist in libinet and the - dnl executable may be linked with -linet. -diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 -index d29b4bf..5e2ef6f 100644 ---- a/m4/gettimeofday.m4 -+++ b/m4/gettimeofday.m4 -@@ -1,4 +1,4 @@ --# serial 25 -+# serial 26 - - # Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation -@@ -105,6 +105,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ # Guess all is fine on musl systems. -+ *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/link-follow.m4 b/m4/link-follow.m4 -index cbd2dca..8ac7301 100644 ---- a/m4/link-follow.m4 -+++ b/m4/link-follow.m4 -@@ -1,4 +1,4 @@ --# serial 20 -+# serial 21 - dnl Run a program to determine whether link(2) follows symlinks. - dnl Set LINK_FOLLOWS_SYMLINKS accordingly. - -@@ -88,6 +88,8 @@ AC_DEFUN([gl_FUNC_LINK_FOLLOWS_SYMLINK], - case "$host_os" in - # On glibc/Linux we know the result. - linux*-gnu* | gnu*) gl_cv_func_link_follows_symlink="guessing no" ;; -+ # On musl/Linux we know the result. -+ linux*-musl*) gl_cv_func_link_follows_symlink="guessing no" ;; - # Otherwise, we don't know. - *) gl_cv_func_link_follows_symlink=unknown ;; - esac -diff --git a/m4/malloc.m4 b/m4/malloc.m4 -index b9b8d4b..c469c45 100644 ---- a/m4/malloc.m4 -+++ b/m4/malloc.m4 -@@ -1,4 +1,4 @@ --# malloc.m4 serial 17 -+# malloc.m4 serial 19 - dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF], - [ac_cv_func_malloc_0_nonnull=no], - [case "$host_os" in - # Guess yes on platforms where we know the result. -- *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ -+ *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull="guessing yes" ;; - # If we don't know, assume the worst. -diff --git a/m4/mkdir.m4 b/m4/mkdir.m4 -index 4cd9590..366a3cd 100644 ---- a/m4/mkdir.m4 -+++ b/m4/mkdir.m4 -@@ -1,4 +1,4 @@ --# serial 14 -+# serial 15 - - # Copyright (C) 2001, 2003-2004, 2006, 2008-2019 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation -@@ -62,6 +62,8 @@ AC_DEFUN([gl_FUNC_MKDIR], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 -index ae24c3b..1b15c2e 100644 ---- a/m4/mkstemp.m4 -+++ b/m4/mkstemp.m4 -@@ -1,4 +1,4 @@ --#serial 25 -+#serial 26 - - # Copyright (C) 2001, 2003-2007, 2009-2019 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation -@@ -59,6 +59,8 @@ AC_DEFUN([gl_FUNC_MKSTEMP], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_working_mkstemp="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_working_mkstemp="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/perror.m4 b/m4/perror.m4 -index 335be72..08e2db1 100644 ---- a/m4/perror.m4 -+++ b/m4/perror.m4 -@@ -1,4 +1,4 @@ --# perror.m4 serial 7 -+# perror.m4 serial 8 - dnl Copyright (C) 2008-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -48,10 +48,12 @@ AC_DEFUN([gl_FUNC_PERROR], - rm -rf conftest.txt1 conftest.txt2], - [gl_cv_func_perror_works=no], - [case "$host_os" in -- # Guess yes on native Windows. -- mingw*) gl_cv_func_perror_works="guessing yes" ;; -- # Otherwise guess no. -- *) gl_cv_func_perror_works="guessing no" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_perror_works="guessing yes" ;; -+ # Guess yes on native Windows. -+ mingw*) gl_cv_func_perror_works="guessing yes" ;; -+ # Otherwise guess no. -+ *) gl_cv_func_perror_works="guessing no" ;; - esac - ]) - ]) -diff --git a/m4/printf.m4 b/m4/printf.m4 -index cbf6ae4..6d2280e 100644 ---- a/m4/printf.m4 -+++ b/m4/printf.m4 -@@ -1,4 +1,4 @@ --# printf.m4 serial 60 -+# printf.m4 serial 61 - dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -62,6 +62,8 @@ int main () - changequote(,)dnl - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; -@@ -240,6 +242,8 @@ int main () - changequote(,)dnl - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; -@@ -457,6 +461,8 @@ int main () - changequote(,)dnl - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; -@@ -575,6 +581,8 @@ int main () - [gl_cv_func_printf_directive_a="guessing yes"], - [gl_cv_func_printf_directive_a="guessing no"]) - ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_printf_directive_a="guessing yes";; - # Guess no on Android. - linux*-android*) gl_cv_func_printf_directive_a="guessing no";; - # Guess no on native Windows. -@@ -625,6 +633,8 @@ int main () - changequote(,)dnl - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; -@@ -960,6 +970,8 @@ changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_printf_flag_zero="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_flag_zero="guessing yes";; - # Guess no on Android. -@@ -1206,6 +1218,8 @@ changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; -@@ -1308,6 +1322,8 @@ int main () - changequote(,)dnl - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; -@@ -1400,6 +1416,8 @@ changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; -@@ -1554,6 +1572,8 @@ changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; -diff --git a/m4/putenv.m4 b/m4/putenv.m4 -index f8960f6..342ba26 100644 ---- a/m4/putenv.m4 -+++ b/m4/putenv.m4 -@@ -1,4 +1,4 @@ --# putenv.m4 serial 22 -+# putenv.m4 serial 23 - dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_PUTENV], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_svid_putenv="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_svid_putenv="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/realloc.m4 b/m4/realloc.m4 -index f9f15ad..93066e8 100644 ---- a/m4/realloc.m4 -+++ b/m4/realloc.m4 -@@ -1,4 +1,4 @@ --# realloc.m4 serial 15 -+# realloc.m4 serial 17 - dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF], - [ac_cv_func_realloc_0_nonnull=no], - [case "$host_os" in - # Guess yes on platforms where we know the result. -- *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ -+ *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_realloc_0_nonnull="guessing yes" ;; - # If we don't know, assume the worst. -diff --git a/m4/setenv.m4 b/m4/setenv.m4 -index 6101274..a8f83d6 100644 ---- a/m4/setenv.m4 -+++ b/m4/setenv.m4 -@@ -1,4 +1,4 @@ --# setenv.m4 serial 27 -+# setenv.m4 serial 28 - dnl Copyright (C) 2001-2004, 2006-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -37,6 +37,8 @@ AC_DEFUN([gl_FUNC_SETENV], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_setenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_setenv_works="guessing no" ;; - esac -diff --git a/m4/signbit.m4 b/m4/signbit.m4 -index bf5bce5..f7f2f3d 100644 ---- a/m4/signbit.m4 -+++ b/m4/signbit.m4 -@@ -1,4 +1,4 @@ --# signbit.m4 serial 16 -+# signbit.m4 serial 17 - dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -31,6 +31,8 @@ AC_DEFUN([gl_SIGNBIT], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_signbit="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_signbit="guessing yes" ;; - # If we don't know, assume the worst. -@@ -62,6 +64,8 @@ AC_DEFUN([gl_SIGNBIT], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_signbit_gcc="guessing yes" ;; - # Guess yes on mingw, no on MSVC. - mingw*) if test -n "$GCC"; then - gl_cv_func_signbit_gcc="guessing yes" -diff --git a/m4/sleep.m4 b/m4/sleep.m4 -index 5f71cc7..7bab467 100644 ---- a/m4/sleep.m4 -+++ b/m4/sleep.m4 -@@ -1,4 +1,4 @@ --# sleep.m4 serial 9 -+# sleep.m4 serial 10 - dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -48,6 +48,8 @@ handle_alarm (int sig) - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_sleep_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_sleep_works="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4 -index 83425dd..f8e1a7c 100644 ---- a/m4/stpncpy.m4 -+++ b/m4/stpncpy.m4 -@@ -1,4 +1,4 @@ --# stpncpy.m4 serial 16 -+# stpncpy.m4 serial 17 - dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation -@@ -7,6 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. - - AC_DEFUN([gl_FUNC_STPNCPY], - [ -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles -+ - dnl Persuade glibc to declare stpncpy(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - -@@ -69,12 +71,18 @@ int main () - ]])], - [gl_cv_func_stpncpy=yes], - [gl_cv_func_stpncpy=no], -- [AC_EGREP_CPP([Thanks for using GNU], [ -+ [dnl Guess yes on glibc systems and musl systems. -+ AC_EGREP_CPP([Thanks for using GNU], [ - #include - #ifdef __GNU_LIBRARY__ - Thanks for using GNU - #endif --], [gl_cv_func_stpncpy="guessing yes"], [gl_cv_func_stpncpy="guessing no"]) -+], [gl_cv_func_stpncpy="guessing yes"], -+ [case "$host_os" in -+ *-musl*) gl_cv_func_stpncpy="guessing yes" ;; -+ *) gl_cv_func_stpncpy="guessing no" ;; -+ esac -+ ]) - ]) - ]) - case "$gl_cv_func_stpncpy" in -diff --git a/m4/strerror.m4 b/m4/strerror.m4 -index b452f7f..2c90f31 100644 ---- a/m4/strerror.m4 -+++ b/m4/strerror.m4 -@@ -1,4 +1,4 @@ --# strerror.m4 serial 19 -+# strerror.m4 serial 20 - dnl Copyright (C) 2002, 2007-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -26,6 +26,8 @@ AC_DEFUN([gl_FUNC_STRERROR], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; - esac -@@ -80,6 +82,8 @@ AC_DEFUN([gl_FUNC_STRERROR_0], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. -diff --git a/m4/strtod.m4 b/m4/strtod.m4 -index 9912217..d68ab75 100644 ---- a/m4/strtod.m4 -+++ b/m4/strtod.m4 -@@ -1,4 +1,4 @@ --# strtod.m4 serial 24 -+# strtod.m4 serial 25 - dnl Copyright (C) 2002-2003, 2006-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -115,9 +115,11 @@ numeric_equal (double x, double y) - ], - [gl_cv_func_strtod_works="guessing yes"], - [case "$host_os" in -- # Guess yes on native Windows. -- mingw*) gl_cv_func_strtod_works="guessing yes" ;; -- *) gl_cv_func_strtod_works="guessing no" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_strtod_works="guessing yes" ;; -+ # Guess yes on native Windows. -+ mingw*) gl_cv_func_strtod_works="guessing yes" ;; -+ *) gl_cv_func_strtod_works="guessing no" ;; - esac - ]) - ]) -diff --git a/m4/strtold.m4 b/m4/strtold.m4 -index 16b4eda..17125fe 100644 ---- a/m4/strtold.m4 -+++ b/m4/strtold.m4 -@@ -1,4 +1,4 @@ --# strtold.m4 serial 2 -+# strtold.m4 serial 4 - dnl Copyright (C) 2002-2003, 2006-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -98,7 +98,12 @@ numeric_equal (long double x, long double y) - #endif - ], - [gl_cv_func_strtold_works="guessing yes"], -- [gl_cv_func_strtod_works="guessing no"]) -+ [case "$host_os" in -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_strtold_works="guessing yes" ;; -+ *) gl_cv_func_strtold_works="guessing no" ;; -+ esac -+ ]) - ]) - ]) - case "$gl_cv_func_strtold_works" in -diff --git a/m4/tzset.m4 b/m4/tzset.m4 -index 1278801..afdfa8e 100644 ---- a/m4/tzset.m4 -+++ b/m4/tzset.m4 -@@ -1,4 +1,4 @@ --# serial 11 -+# serial 12 - - # Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation -@@ -70,6 +70,8 @@ main () - [case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;; -+ # Guess all is fine on musl systems. -+ *-musl*) gl_cv_func_tzset_clobber="guessing no" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_tzset_clobber="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/ungetc.m4 b/m4/ungetc.m4 -index ab8757b..08baf33 100644 ---- a/m4/ungetc.m4 -+++ b/m4/ungetc.m4 -@@ -1,4 +1,4 @@ --# ungetc.m4 serial 6 -+# ungetc.m4 serial 7 - dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -41,12 +41,16 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], - remove ("conftest.tmp");])], - [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], - [case "$host_os" in -- # Guess yes on glibc and bionic systems. -- *-gnu* | gnu* | *-android*) gl_cv_func_ungetc_works="guessing yes" ;; -- # Guess yes on native Windows. -- mingw*) gl_cv_func_ungetc_works="guessing yes" ;; -- # If we don't know, assume the worst. -- *) gl_cv_func_ungetc_works="guessing no" ;; -+ # Guess yes on glibc systems. -+ *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_ungetc_works="guessing yes" ;; -+ # Guess yes on bionic systems. -+ *-android*) gl_cv_func_ungetc_works="guessing yes" ;; -+ # Guess yes on native Windows. -+ mingw*) gl_cv_func_ungetc_works="guessing yes" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_func_ungetc_works="guessing no" ;; - esac - ]) - ]) -diff --git a/m4/usleep.m4 b/m4/usleep.m4 -index 59605a8..4a6bff0 100644 ---- a/m4/usleep.m4 -+++ b/m4/usleep.m4 -@@ -1,4 +1,4 @@ --# usleep.m4 serial 5 -+# usleep.m4 serial 6 - dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -31,6 +31,8 @@ AC_DEFUN([gl_FUNC_USLEEP], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_usleep_works="guessing yes" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_usleep_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_usleep_works="guessing no" ;; - # If we don't know, assume the worst. -diff --git a/m4/utimes.m4 b/m4/utimes.m4 -index 7209b6d..5806d8f 100644 ---- a/m4/utimes.m4 -+++ b/m4/utimes.m4 -@@ -1,5 +1,5 @@ - # Detect some bugs in glibc's implementation of utimes. --# serial 5 -+# serial 6 - - dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation -@@ -143,9 +143,11 @@ main () - [gl_cv_func_working_utimes=yes], - [gl_cv_func_working_utimes=no], - [case "$host_os" in -- # Guess no on native Windows. -- mingw*) gl_cv_func_working_utimes="guessing no" ;; -- *) gl_cv_func_working_utimes="guessing no" ;; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_working_utimes="guessing yes" ;; -+ # Guess no on native Windows. -+ mingw*) gl_cv_func_working_utimes="guessing no" ;; -+ *) gl_cv_func_working_utimes="guessing no" ;; - esac - ]) - ]) -diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4 -index baa2002..3952fd2 100644 ---- a/m4/wcwidth.m4 -+++ b/m4/wcwidth.m4 -@@ -1,4 +1,4 @@ --# wcwidth.m4 serial 27 -+# wcwidth.m4 serial 28 - dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -98,9 +98,13 @@ int main () - [ - changequote(,)dnl - case "$host_os" in -- # Guess yes on glibc and AIX 7 systems. -- *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; -- *) gl_cv_func_wcwidth_works="guessing no";; -+ # Guess yes on glibc systems. -+ *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";; -+ # Guess yes on musl systems. -+ *-musl*) gl_cv_func_wcwidth_works="guessing yes";; -+ # Guess yes on AIX 7 systems. -+ aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; -+ *) gl_cv_func_wcwidth_works="guessing no";; - esac - changequote([,])dnl - ]) --- -1.9.1 - - diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index e7162673a78..e3e2e167e33 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -22,21 +22,16 @@ with lib; stdenv.mkDerivation (rec { pname = "coreutils"; - version = "8.31"; + version = "8.32"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz"; + sha256 = "sha256-RFjY3nhJ30TMqxXhaxVIsoUiTbul8I+sBwwcDgvMTPo="; }; patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch - # included on coreutils master; TODO: apply unconditionally, I guess - ++ optional stdenv.hostPlatform.isAarch64 ./sys-getdents-undeclared.patch - ++ optional stdenv.hostPlatform.isMusl ./avoid-false-positive-in-date-debug-test.patch - # Fix compilation in musl-cross environments. To be removed in coreutils-8.32. - ++ optional stdenv.hostPlatform.isMusl ./coreutils-8.31-musl-cross.patch - # Fix compilation in android-cross environments. To be removed in coreutils-8.32. - ++ [ ./coreutils-8.31-android-cross.patch ]; + # included on coreutils master; TODO: apply unconditionally, I guess + ++ optional stdenv.hostPlatform.isAarch64 ./sys-getdents-undeclared.patch; postPatch = '' # The test tends to fail on btrfs,f2fs and maybe other unusual filesystems. diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 8e151bc2ead..c466a48434f 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -34,14 +34,14 @@ assert gssSupport -> libkrb5 != null; stdenv.mkDerivation rec { pname = "curl"; - version = "7.72.0"; + version = "7.73.0"; src = fetchurl { urls = [ "https://curl.haxx.se/download/${pname}-${version}.tar.bz2" "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2" ]; - sha256 = "1vq3ay87vayfrv67l7s7h79nm7gwdqhidki0brv5jahhch49g4dd"; + sha256 = "sha256-zzT+Cwe4APHAGkmabosq9Uj20OBE3KSinYikvuFG0TE="; }; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 9b33d53e54f..d2fa0deca00 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "unbound"; - version = "1.11.0"; + version = "1.12.0"; src = fetchurl { url = "https://unbound.net/downloads/${pname}-${version}.tar.gz"; - sha256 = "1xqywn2qdmjjq0csrqxh9p2rnizdrr1f99zdx87z7f3fyyc0fbwz"; + sha256 = "0daqxzvknvcz7sgag3wcrxhp4a39ik93lsrfpwcl9whjg2lm74jv"; }; outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e53a98e0aa9..12b0bc0a578 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8346,9 +8346,7 @@ in zssh = callPackage ../tools/networking/zssh { }; zstd = callPackage ../tools/compression/zstd { - cmake = buildPackages.cmake.override { - libarchive = buildPackages.libarchive.override { zstd = null; }; - }; + cmake = buildPackages.cmakeMinimal; }; zsync = callPackage ../tools/compression/zsync { }; @@ -9676,15 +9674,15 @@ in inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10; }; - rust_1_46 = callPackage ../development/compilers/rust/1_46.nix { + rust_1_47 = callPackage ../development/compilers/rust/1_47.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; - llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10; + llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_11; }; - rust = rust_1_46; + rust = rust_1_47; rustPackages_1_45 = rust_1_45.packages.stable; - rustPackages_1_46 = rust_1_46.packages.stable; - rustPackages = rustPackages_1_46; + rustPackages_1_47 = rust_1_47.packages.stable; + rustPackages = rustPackages_1_47; inherit (rustPackages) cargo clippy rustc rustPlatform; @@ -10860,6 +10858,10 @@ in cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { }; + cmakeMinimal = libsForQt5.callPackage ../development/tools/build-managers/cmake { + isBootstrap = true; + }; + cmakeCurses = cmake.override { useNcurses = true; }; cmakeWithGui = cmakeCurses.override { withQt5 = true; }; @@ -18290,7 +18292,7 @@ in # udev is the same package as systemd which depends on cryptsetup # which depends on lvm2 again. But we only need the libudev part # which does not depend on cryptsetup. - udev = udev.override { cryptsetup = null; }; + udev = systemdMinimal; }; lvm2_dmeventd = callPackage ../os-specific/linux/lvm2 { enableDmeventd = true; @@ -18641,8 +18643,23 @@ in bzip2 = null; }; }; + systemdMinimal = systemd.override { + pname = "systemd-minimal"; + withResolved = false; + withLogind = false; + withHostnamed = false; + withLocaled = false; + withTimedated = false; + withHwdb = false; + withEfi = false; + withImportd = false; + withCryptsetup = false; + cryptsetup = null; + lvm2 = null; + }; + - udev = systemd; # TODO: move to aliases.nix + udev = systemd; # TODO: change to systemdMinimal systemd-wait = callPackage ../os-specific/linux/systemd-wait { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 945f55adc70..0961e3c264d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4828,7 +4828,7 @@ in { pybullet = callPackage ../development/python-modules/pybullet { }; - pycairo = callPackage ../development/python-modules/pycairo { inherit (pkgs) meson pkgconfig; }; + pycairo = callPackage ../development/python-modules/pycairo { inherit (pkgs) meson pkg-config; }; pycallgraph = callPackage ../development/python-modules/pycallgraph { }; -- cgit 1.4.1 From 7673eda11d59309e1b9051252e44caffc98c8052 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Sat, 7 Nov 2020 17:50:17 +0800 Subject: haskell: Add documentationTarball to lib --- pkgs/development/haskell-modules/lib.nix | 25 ++++++++++++++++++++++ pkgs/test/default.nix | 1 + pkgs/test/haskell-documentationTarball/default.nix | 17 +++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 pkgs/test/haskell-documentationTarball/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index 4d0954a5d7a..6bcc563164e 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -235,6 +235,31 @@ rec { fixupPhase = ":"; }); + /* Create a documentation tarball suitable for uploading to Hackage instead + of building the package. + */ + documentationTarball = pkg: + pkgs.lib.overrideDerivation pkg (drv: { + name = "${drv.name}-docs"; + # Like sdistTarball, disable the "doc" output here. + outputs = [ "out" ]; + buildPhase = '' + runHook preHaddock + ./Setup haddock --for-hackage + runHook postHaddock + ''; + haddockPhase = ":"; + checkPhase = ":"; + installPhase = '' + runHook preInstall + mkdir -p "$out" + tar --format=ustar \ + -czf "$out/${drv.name}-docs.tar.gz" \ + -C dist/doc/html "${drv.name}-docs" + runHook postInstall + ''; + }); + /* Use the gold linker. It is a linker for ELF that is designed "to run as fast as possible on modern systems" */ diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index d9befb9350a..7ee7d21fd56 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -23,6 +23,7 @@ with pkgs; stdenv-inputs = callPackage ./stdenv-inputs { }; haskell-shellFor = callPackage ./haskell-shellFor { }; + haskell-documentationTarball = callPackage ./haskell-documentationTarball { }; cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; }; cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; }; diff --git a/pkgs/test/haskell-documentationTarball/default.nix b/pkgs/test/haskell-documentationTarball/default.nix new file mode 100644 index 00000000000..aec3dc41f26 --- /dev/null +++ b/pkgs/test/haskell-documentationTarball/default.nix @@ -0,0 +1,17 @@ +{ pkgs, haskellPackages }: + +let + drv = haskellPackages.vector; + docs = pkgs.haskell.lib.documentationTarball drv; + +in pkgs.runCommand "test haskell.lib.documentationTarball" { } '' + tar xvzf "${docs}/${drv.name}-docs.tar.gz" + + # Check for Haddock html + find "${drv.name}-docs" | grep -q "Data-Vector.html" + + # Check for source html + find "${drv.name}-docs" | grep -q "src/Data.Vector.html" + + touch "$out" +'' -- cgit 1.4.1 From 5d2a20c93aeb45dd6de3cbc522692499ff161c34 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 29 Nov 2020 16:23:00 +0000 Subject: buildRustCrateTests: Move to tests.buildRustCrate I think it is preferable to separate the tests from the "real" packages. --- pkgs/test/default.nix | 1 + pkgs/top-level/all-packages.nix | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/test/default.nix') diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 8746f065b1b..f45e981cff0 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -39,6 +39,7 @@ with pkgs; cross = callPackage ./cross {}; rustCustomSysroot = callPackage ./rust-sysroot {}; + buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { }; nixos-functions = callPackage ./nixos-functions {}; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3937ae566e6..5c464236602 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10071,7 +10071,6 @@ in buildRustCrate = callPackage ../build-support/rust/build-rust-crate { }; buildRustCrateHelpers = callPackage ../build-support/rust/build-rust-crate/helpers.nix { }; - buildRustCrateTests = recurseIntoAttrs (callPackage ../build-support/rust/build-rust-crate/test { }); cratesIO = callPackage ../build-support/rust/crates-io.nix { }; cargo-web = callPackage ../development/tools/cargo-web { -- cgit 1.4.1 From 23f815f12c6cd3850f0df3723372e7fe9aea804b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 9 Mar 2021 13:04:03 -0500 Subject: tests.cuda.cuda-sample_*: Init at supported CUDA toolkit versions Since CUDA is unfree, we won't actually use this when testing Nixpkgs officially. But I want to include this as they are useful for users of Nixpkgs trying to set up / debug a CUDA environment. --- pkgs/test/cuda/cuda-samples/default.nix | 52 +++++++++++++++++++++++++++++++++ pkgs/test/cuda/cuda-samples/generic.nix | 51 ++++++++++++++++++++++++++++++++ pkgs/test/cuda/default.nix | 16 ++++++++++ pkgs/test/default.nix | 2 ++ 4 files changed, 121 insertions(+) create mode 100644 pkgs/test/cuda/cuda-samples/default.nix create mode 100644 pkgs/test/cuda/cuda-samples/generic.nix create mode 100644 pkgs/test/cuda/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/test/cuda/cuda-samples/default.nix b/pkgs/test/cuda/cuda-samples/default.nix new file mode 100644 index 00000000000..46d4d531690 --- /dev/null +++ b/pkgs/test/cuda/cuda-samples/default.nix @@ -0,0 +1,52 @@ +{ callPackage +, cudatoolkit_9_2 +, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2 +, cudatoolkit_11_0, cudatoolkit_11_1, cudatoolkit_11_2 +}: + +rec { + cuda-samples_cudatoolkit_9_2 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_9_2; + sha256 = "1ydankhyigcg99h0rqnmz1z4vc0sl6p9s1s0hbdxh5l1sx9141j6"; + }; + + cuda-samples_cudatoolkit_9 = cuda-samples_cudatoolkit_9_2; + + ## + + cuda-samples_cudatoolkit_10_0 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_10_0; + sha256 = "1zvh4xsdyc59m87brpcmssxsjlp9dkynh4asnkcmc3g94f53l0jw"; + }; + + cuda-samples_cudatoolkit_10_1 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_10_1; + sha256 = "1s8ka0hznrni36ajhzf2gqpdrl8kd8fi047qijxks5l2abc093qd"; + }; + + cuda-samples_cudatoolkit_10_2 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_10_2; + sha256 = "01p1innzgh9siacpld6nsqimj8jkg93rk4gj8q4crn62pa5vhd94"; + }; + + cuda-samples_cudatoolkit_10 = cuda-samples_cudatoolkit_10_2; + + ## + + cuda-samples_cudatoolkit_11_0 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_11_0; + sha256 = "1n3vjc8c7zdig2xgl5fppavrphqzhdiv9m9nk6smh4f99fwi0705"; + }; + + cuda-samples_cudatoolkit_11_1 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_11_1; + sha256 = "1kjixk50i8y1bkiwbdn5lkv342crvkmbvy1xl5j3lsa1ica21kwh"; + }; + + cuda-samples_cudatoolkit_11_2 = callPackage ./generic.nix { + cudatoolkit = cudatoolkit_11_2; + sha256 = "1p1qjvfbm28l933mmnln02rqrf0cy9kbpsyb488d1haiqzvrazl1"; + }; + + cuda-samples_cudatoolkit_11 = cuda-samples_cudatoolkit_11_2; +} diff --git a/pkgs/test/cuda/cuda-samples/generic.nix b/pkgs/test/cuda/cuda-samples/generic.nix new file mode 100644 index 00000000000..a104f88ad4b --- /dev/null +++ b/pkgs/test/cuda/cuda-samples/generic.nix @@ -0,0 +1,51 @@ +{ lib, stdenv, fetchFromGitHub +, pkg-config, addOpenGLRunpath +, sha256, cudatoolkit +}: + +let + pname = "cuda-samples"; + version = lib.versions.majorMinor cudatoolkit.version; +in + +stdenv.mkDerivation { + inherit pname version; + + src = fetchFromGitHub { + owner = "NVIDIA"; + repo = pname; + rev = "v${version}"; + inherit sha256; + }; + + nativeBuildInputs = [ pkg-config addOpenGLRunpath ]; + + buildInputs = [ cudatoolkit ]; + + enableParallelBuilding = true; + + preConfigure = '' + export CUDA_PATH=${cudatoolkit} + ''; + + installPhase = '' + runHook preInstall + + install -Dm755 -t $out/bin bin/${stdenv.hostPlatform.parsed.cpu.name}/${stdenv.hostPlatform.parsed.kernel.name}/release/* + + runHook postInstall + ''; + + postFixup = '' + for exe in $out/bin/*; do + addOpenGLRunpath $exe + done + ''; + + meta = { + description = "Samples for CUDA Developers which demonstrates features in CUDA Toolkit"; + # CUDA itself is proprietary, but these sample apps are not. + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ obsidian-systems-maintainence ]; + }; +} diff --git a/pkgs/test/cuda/default.nix b/pkgs/test/cuda/default.nix new file mode 100644 index 00000000000..a3b0f8a66d1 --- /dev/null +++ b/pkgs/test/cuda/default.nix @@ -0,0 +1,16 @@ +{ callPackage }: + +rec { + cuda-samplesPackages = callPackage ./cuda-samples { }; + inherit (cuda-samplesPackages) + cuda-samples_cudatoolkit_9 + cuda-samples_cudatoolkit_9_2 + cuda-samples_cudatoolkit_10 + cuda-samples_cudatoolkit_10_0 + cuda-samples_cudatoolkit_10_1 + cuda-samples_cudatoolkit_10_2 + cuda-samples_cudatoolkit_11 + cuda-samples_cudatoolkit_11_0 + cuda-samples_cudatoolkit_11_1 + cuda-samples_cudatoolkit_11_2; +} diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index f45e981cff0..fa93ceb0721 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -47,5 +47,7 @@ with pkgs; texlive = callPackage ./texlive {}; + cuda = callPackage ./cuda { }; + writers = callPackage ../build-support/writers/test.nix {}; } -- cgit 1.4.1 From b3abdc9534a675da2aa7631d505a5f71ef30ecfa Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Wed, 21 Apr 2021 12:55:05 +0200 Subject: tests.vim: init (moved from vim-utils.nix) (#119467) * tests.vim: init (moved from vim-utils.nix) Moved tests from pkgs/misc/vim-plugins/vim-utils.nix to pkgs/test/vim. Also reduced the amount of generated config: - Make it possible to have an empty config when configured adequately - removed default vim config when using native packages, it could be source of bugs see linked issues (syntax on overrides vim highlights) Things to watch out for: - if you set configure.beforePlugins yourself, you will need to add set nocompatible too not to lose it - filetype indent plugin on | syn on is not enabled anymore by default for the vim-plug installer: I dont think we should override vim defualts, at least not here since it is shared with neovim. Also sometimes it's enabled before plugins (pathogen etc,) which is not consistent. you can run the tests via $ nix-build -A tests.vim --- pkgs/applications/editors/neovim/wrapper.nix | 1 - pkgs/misc/vim-plugins/vim-utils.nix | 159 ++++++++------------------- pkgs/test/default.nix | 2 + pkgs/test/vim/default.nix | 72 ++++++++++++ 4 files changed, 122 insertions(+), 112 deletions(-) create mode 100644 pkgs/test/vim/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index 41ff62a619f..8b42191bde6 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -1,5 +1,4 @@ { stdenv, symlinkJoin, lib, makeWrapper -, vimUtils , writeText , bundlerEnv, ruby , nodejs diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index fd66c48ecb2..c55e8aa0a01 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, vim, vimPlugins, vim_configurable, neovim, buildEnv, writeText, writeScriptBin +# tests available at pkgs/test/vim +{ lib, stdenv, vim, vimPlugins, vim_configurable, buildEnv, writeText, writeScriptBin , nix-prefetch-hg, nix-prefetch-git , fetchFromGitHub, runtimeShell }: @@ -183,13 +184,49 @@ let rtpPath = "share/vim-plugins"; + nativeImpl = packages: lib.optionalString (packages != null) + (let + link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}"); + packageLinks = (packageName: {start ? [], opt ? []}: + let + # `nativeImpl` expects packages to be derivations, not strings (as + # opposed to older implementations that have to maintain backwards + # compatibility). Therefore we don't need to deal with "knownPlugins" + # and can simply pass `null`. + depsOfOptionalPlugins = lib.subtractLists opt (findDependenciesRecursively opt); + startWithDeps = findDependenciesRecursively start; + in + [ "mkdir -p $out/pack/${packageName}/start" ] + # To avoid confusion, even dependencies of optional plugins are added + # to `start` (except if they are explicitly listed as optional plugins). + ++ (builtins.map (link packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins))) + ++ ["mkdir -p $out/pack/${packageName}/opt"] + ++ (builtins.map (link packageName "opt") opt) + ); + packDir = (packages: + stdenv.mkDerivation { + name = "vim-pack-dir"; + src = ./.; + installPhase = lib.concatStringsSep "\n" (lib.flatten (lib.mapAttrsToList packageLinks packages)); + preferLocalBuild = true; + } + ); + in + '' + set packpath^=${packDir packages} + set runtimepath^=${packDir packages} + ''); + vimrcContent = { packages ? null, vam ? null, pathogen ? null, plug ? null, - beforePlugins ? "", - customRC ? "" + beforePlugins ? '' + " configuration generated by NIX + set nocompatible + '', + customRC ? null }: let @@ -301,56 +338,16 @@ let call vam#Scripts(l, {}) ''); - nativeImpl = lib.optionalString (packages != null) - (let - link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}"); - packageLinks = (packageName: {start ? [], opt ? []}: - let - # `nativeImpl` expects packages to be derivations, not strings (as - # opposed to older implementations that have to maintain backwards - # compatibility). Therefore we don't need to deal with "knownPlugins" - # and can simply pass `null`. - depsOfOptionalPlugins = lib.subtractLists opt (findDependenciesRecursively opt); - startWithDeps = findDependenciesRecursively start; - in - ["mkdir -p $out/pack/${packageName}/start"] - # To avoid confusion, even dependencies of optional plugins are added - # to `start` (except if they are explicitly listed as optional plugins). - ++ (builtins.map (link packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins))) - ++ ["mkdir -p $out/pack/${packageName}/opt"] - ++ (builtins.map (link packageName "opt") opt) - ); - packDir = (packages: - stdenv.mkDerivation { - name = "vim-pack-dir"; - src = ./.; - installPhase = lib.concatStringsSep - "\n" - (lib.flatten (lib.mapAttrsToList packageLinks packages)); - preferLocalBuild = true; - } - ); - in - '' - set packpath^=${packDir packages} - set runtimepath^=${packDir packages} - - filetype indent plugin on | syn on - ''); - - in '' - " configuration generated by NIX - set nocompatible - - ${beforePlugins} + entries = [ + beforePlugins + vamImpl pathogenImpl plugImpl + (nativeImpl packages) + customRC + ]; - ${vamImpl} - ${pathogenImpl} - ${plugImpl} - ${nativeImpl} + in + lib.concatStringsSep "\n" (lib.filter (x: x != null && x != "") entries); - ${customRC} - ''; vimrcFile = settings: writeText "vimrc" (vimrcContent settings); in @@ -448,8 +445,6 @@ rec { ''; }; - vim_with_vim2nix = vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }; - inherit (import ./build-vim-plugin.nix { inherit lib stdenv rtpPath vim; }) buildVimPlugin buildVimPluginFrom2Nix; # used to figure out which python dependencies etc. neovim needs @@ -475,62 +470,4 @@ rec { nativePlugins = lib.concatMap ({start?[], opt?[], knownPlugins?vimPlugins}: start++opt) nativePluginsConfigs; in nativePlugins ++ nonNativePlugins; - - - # test cases: - test_vim_with_vim_nix_using_vam = vim_configurable.customize { - name = "vim-with-vim-addon-nix-using-vam"; - vimrcConfig.vam.pluginDictionaries = [{name = "vim-nix"; }]; - }; - - test_vim_with_vim_nix_using_pathogen = vim_configurable.customize { - name = "vim-with-vim-addon-nix-using-pathogen"; - vimrcConfig.pathogen.pluginNames = [ "vim-nix" ]; - }; - - test_vim_with_vim_nix_using_plug = vim_configurable.customize { - name = "vim-with-vim-addon-nix-using-plug"; - vimrcConfig.plug.plugins = with vimPlugins; [ vim-nix ]; - }; - - test_vim_with_vim_nix = vim_configurable.customize { - name = "vim-with-vim-addon-nix"; - vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ]; - }; - - # only neovim makes use of `requiredPlugins`, test this here - test_nvim_with_vim_nix_using_pathogen = neovim.override { - configure.pathogen.pluginNames = [ "vim-nix" ]; - }; - - # regression test for https://github.com/NixOS/nixpkgs/issues/53112 - # The user may have specified their own plugins which may not be formatted - # exactly as the generated ones. In particular, they may not have the `pname` - # attribute. - test_vim_with_custom_plugin = vim_configurable.customize { - name = "vim_with_custom_plugin"; - vimrcConfig.vam.knownPlugins = - vimPlugins // ({ - vim-trailing-whitespace = buildVimPluginFrom2Nix { - name = "vim-trailing-whitespace"; - src = fetchFromGitHub { - owner = "bronson"; - repo = "vim-trailing-whitespace"; - rev = "4c596548216b7c19971f8fc94e38ef1a2b55fee6"; - sha256 = "0f1cpnp1nxb4i5hgymjn2yn3k1jwkqmlgw1g02sq270lavp2dzs9"; - }; - # make sure string dependencies are handled - dependencies = [ "vim-nix" ]; - }; - }); - vimrcConfig.vam.pluginDictionaries = [ { names = [ "vim-trailing-whitespace" ]; } ]; - }; - - # system remote plugin manifest should be generated, deoplete should be usable - # without the user having to do `UpdateRemotePlugins`. To test, launch neovim - # and do `:call deoplete#enable()`. It will print an error if the remote - # plugin is not registered. - test_nvim_with_remote_plugin = neovim.override { - configure.pathogen.pluginNames = with vimPlugins; [ deoplete-nvim ]; - }; } diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index fa93ceb0721..b24fc539c93 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -41,6 +41,8 @@ with pkgs; rustCustomSysroot = callPackage ./rust-sysroot {}; buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { }; + vim = callPackage ./vim {}; + nixos-functions = callPackage ./nixos-functions {}; patch-shebangs = callPackage ./patch-shebangs {}; diff --git a/pkgs/test/vim/default.nix b/pkgs/test/vim/default.nix new file mode 100644 index 00000000000..4ca004a60c3 --- /dev/null +++ b/pkgs/test/vim/default.nix @@ -0,0 +1,72 @@ +{ vimUtils, vim_configurable, neovim, vimPlugins +, lib, fetchFromGitHub, +}: +let + inherit (vimUtils) buildVimPluginFrom2Nix; + + packages.myVimPackage.start = with vimPlugins; [ vim-nix ]; +in +{ + vim_empty_config = vimUtils.vimrcFile { beforePlugins = ""; customRC = ""; }; + + vim_with_vim2nix = vim_configurable.customize { + name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; + }; + + # test cases: + test_vim_with_vim_nix_using_vam = vim_configurable.customize { + name = "vim-with-vim-addon-nix-using-vam"; + vimrcConfig.vam.pluginDictionaries = [{name = "vim-nix"; }]; + }; + + test_vim_with_vim_nix_using_pathogen = vim_configurable.customize { + name = "vim-with-vim-addon-nix-using-pathogen"; + vimrcConfig.pathogen.pluginNames = [ "vim-nix" ]; + }; + + test_vim_with_vim_nix_using_plug = vim_configurable.customize { + name = "vim-with-vim-addon-nix-using-plug"; + vimrcConfig.plug.plugins = with vimPlugins; [ vim-nix ]; + }; + + test_vim_with_vim_nix = vim_configurable.customize { + name = "vim-with-vim-addon-nix"; + vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ]; + }; + + # only neovim makes use of `requiredPlugins`, test this here + test_nvim_with_vim_nix_using_pathogen = neovim.override { + configure.pathogen.pluginNames = [ "vim-nix" ]; + }; + + # regression test for https://github.com/NixOS/nixpkgs/issues/53112 + # The user may have specified their own plugins which may not be formatted + # exactly as the generated ones. In particular, they may not have the `pname` + # attribute. + test_vim_with_custom_plugin = vim_configurable.customize { + name = "vim_with_custom_plugin"; + vimrcConfig.vam.knownPlugins = + vimPlugins // ({ + vim-trailing-whitespace = buildVimPluginFrom2Nix { + name = "vim-trailing-whitespace"; + src = fetchFromGitHub { + owner = "bronson"; + repo = "vim-trailing-whitespace"; + rev = "4c596548216b7c19971f8fc94e38ef1a2b55fee6"; + sha256 = "0f1cpnp1nxb4i5hgymjn2yn3k1jwkqmlgw1g02sq270lavp2dzs9"; + }; + # make sure string dependencies are handled + dependencies = [ "vim-nix" ]; + }; + }); + vimrcConfig.vam.pluginDictionaries = [ { names = [ "vim-trailing-whitespace" ]; } ]; + }; + + # system remote plugin manifest should be generated, deoplete should be usable + # without the user having to do `UpdateRemotePlugins`. To test, launch neovim + # and do `:call deoplete#enable()`. It will print an error if the remote + # plugin is not registered. + test_nvim_with_remote_plugin = neovim.override { + configure.pathogen.pluginNames = with vimPlugins; [ deoplete-nvim ]; + }; +} -- cgit 1.4.1 From 10b771c61a02fc9db2047e880388ac9dcefe8f8c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 1 May 2021 13:24:25 +0200 Subject: tests.haskell*: move into tests.haskell set This will make it easier to add all haskell related tests to the haskell hydra jobset without updating a list of tests in two places. --- pkgs/test/default.nix | 3 +- pkgs/test/haskell-documentationTarball/default.nix | 17 ----------- pkgs/test/haskell-shellFor/default.nix | 33 ---------------------- pkgs/test/haskell/default.nix | 6 ++++ pkgs/test/haskell/documentationTarball/default.nix | 17 +++++++++++ pkgs/test/haskell/shellFor/default.nix | 33 ++++++++++++++++++++++ 6 files changed, 57 insertions(+), 52 deletions(-) delete mode 100644 pkgs/test/haskell-documentationTarball/default.nix delete mode 100644 pkgs/test/haskell-shellFor/default.nix create mode 100644 pkgs/test/haskell/default.nix create mode 100644 pkgs/test/haskell/documentationTarball/default.nix create mode 100644 pkgs/test/haskell/shellFor/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index b24fc539c93..89656dde292 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -22,8 +22,7 @@ with pkgs; cc-wrapper-libcxx-9 = callPackage ./cc-wrapper { stdenv = llvmPackages_9.libcxxStdenv; }; stdenv-inputs = callPackage ./stdenv-inputs { }; - haskell-shellFor = callPackage ./haskell-shellFor { }; - haskell-documentationTarball = callPackage ./haskell-documentationTarball { }; + haskell = callPackage ./haskell { }; cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; }; cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; }; diff --git a/pkgs/test/haskell-documentationTarball/default.nix b/pkgs/test/haskell-documentationTarball/default.nix deleted file mode 100644 index aec3dc41f26..00000000000 --- a/pkgs/test/haskell-documentationTarball/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, haskellPackages }: - -let - drv = haskellPackages.vector; - docs = pkgs.haskell.lib.documentationTarball drv; - -in pkgs.runCommand "test haskell.lib.documentationTarball" { } '' - tar xvzf "${docs}/${drv.name}-docs.tar.gz" - - # Check for Haddock html - find "${drv.name}-docs" | grep -q "Data-Vector.html" - - # Check for source html - find "${drv.name}-docs" | grep -q "src/Data.Vector.html" - - touch "$out" -'' diff --git a/pkgs/test/haskell-shellFor/default.nix b/pkgs/test/haskell-shellFor/default.nix deleted file mode 100644 index 9d13e1112cc..00000000000 --- a/pkgs/test/haskell-shellFor/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, haskellPackages, cabal-install }: - -(haskellPackages.shellFor { - packages = p: [ p.database-id-class p.constraints ]; - nativeBuildInputs = [ cabal-install ]; - phases = [ "unpackPhase" "buildPhase" "installPhase" ]; - unpackPhase = '' - sourceRoot=$(pwd)/scratch - mkdir -p "$sourceRoot" - cd "$sourceRoot" - tar -xf ${haskellPackages.database-id-class.src} - tar -xf ${haskellPackages.constraints.src} - cp ${builtins.toFile "cabal.project" "packages: database-id-class* constraints*"} cabal.project - ''; - buildPhase = '' - export HOME=$(mktemp -d) - mkdir -p $HOME/.cabal - touch $HOME/.cabal/config - cabal v2-build --offline --verbose database-id-class constraints --ghc-options="-O0 -j$NIX_BUILD_CORES" - ''; - installPhase = '' - touch $out - ''; -}).overrideAttrs (oldAttrs: { - meta = - let - oldMeta = oldAttrs.meta or {}; - oldMaintainers = oldMeta.maintainers or []; - additionalMaintainers = with lib.maintainers; [ cdepillabout ]; - allMaintainers = oldMaintainers ++ additionalMaintainers; - in - oldMeta // { maintainers = allMaintainers; }; -}) diff --git a/pkgs/test/haskell/default.nix b/pkgs/test/haskell/default.nix new file mode 100644 index 00000000000..8171f929311 --- /dev/null +++ b/pkgs/test/haskell/default.nix @@ -0,0 +1,6 @@ +{ lib, callPackage }: + +lib.recurseIntoAttrs { + shellFor = callPackage ./shellFor { }; + documentationTarball = callPackage ./documentationTarball { }; +} diff --git a/pkgs/test/haskell/documentationTarball/default.nix b/pkgs/test/haskell/documentationTarball/default.nix new file mode 100644 index 00000000000..aec3dc41f26 --- /dev/null +++ b/pkgs/test/haskell/documentationTarball/default.nix @@ -0,0 +1,17 @@ +{ pkgs, haskellPackages }: + +let + drv = haskellPackages.vector; + docs = pkgs.haskell.lib.documentationTarball drv; + +in pkgs.runCommand "test haskell.lib.documentationTarball" { } '' + tar xvzf "${docs}/${drv.name}-docs.tar.gz" + + # Check for Haddock html + find "${drv.name}-docs" | grep -q "Data-Vector.html" + + # Check for source html + find "${drv.name}-docs" | grep -q "src/Data.Vector.html" + + touch "$out" +'' diff --git a/pkgs/test/haskell/shellFor/default.nix b/pkgs/test/haskell/shellFor/default.nix new file mode 100644 index 00000000000..9d13e1112cc --- /dev/null +++ b/pkgs/test/haskell/shellFor/default.nix @@ -0,0 +1,33 @@ +{ lib, haskellPackages, cabal-install }: + +(haskellPackages.shellFor { + packages = p: [ p.database-id-class p.constraints ]; + nativeBuildInputs = [ cabal-install ]; + phases = [ "unpackPhase" "buildPhase" "installPhase" ]; + unpackPhase = '' + sourceRoot=$(pwd)/scratch + mkdir -p "$sourceRoot" + cd "$sourceRoot" + tar -xf ${haskellPackages.database-id-class.src} + tar -xf ${haskellPackages.constraints.src} + cp ${builtins.toFile "cabal.project" "packages: database-id-class* constraints*"} cabal.project + ''; + buildPhase = '' + export HOME=$(mktemp -d) + mkdir -p $HOME/.cabal + touch $HOME/.cabal/config + cabal v2-build --offline --verbose database-id-class constraints --ghc-options="-O0 -j$NIX_BUILD_CORES" + ''; + installPhase = '' + touch $out + ''; +}).overrideAttrs (oldAttrs: { + meta = + let + oldMeta = oldAttrs.meta or {}; + oldMaintainers = oldMeta.maintainers or []; + additionalMaintainers = with lib.maintainers; [ cdepillabout ]; + allMaintainers = oldMaintainers ++ additionalMaintainers; + in + oldMeta // { maintainers = allMaintainers; }; +}) -- cgit 1.4.1 From cc60f81e69154789ad3e23f0ec60110ed3f7aece Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 14 May 2021 17:27:25 +0200 Subject: writeDirectReferencesToFile: init --- doc/builders/trivial-builders.chapter.md | 21 ++++++++++++++ pkgs/build-support/trivial-builders.nix | 29 ++++++++++++++++++++ pkgs/build-support/trivial-builders/test.nix | 20 ++++++++++++++ pkgs/build-support/trivial-builders/test.sh | 41 ++++++++++++++++++++++++++++ pkgs/test/default.nix | 2 ++ 5 files changed, 113 insertions(+) create mode 100644 pkgs/build-support/trivial-builders/test.nix create mode 100755 pkgs/build-support/trivial-builders/test.sh (limited to 'pkgs/test/default.nix') diff --git a/doc/builders/trivial-builders.chapter.md b/doc/builders/trivial-builders.chapter.md index 32944567c05..432183eaf0f 100644 --- a/doc/builders/trivial-builders.chapter.md +++ b/doc/builders/trivial-builders.chapter.md @@ -50,3 +50,24 @@ Many more commands wrap `writeTextFile` including `writeText`, `writeTextDir`, ` ## `symlinkJoin` {#trivial-builder-symlinkJoin} This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within. + +## `writeDirectReferencesToFile` {#trivial-builder-writeDirectReferencesToFile} + +Writes the set of references to the output file, that is, their immediate dependencies. + +This produces the equivalent of `nix-store -q --references`. + +For example, + +```nix +writeDirectReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'') +``` + +produces an output path `/nix/store/-runtime-references` containing + +```nix +/nix/store/-hello-2.10 +``` + +but none of `hello`'s dependencies, because those are not referenced directly +by `hi`'s output. diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 142a04f9a10..0bf67d21b3b 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -438,6 +438,35 @@ rec { done < graph ''; + /* + Write the set of references to a file, that is, their immediate dependencies. + + This produces the equivalent of `nix-store -q --references`. + */ + writeDirectReferencesToFile = path: runCommand "runtime-references" + { + exportReferencesGraph = ["graph" path]; + inherit path; + } + '' + touch ./references + while read p; do + read dummy + read nrRefs + if [[ $p == $path ]]; then + for ((i = 0; i < nrRefs; i++)); do + read ref; + echo $ref >>./references + done + else + for ((i = 0; i < nrRefs; i++)); do + read ref; + done + fi + done < graph + sort ./references >$out + ''; + /* Print an error message if the file with the specified name and * hash doesn't exist in the Nix store. This function should only diff --git a/pkgs/build-support/trivial-builders/test.nix b/pkgs/build-support/trivial-builders/test.nix new file mode 100644 index 00000000000..0902a537222 --- /dev/null +++ b/pkgs/build-support/trivial-builders/test.nix @@ -0,0 +1,20 @@ +{ lib, nixosTest, path, writeText, hello, figlet, stdenvNoCC }: + +nixosTest { + name = "nixpkgs-trivial-builders"; + nodes.machine = { ... }: { + virtualisation.writableStore = true; + + # Test runs without network, so we don't substitute and prepare our deps + nix.binaryCaches = lib.mkForce []; + environment.etc."pre-built-paths".source = writeText "pre-built-paths" ( + builtins.toJSON [hello figlet stdenvNoCC] + ); + }; + testScript = '' + machine.succeed(""" + cd ${lib.cleanSource path} + ./pkgs/build-support/trivial-builders/test.sh 2>/dev/console + """) + ''; +} diff --git a/pkgs/build-support/trivial-builders/test.sh b/pkgs/build-support/trivial-builders/test.sh new file mode 100755 index 00000000000..eec501ae601 --- /dev/null +++ b/pkgs/build-support/trivial-builders/test.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# -------------------------------------------------------------------------- # +# +# trivial-builders test +# +# -------------------------------------------------------------------------- # +# +# This file can be run independently (quick): +# +# $ pkgs/build-support/trivial-builders/test.sh +# +# or in the build sandbox with a ~20s VM overhead +# +# $ nix-build -A tests.trivial-builders +# +# -------------------------------------------------------------------------- # + +# strict bash +set -euo pipefail + +# debug +# set -x +# PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' + +cd "$(dirname ${BASH_SOURCE[0]})" # nixpkgs root + +testDirectReferences() { + expr="$1" + diff -U3 \ + <(sort <$(nix-build --no-out-link --expr "with import ../../.. {}; writeDirectReferencesToFile ($expr)")) \ + <(nix-store -q --references $(nix-build --no-out-link --expr "with import ../../.. {}; ($expr)") | sort) +} + +testDirectReferences 'hello' +testDirectReferences 'figlet' +testDirectReferences 'writeText "hi" "hello"' +testDirectReferences 'writeText "hi" "hello ${hello}"' +testDirectReferences 'writeText "hi" "hello ${hello} ${figlet}"' + +echo 'OK!' diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 89656dde292..b9f05bdff8d 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -50,5 +50,7 @@ with pkgs; cuda = callPackage ./cuda { }; + trivial = callPackage ../build-support/trivial-builders/test.nix {}; + writers = callPackage ../build-support/writers/test.nix {}; } -- cgit 1.4.1 From d3769e43c34fe16a263938c584e6cdc92b18f6d5 Mon Sep 17 00:00:00 2001 From: Daniël de Kok Date: Sat, 8 May 2021 11:33:29 +0200 Subject: rustPlatform.importCargoLock: add test cases for importCargoLock --- .../rust/test/import-cargo-lock/basic/Cargo.lock | 83 +++ .../rust/test/import-cargo-lock/basic/Cargo.toml | 8 + .../rust/test/import-cargo-lock/basic/default.nix | 18 + .../rust/test/import-cargo-lock/basic/src/main.rs | 9 + .../rust/test/import-cargo-lock/default.nix | 8 + .../git-dependency-no-rev/Cargo.lock | 79 +++ .../git-dependency-no-rev/Cargo.toml | 8 + .../git-dependency-no-rev/default.nix | 21 + .../git-dependency-no-rev/src/main.rs | 9 + .../import-cargo-lock/git-dependency/Cargo.lock | 79 +++ .../import-cargo-lock/git-dependency/Cargo.toml | 8 + .../import-cargo-lock/git-dependency/default.nix | 21 + .../import-cargo-lock/git-dependency/src/main.rs | 9 + .../rust/test/import-cargo-lock/maturin/Cargo.lock | 682 +++++++++++++++++++++ .../test/import-cargo-lock/maturin/default.nix | 43 ++ pkgs/test/default.nix | 1 + 16 files changed, 1086 insertions(+) create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.lock create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.toml create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/basic/default.nix create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/basic/src/main.rs create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/default.nix create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.lock create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.toml create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/default.nix create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/src/main.rs create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.lock create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.toml create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/git-dependency/src/main.rs create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/maturin/Cargo.lock create mode 100644 pkgs/build-support/rust/test/import-cargo-lock/maturin/default.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.lock b/pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.lock new file mode 100644 index 00000000000..fd1b5e42ad3 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.lock @@ -0,0 +1,83 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "basic" +version = "0.1.0" +dependencies = [ + "rand", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "libc" +version = "0.2.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "rand" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" diff --git a/pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.toml b/pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.toml new file mode 100644 index 00000000000..f555bb0de62 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/basic/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "basic" +version = "0.1.0" +authors = ["Daniël de Kok "] +edition = "2018" + +[dependencies] +rand = "0.8" diff --git a/pkgs/build-support/rust/test/import-cargo-lock/basic/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/basic/default.nix new file mode 100644 index 00000000000..d595b58109a --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/basic/default.nix @@ -0,0 +1,18 @@ +{ rustPlatform }: + +rustPlatform.buildRustPackage { + pname = "basic"; + version = "0.1.0"; + + src = ./.; + + cargoLock = { + lockFile = ./Cargo.lock; + }; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/basic + ''; +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/basic/src/main.rs b/pkgs/build-support/rust/test/import-cargo-lock/basic/src/main.rs new file mode 100644 index 00000000000..50b4ed799e4 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/basic/src/main.rs @@ -0,0 +1,9 @@ +use rand::Rng; + +fn main() { + let mut rng = rand::thread_rng(); + + // Always draw zero :). + let roll: u8 = rng.gen_range(0..1); + assert_eq!(roll, 0); +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/default.nix new file mode 100644 index 00000000000..2dd525a8ac3 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/default.nix @@ -0,0 +1,8 @@ +{ callPackage }: + +{ + basic = callPackage ./basic { }; + gitDependency = callPackage ./git-dependency { }; + gitDependencyNoRev = callPackage ./git-dependency-no-rev { }; + maturin = callPackage ./maturin { }; +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.lock b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.lock new file mode 100644 index 00000000000..54b9c7c5739 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.lock @@ -0,0 +1,79 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "git-dependency-no-rev" +version = "0.1.0" +dependencies = [ + "rand", +] + +[[package]] +name = "libc" +version = "0.2.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "rand" +version = "0.8.3" +source = "git+https://github.com/rust-random/rand.git#f0e01ee0a7257753cc51b291f62666f4765923ef" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "git+https://github.com/rust-random/rand.git#f0e01ee0a7257753cc51b291f62666f4765923ef" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.2" +source = "git+https://github.com/rust-random/rand.git#f0e01ee0a7257753cc51b291f62666f4765923ef" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "git+https://github.com/rust-random/rand.git#f0e01ee0a7257753cc51b291f62666f4765923ef" +dependencies = [ + "rand_core", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.toml b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.toml new file mode 100644 index 00000000000..770dfb86f52 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "git-dependency-no-rev" +version = "0.1.0" +authors = ["Daniël de Kok "] +edition = "2018" + +[dependencies] +rand = { git = "https://github.com/rust-random/rand.git" } diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/default.nix new file mode 100644 index 00000000000..fc36edc4077 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/default.nix @@ -0,0 +1,21 @@ +{ rustPlatform }: + +rustPlatform.buildRustPackage { + pname = "git-dependency-no-rev"; + version = "0.1.0"; + + src = ./.; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "rand-0.8.3" = "0ya2hia3cn31qa8894s3av2s8j5bjwb6yq92k0jsnlx7jid0jwqa"; + }; + }; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/git-dependency-no-rev + ''; +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/src/main.rs b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/src/main.rs new file mode 100644 index 00000000000..50b4ed799e4 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-no-rev/src/main.rs @@ -0,0 +1,9 @@ +use rand::Rng; + +fn main() { + let mut rng = rand::thread_rng(); + + // Always draw zero :). + let roll: u8 = rng.gen_range(0..1); + assert_eq!(roll, 0); +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.lock b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.lock new file mode 100644 index 00000000000..50600ef4caa --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.lock @@ -0,0 +1,79 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "git-dependency" +version = "0.1.0" +dependencies = [ + "rand", +] + +[[package]] +name = "libc" +version = "0.2.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "rand" +version = "0.8.3" +source = "git+https://github.com/rust-random/rand.git?rev=0.8.3#6ecbe2626b2cc6110a25c97b1702b347574febc7" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "git+https://github.com/rust-random/rand.git?rev=0.8.3#6ecbe2626b2cc6110a25c97b1702b347574febc7" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.1" +source = "git+https://github.com/rust-random/rand.git?rev=0.8.3#6ecbe2626b2cc6110a25c97b1702b347574febc7" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "git+https://github.com/rust-random/rand.git?rev=0.8.3#6ecbe2626b2cc6110a25c97b1702b347574febc7" +dependencies = [ + "rand_core", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.toml b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.toml new file mode 100644 index 00000000000..11ee8b1763e --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "git-dependency" +version = "0.1.0" +authors = ["Daniël de Kok "] +edition = "2018" + +[dependencies] +rand = { git = "https://github.com/rust-random/rand.git", rev = "0.8.3" } diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix new file mode 100644 index 00000000000..17276c5f5c3 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix @@ -0,0 +1,21 @@ +{ rustPlatform }: + +rustPlatform.buildRustPackage { + pname = "git-dependency"; + version = "0.1.0"; + + src = ./.; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "rand-0.8.3" = "0l3p174bpwia61vcvxz5mw65a13ri3wy94z04xrnyy5lzciykz4f"; + }; + }; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/git-dependency + ''; +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/src/main.rs b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/src/main.rs new file mode 100644 index 00000000000..50b4ed799e4 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/src/main.rs @@ -0,0 +1,9 @@ +use rand::Rng; + +fn main() { + let mut rng = rand::thread_rng(); + + // Always draw zero :). + let roll: u8 = rng.gen_range(0..1); + assert_eq!(roll, 0); +} diff --git a/pkgs/build-support/rust/test/import-cargo-lock/maturin/Cargo.lock b/pkgs/build-support/rust/test/import-cargo-lock/maturin/Cargo.lock new file mode 100644 index 00000000000..5e698d4ff73 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/maturin/Cargo.lock @@ -0,0 +1,682 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + +[[package]] +name = "assert_approx_eq" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c07dab4369547dbe5114677b33fbbf724971019f3818172d59a97a61c774ffd" + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "byteorder" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const_fn" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" + +[[package]] +name = "crossbeam-channel" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" +dependencies = [ + "cfg-if", + "const_fn", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" +dependencies = [ + "autocfg", + "cfg-if", + "lazy_static", +] + +[[package]] +name = "ctor" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "ghost" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5bcf1bbeab73aa4cf2fde60a846858dc036163c7c33bec309f8d17de785479" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash", +] + +[[package]] +name = "hermit-abi" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +dependencies = [ + "libc", +] + +[[package]] +name = "indoc" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8" +dependencies = [ + "indoc-impl", + "proc-macro-hack", +] + +[[package]] +name = "indoc-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", + "unindent", +] + +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "inventory" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0f7efb804ec95e33db9ad49e4252f049e37e8b0a4652e3cd61f7999f2eff7f" +dependencies = [ + "ctor", + "ghost", + "inventory-impl", +] + +[[package]] +name = "inventory-impl" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c094e94816723ab936484666968f5b58060492e880f3c8d00489a1e244fa51" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" + +[[package]] +name = "lock_api" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "memoffset" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num-bigint" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + +[[package]] +name = "paste" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" +dependencies = [ + "paste-impl", + "proc-macro-hack", +] + +[[package]] +name = "paste-impl" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" +dependencies = [ + "proc-macro-hack", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "proptest" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12e6c80c1139113c28ee4670dc50cc42915228b51f56a9e407f0ec60f966646f" +dependencies = [ + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax", +] + +[[package]] +name = "pyo3" +version = "0.13.2" +dependencies = [ + "assert_approx_eq", + "cfg-if", + "ctor", + "hashbrown", + "indoc", + "inventory", + "libc", + "num-bigint", + "num-complex", + "parking_lot", + "paste", + "proptest", + "pyo3", + "pyo3-macros", + "rustversion", + "serde", + "serde_json", + "trybuild", + "unindent", +] + +[[package]] +name = "pyo3-macros" +version = "0.13.2" +dependencies = [ + "pyo3-macros-backend", + "quote", + "syn", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.13.2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_xorshift" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex-syntax" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" + +[[package]] +name = "rustapi-module" +version = "0.1.0" +dependencies = [ + "pyo3", +] + +[[package]] +name = "rustversion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "serde" +version = "1.0.123" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.123" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "syn" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "trybuild" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99471a206425fba51842a9186315f32d91c56eadc21ea4c21f847b59cf778f8b" +dependencies = [ + "glob", + "lazy_static", + "serde", + "serde_json", + "termcolor", + "toml", +] + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "unindent" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f14ee04d9415b52b3aeab06258a3f07093182b88ba0f9b8d203f211a7a7d41c7" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "word-count" +version = "0.1.0" +dependencies = [ + "pyo3", + "rayon", +] diff --git a/pkgs/build-support/rust/test/import-cargo-lock/maturin/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/maturin/default.nix new file mode 100644 index 00000000000..af0de596b38 --- /dev/null +++ b/pkgs/build-support/rust/test/import-cargo-lock/maturin/default.nix @@ -0,0 +1,43 @@ +{ lib +, fetchFromGitHub +, python3 +, rustPlatform +}: + +python3.pkgs.buildPythonPackage rec { + pname = "word-count"; + version = "0.13.2"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "PyO3"; + repo = "pyo3"; + rev = "v${version}"; + hash = "sha256-NOMrrfo8WjlPhtGxWUOPJS/UDDdbLQRCXR++Zd6JmIA="; + }; + + cargoDeps = rustPlatform.importCargoLock { + lockFile = ./Cargo.lock; + }; + + postPatch = '' + cp ${./Cargo.lock} Cargo.lock + ''; + + buildAndTestSubdir = "examples/word-count"; + + nativeBuildInputs = with rustPlatform; [ + cargoSetupHook + maturinBuildHook + ]; + + pythonImportsCheck = [ "word_count" ]; + + meta = with lib; { + description = "PyO3 word count example"; + homepage = "https://github.com/PyO3/pyo3"; + license = licenses.asl20; + maintainers = [ maintainers.danieldk ]; + }; +} diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index b24fc539c93..406b3191b7f 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -40,6 +40,7 @@ with pkgs; rustCustomSysroot = callPackage ./rust-sysroot {}; buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { }; + importCargoLock = callPackage ../build-support/rust/test/import-cargo-lock { }; vim = callPackage ./vim {}; -- cgit 1.4.1 From a71e906e3a0bec9c5fece94262e96de83e58c1f3 Mon Sep 17 00:00:00 2001 From: deliciouslytyped <47436522+deliciouslytyped@users.noreply.github.com> Date: Mon, 14 Jun 2021 15:06:23 +0200 Subject: trivial-builders: refactor writeTextFile to be overridable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes #126344, specifically with the goal of enabling overriding the checkPhase argument. See `design notes` at the end for details. This allows among other things, enabling bash extension for the `checkPhase`. Previously using such bash extensions was prohibited by the `writeShellScript` code because there was no way to enable the extension in the checker. As an example: ```nix (writeShellScript "foo" '' shopt -s extglob echo @(foo|bar) '').overrideAttrs (old: { checkPhase = '' # use subshell to preserve outer environment ( export BASHOPTS shopt -s extglob ${old.checkPhase} ) ''; }) ``` This commit also adds tests for this feature to `pkgs/tests/default.nix`, under `trivial-overriding`. The test code is located at `pkgs/build-support/trivial-builders/test-overriding.nix`. Design notes: ------------- Per discussion with @sternenseemann, the original approach of just wrapping `writeTextFile` in `makeOverridable` had the issue that combined with `callPackage` in the following form, would shadow the `.override` attribute of the `writeTextFile`: ```nix with import ; callPackage ({writeShellScript}: writeShellScript "foo" "echo foo") ``` A better approach can be seen in this commit, where `checkPhase` is moved from an argument of `writeTextFile`, which is substituted into `buildCommand`, into an `mkDerivation` argument, which is substituted from the environment and `eval`-ed. (see the source) This way we can simple use `.overideAttrs` as usual, and this also makes `checkPhase` a bit more conformant to `mkDerivation` naming, with respect to phases generally being overridable attrs. Co-authored-by: sterni Co-authored-by: Naïm Favier --- pkgs/build-support/trivial-builders.nix | 4 +- .../trivial-builders/test-overriding.nix | 119 +++++++++++++++++++++ pkgs/test/default.nix | 1 + 3 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 pkgs/build-support/trivial-builders/test-overriding.nix (limited to 'pkgs/test/default.nix') diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 219f808403c..6f51ba512c1 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -116,7 +116,7 @@ rec { , checkPhase ? "" # syntax checks, e.g. for scripts }: runCommand name - { inherit text executable; + { inherit text executable checkPhase; passAsFile = [ "text" ]; # Pointless to do this on a remote machine. preferLocalBuild = true; @@ -132,7 +132,7 @@ rec { echo -n "$text" > "$n" fi - ${checkPhase} + eval "$checkPhase" (test -n "$executable" && chmod +x "$n") || true ''; diff --git a/pkgs/build-support/trivial-builders/test-overriding.nix b/pkgs/build-support/trivial-builders/test-overriding.nix new file mode 100644 index 00000000000..ddd5dc05075 --- /dev/null +++ b/pkgs/build-support/trivial-builders/test-overriding.nix @@ -0,0 +1,119 @@ +# Check that overriding works for trivial-builders like +# `writeShellScript` via `overrideAttrs`. This is useful +# to override the `checkPhase`, e. g. when you want +# to enable extglob in `writeShellScript`. +# +# Run using `nix-build -A tests.trivial-overriding`. +{ lib +, runtimeShell +, runCommand +, callPackage +, writeShellScript +, writeTextFile +, writeShellScriptBin +}: + +let + extglobScript = '' + shopt -s extglob + touch success + echo @(success|failure) + rm success + ''; + + # Reuse the old `checkPhase` of `writeShellScript`, but enable extglob. + allowExtglob = old: { + checkPhase = '' + # make sure we don't change the settings for + # the rest of the derivation's build + ( + export BASHOPTS + shopt -s extglob + ${old.checkPhase} + ) + ''; + }; + + # Run old checkPhase, but only succeed if it fails. + # This HACK is required because we can't introspect build failures + # in nix: With `assertFail` we want to make sure that the default + # `checkPhase` would fail if extglob was used in the script. + assertFail = old: { + # write old checkPhase into a shell script, so we can check for + # the phase to fail even though we have `set -e`. + checkPhase = '' + if source ${writeShellScript "old-check-phase" old.checkPhase} 2>/dev/null; then + exit 1 + fi + ''; + }; + + simpleCase = case: + writeShellScript "test-trivial-overriding-${case}" extglobScript; + + callPackageCase = case: callPackage ( + { writeShellScript }: + writeShellScript "test-trivial-callpackage-overriding-${case}" extglobScript + ) { }; + + binCase = case: + writeShellScriptBin "test-trivial-overriding-bin-${case}" extglobScript; + + # building this derivation would fail without overriding + textFileCase = writeTextFile { + name = "test-trivial-overriding-text-file"; + checkPhase = "false"; + text = '' + #!${runtimeShell} + echo success + ''; + executable = true; + }; + + mkCase = f: type: isBin: + let + drv = (f type).overrideAttrs + (if type == "succ" then allowExtglob else assertFail); + in if isBin then "${drv}/bin/${drv.name}" else drv; + + writeTextOverrides = { + # Enabling globbing in checkPhase + simpleSucc = mkCase simpleCase "succ" false; + # Ensure it's possible to fail; in this case globbing is not enabled. + simpleFail = mkCase simpleCase "fail" false; + # Do the same checks after wrapping with callPackage + # to make sure callPackage doesn't mess with the override + callpSucc = mkCase callPackageCase "succ" false; + callpFail = mkCase callPackageCase "fail" false; + # Do the same check using `writeShellScriptBin` + binSucc = mkCase binCase "succ" true; + binFail = mkCase binCase "fail" true; + # Check that we can also override plain writeTextFile + textFileSuccess = textFileCase.overrideAttrs (_: { + checkPhase = "true"; + }); + }; + + # `runTest` forces nix to build the script of our test case and + # run its `checkPhase` which is our main interest. Additionally + # it executes the script and thus makes sure that extglob also + # works at run time. + runTest = script: + let + name = script.name or (builtins.baseNameOf script); + in writeShellScript "run-${name}" '' + if [ "$(${script})" != "success" ]; then + echo "Failed in ${script}" + exit 1 + fi + ''; +in + +runCommand "test-writeShellScript-overriding" { + passthru = { inherit writeTextOverrides; }; +} '' + ${lib.concatMapStrings (test: '' + ${runTest test} + '') (lib.attrValues writeTextOverrides)} + touch "$out" +'' diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 8c9e7b6f281..ebf732839ce 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -52,6 +52,7 @@ with pkgs; cuda = callPackage ./cuda { }; trivial = callPackage ../build-support/trivial-builders/test.nix {}; + trivial-overriding = callPackage ../build-support/trivial-builders/test-overriding.nix {}; writers = callPackage ../build-support/writers/test.nix {}; } -- cgit 1.4.1