diff options
34 files changed, 381 insertions, 174 deletions
diff --git a/doc/stdenv/cross-compilation.chapter.md b/doc/stdenv/cross-compilation.chapter.md index 3b6e5c34d54da..7b8f2b4ce6cdb 100644 --- a/doc/stdenv/cross-compilation.chapter.md +++ b/doc/stdenv/cross-compilation.chapter.md @@ -153,6 +153,24 @@ Add the following to your `mkDerivation` invocation. doCheck = stdenv.hostPlatform == stdenv.buildPlatform; ``` +#### Package using Meson needs to run binaries for the host platform during build. {#cross-meson-runs-host-code} + +Add `mesonEmulatorHook` cross conditionally to `nativeBuildInputs`. + +e.g. + +``` +nativeBuildInputs = [ + meson +] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + mesonEmulatorHook +]; +``` + +Example of an error which this fixes. + +`[Errno 8] Exec format error: './gdk3-scan'` + ## Cross-building packages {#sec-cross-usage} Nixpkgs can be instantiated with `localSystem` alone, in which case there is no cross-compiling and everything is built by and for that system, or also with `crossSystem`, in which case packages run on the latter, but all building happens on the former. Both parameters take the same schema as the 3 (build, host, and target) platforms defined in the previous section. As mentioned above, `lib.systems.examples` has some platforms which are used as arguments for these parameters in practice. You can use them programmatically, or on the command line: diff --git a/pkgs/applications/graphics/sane/backends/default.nix b/pkgs/applications/graphics/sane/backends/default.nix index d3c5b1c0b75f2..8c45f3a62ff3e 100644 --- a/pkgs/applications/graphics/sane/backends/default.nix +++ b/pkgs/applications/graphics/sane/backends/default.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation { in '' mkdir -p $out/etc/udev/rules.d/ - ./tools/sane-desc -m udev > $out/etc/udev/rules.d/49-libsane.rules || \ + ./tools/sane-desc -m udev+hwdb -s doc/descriptions:doc/descriptions-external > $out/etc/udev/rules.d/49-libsane.rules || \ cp tools/udev/libsane.rules $out/etc/udev/rules.d/49-libsane.rules # the created 49-libsane references /bin/sh substituteInPlace $out/etc/udev/rules.d/49-libsane.rules \ diff --git a/pkgs/applications/networking/instant-messengers/teams/default.nix b/pkgs/applications/networking/instant-messengers/teams/default.nix index 07462b4cc26f8..474a1f96915b4 100644 --- a/pkgs/applications/networking/instant-messengers/teams/default.nix +++ b/pkgs/applications/networking/instant-messengers/teams/default.nix @@ -57,7 +57,12 @@ let ]; preFixup = '' - gappsWrapperArgs+=(--prefix PATH : "${coreutils}/bin:${gawk}/bin") + gappsWrapperArgs+=( + --prefix PATH : "${coreutils}/bin:${gawk}/bin" + + # fix for https://docs.microsoft.com/en-us/answers/questions/298724/open-teams-meeting-link-on-linux-doens39t-work.html?childToView=309406#comment-309406 + --append-flags '--disable-namespace-sandbox --disable-setuid-sandbox' + ) ''; @@ -118,15 +123,6 @@ let echo "Adding runtime dependencies to RPATH of Node module $mod" patchelf --set-rpath "$runtime_rpath:$mod_rpath" "$mod" done; - - # fix for https://docs.microsoft.com/en-us/answers/questions/298724/open-teams-meeting-link-on-linux-doens39t-work.html?childToView=309406#comment-309406 - wrapped=$out/bin/.teams-old - mv "$out/bin/teams" "$wrapped" - cat > "$out/bin/teams" << EOF - #! ${runtimeShell} - exec $wrapped "\$@" --disable-namespace-sandbox --disable-setuid-sandbox - EOF - chmod +x "$out/bin/teams" ''; }; diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh index 6b8f5d60eb65f..5f759d323cf62 100644 --- a/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh @@ -15,17 +15,19 @@ assertExecutable() { # makeWrapper EXECUTABLE OUT_PATH ARGS # ARGS: -# --argv0 NAME : set the name of the executed process to NAME -# (if unset or empty, defaults to EXECUTABLE) -# --inherit-argv0 : the executable inherits argv0 from the wrapper. -# (use instead of --argv0 '$0') -# --set VAR VAL : add VAR with value VAL to the executable's environment -# --set-default VAR VAL : like --set, but only adds VAR if not already set in -# the environment -# --unset VAR : remove VAR from the environment -# --chdir DIR : change working directory (use instead of --run "cd DIR") -# --add-flags FLAGS : add FLAGS to invocation of executable -# TODO(@ncfavier): --append-flags +# --argv0 NAME : set the name of the executed process to NAME +# (if unset or empty, defaults to EXECUTABLE) +# --inherit-argv0 : the executable inherits argv0 from the wrapper. +# (use instead of --argv0 '$0') +# --set VAR VAL : add VAR with value VAL to the executable's environment +# --set-default VAR VAL : like --set, but only adds VAR if not already set in +# the environment +# --unset VAR : remove VAR from the environment +# --chdir DIR : change working directory (use instead of --run "cd DIR") +# --add-flags ARGS : prepend ARGS to the invocation of the executable +# (that is, *before* any arguments passed on the command line) +# --append-flags ARGS : append ARGS to the invocation of the executable +# (that is, *after* any arguments passed on the command line) # --prefix ENV SEP VAL : suffix/prefix ENV with VAL, separated by SEP # --suffix @@ -83,7 +85,7 @@ makeDocumentedCWrapper() { # makeCWrapper EXECUTABLE ARGS # ARGS: same as makeWrapper makeCWrapper() { - local argv0 inherit_argv0 n params cmd main flagsBefore flags executable length + local argv0 inherit_argv0 n params cmd main flagsBefore flagsAfter flags executable length local uses_prefix uses_suffix uses_assert uses_assert_success uses_stdio uses_asprintf executable=$(escapeStringLiteral "$1") params=("$@") @@ -150,6 +152,13 @@ makeCWrapper() { n=$((n + 1)) [ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n' ;; + --append-flags) + flags="${params[n + 1]}" + flagsAfter="$flagsAfter $flags" + uses_assert=1 + n=$((n + 1)) + [ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n' + ;; --argv0) argv0=$(escapeStringLiteral "${params[n + 1]}") inherit_argv0= @@ -165,8 +174,7 @@ makeCWrapper() { ;; esac done - # shellcheck disable=SC2086 - [ -z "$flagsBefore" ] || main="$main"${main:+$'\n'}$(addFlags $flagsBefore)$'\n'$'\n' + [[ -z "$flagsBefore" && -z "$flagsAfter" ]] || main="$main"${main:+$'\n'}$(addFlags "$flagsBefore" "$flagsAfter")$'\n'$'\n' [ -z "$inherit_argv0" ] && main="${main}argv[0] = \"${argv0:-${executable}}\";"$'\n' main="${main}return execv(\"${executable}\", argv);"$'\n' @@ -184,21 +192,25 @@ makeCWrapper() { } addFlags() { - local result n flag flags var + local n flag before after var + # shellcheck disable=SC2086 + before=($1) after=($2) var="argv_tmp" - flags=("$@") - for ((n = 0; n < ${#flags[*]}; n += 1)); do - flag=$(escapeStringLiteral "${flags[$n]}") - result="$result${var}[$((n+1))] = \"$flag\";"$'\n' - done - printf '%s\n' "char **$var = calloc($((n+1)) + argc, sizeof(*$var));" + printf '%s\n' "char **$var = calloc(${#before[@]} + argc + ${#after[@]} + 1, sizeof(*$var));" printf '%s\n' "assert($var != NULL);" printf '%s\n' "${var}[0] = argv[0];" - printf '%s' "$result" + for ((n = 0; n < ${#before[@]}; n += 1)); do + flag=$(escapeStringLiteral "${before[n]}") + printf '%s\n' "${var}[$((n + 1))] = \"$flag\";" + done printf '%s\n' "for (int i = 1; i < argc; ++i) {" - printf '%s\n' " ${var}[$n + i] = argv[i];" + printf '%s\n' " ${var}[${#before[@]} + i] = argv[i];" printf '%s\n' "}" - printf '%s\n' "${var}[$n + argc] = NULL;" + for ((n = 0; n < ${#after[@]}; n += 1)); do + flag=$(escapeStringLiteral "${after[n]}") + printf '%s\n' "${var}[${#before[@]} + argc + $n] = \"$flag\";" + done + printf '%s\n' "${var}[${#before[@]} + argc + ${#after[@]}] = NULL;" printf '%s\n' "argv = $var;" } @@ -366,6 +378,10 @@ formatArgs() { formatArgsLine 1 "$@" shift 1 ;; + --append-flags) + formatArgsLine 1 "$@" + shift 1 + ;; --argv0) formatArgsLine 1 "$@" shift 1 diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index 8a38c39efc478..84e5ecee2909e 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -11,18 +11,20 @@ assertExecutable() { # makeWrapper EXECUTABLE OUT_PATH ARGS # ARGS: -# --argv0 NAME : set the name of the executed process to NAME -# (if unset or empty, defaults to EXECUTABLE) -# --inherit-argv0 : the executable inherits argv0 from the wrapper. -# (use instead of --argv0 '$0') -# --set VAR VAL : add VAR with value VAL to the executable's environment -# --set-default VAR VAL : like --set, but only adds VAR if not already set in -# the environment -# --unset VAR : remove VAR from the environment -# --chdir DIR : change working directory (use instead of --run "cd DIR") -# --run COMMAND : run command before the executable -# --add-flags FLAGS : add FLAGS to invocation of executable -# TODO(@ncfavier): --append-flags +# --argv0 NAME : set the name of the executed process to NAME +# (if unset or empty, defaults to EXECUTABLE) +# --inherit-argv0 : the executable inherits argv0 from the wrapper. +# (use instead of --argv0 '$0') +# --set VAR VAL : add VAR with value VAL to the executable's environment +# --set-default VAR VAL : like --set, but only adds VAR if not already set in +# the environment +# --unset VAR : remove VAR from the environment +# --chdir DIR : change working directory (use instead of --run "cd DIR") +# --run COMMAND : run command before the executable +# --add-flags ARGS : prepend ARGS to the invocation of the executable +# (that is, *before* any arguments passed on the command line) +# --append-flags ARGS : append ARGS to the invocation of the executable +# (that is, *after* any arguments passed on the command line) # --prefix ENV SEP VAL : suffix/prefix ENV with VAL, separated by SEP # --suffix @@ -36,7 +38,7 @@ makeShellWrapper() { local original="$1" local wrapper="$2" local params varName value command separator n fileNames - local argv0 flagsBefore flags + local argv0 flagsBefore flagsAfter flags assertExecutable "$original" @@ -165,6 +167,10 @@ makeShellWrapper() { flags="${params[$((n + 1))]}" n=$((n + 1)) flagsBefore="$flagsBefore $flags" + elif [[ "$p" == "--append-flags" ]]; then + flags="${params[$((n + 1))]}" + n=$((n + 1)) + flagsAfter="$flagsAfter $flags" elif [[ "$p" == "--argv0" ]]; then argv0="${params[$((n + 1))]}" n=$((n + 1)) @@ -177,7 +183,7 @@ makeShellWrapper() { done echo exec ${argv0:+-a \"$argv0\"} \""$original"\" \ - "$flagsBefore" '"$@"' >> "$wrapper" + "$flagsBefore" '"$@"' "$flagsAfter" >> "$wrapper" chmod +x "$wrapper" } diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 546160ba5e371..0a468023616e9 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, fetchpatch, pkg-config, flex, bison, libxslt, autoconf, autoreconfHook -, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll +, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll, vala }: let @@ -49,7 +49,9 @@ let # so that it can be used to regenerate documentation. patches = lib.optionals disableGraphviz [ graphvizPatch ./gvc-compat.patch ]; configureFlags = lib.optional disableGraphviz "--disable-graphviz"; - preBuild = lib.optionalString disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")"; + # when cross-compiling ./compiler/valac is valac for host + # so add the build vala in nativeBuildInputs + preBuild = lib.optionalString (disableGraphviz && (stdenv.buildPlatform == stdenv.hostPlatform)) "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")"; outputs = [ "out" "devdoc" ]; @@ -57,6 +59,7 @@ let pkg-config flex bison libxslt ] ++ lib.optional (stdenv.isDarwin && (lib.versionAtLeast version "0.38")) expat ++ lib.optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure + ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ vala ] ++ extraNativeBuildInputs; buildInputs = [ diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix index 1732b5df04e2a..e24217434557f 100644 --- a/pkgs/development/libraries/avahi/default.nix +++ b/pkgs/development/libraries/avahi/default.nix @@ -1,21 +1,25 @@ -{ fetchurl, fetchpatch, lib, stdenv, pkg-config, libdaemon, dbus, perlPackages -, expat, gettext, intltool, glib, libiconv, writeShellScriptBin, libevent +{ fetchurl +, fetchpatch +, lib +, stdenv +, pkg-config +, libdaemon +, dbus +, perlPackages +, expat +, gettext +, glib +, libiconv +, libevent , nixosTests -, gtk3Support ? false, gtk3 ? null -, qt4 ? null -, qt4Support ? false +, gtk3Support ? false +, gtk3 ? null , qt5 ? null , qt5Support ? false , withLibdnssdCompat ? false , python ? null -, withPython ? false }: - -assert qt4Support -> qt4 != null; - -let - # despite the configure script claiming it supports $PKG_CONFIG, it doesnt respect it - pkg-config-helper = writeShellScriptBin "pkg-config" ''exec $PKG_CONFIG "$@"''; -in +, withPython ? false +}: stdenv.mkDerivation rec { pname = "avahi${lib.optionalString withLibdnssdCompat "-compat"}"; @@ -26,45 +30,72 @@ stdenv.mkDerivation rec { sha256 = "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"; }; - prePatch = '' - substituteInPlace configure \ - --replace pkg-config "$PKG_CONFIG" - ''; - patches = [ - ./no-mkdir-localstatedir.patch (fetchpatch { url = "https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c.patch"; sha256 = "sha256-BXWmrLWUvDxKPoIPRFBpMS3T4gijRw0J+rndp6iDybU="; }) ]; - buildInputs = [ libdaemon dbus glib expat libiconv libevent ] - ++ (with perlPackages; [ perl XMLParser ]) - ++ (lib.optional gtk3Support gtk3) - ++ (lib.optional qt4Support qt4) - ++ (lib.optional qt5Support qt5); + depsBuildBuild = [ + pkg-config + ]; - propagatedBuildInputs = - lib.optionals withPython (with python.pkgs; [ python pygobject3 dbus-python ]); + nativeBuildInputs = [ + pkg-config + gettext + glib + ]; - nativeBuildInputs = [ pkg-config pkg-config-helper gettext intltool glib ]; + buildInputs = [ + libdaemon + dbus + glib + expat + libiconv + libevent + ] ++ (with perlPackages; [ + perl + XMLParser + ]) ++ lib.optionals gtk3Support [ + gtk3 + ] ++ lib.optionals qt5Support [ + qt5 + ]; - configureFlags = - [ "--disable-qt3" "--disable-gdbm" "--disable-mono" - "--disable-gtk" "--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d" - (lib.enableFeature gtk3Support "gtk3") - "--${if qt4Support then "enable" else "disable"}-qt4" - "--${if qt5Support then "enable" else "disable"}-qt5" - (lib.enableFeature withPython "python") - "--localstatedir=/var" "--with-distro=none" - # A systemd unit is provided by the avahi-daemon NixOS module - "--with-systemdsystemunitdir=no" ] - ++ lib.optional withLibdnssdCompat "--enable-compat-libdns_sd" + propagatedBuildInputs = lib.optionals withPython (with python.pkgs; [ + python + pygobject3 + dbus-python + ]); + + configureFlags = [ + "--disable-gdbm" + "--disable-mono" + # Use non-deprecated path https://github.com/lathiat/avahi/pull/376 + "--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d" + (lib.enableFeature gtk3Support "gtk3") + (lib.enableFeature qt5Support "qt5") + (lib.enableFeature withPython "python") + "--localstatedir=/var" + "--runstatedir=/run" + "--sysconfdir=/etc" + "--with-distro=none" + # A systemd unit is provided by the avahi-daemon NixOS module + "--with-systemdsystemunitdir=no" + ] ++ lib.optionals withLibdnssdCompat [ + "--enable-compat-libdns_sd" + ] ++ lib.optionals stdenv.isDarwin [ # autoipd won't build on darwin - ++ lib.optional stdenv.isDarwin "--disable-autoipd"; + "--disable-autoipd" + ]; - NIX_CFLAGS_COMPILE = "-DAVAHI_SERVICE_DIR=\"/etc/avahi/services\""; + installFlags = [ + # Override directories to install into the package. + # Replace with runstatedir once is merged https://github.com/lathiat/avahi/pull/377 + "avahi_runtime_dir=${placeholder "out"}/run" + "sysconfdir=${placeholder "out"}/etc" + ]; preBuild = lib.optionalString stdenv.isDarwin '' sed -i '20 i\ @@ -73,14 +104,10 @@ stdenv.mkDerivation rec { ''; postInstall = - # Maintain compat for mdnsresponder and howl + # Maintain compat for mdnsresponder lib.optionalString withLibdnssdCompat '' ln -s avahi-compat-libdns_sd/dns_sd.h "$out/include/dns_sd.h" ''; - /* # these don't exist (anymore?) - ln -s avahi-compat-howl $out/include/howl - ln -s avahi-compat-howl.pc $out/lib/pkgconfig/howl.pc - */ passthru.tests = { smoke-test = nixosTests.avahi; @@ -89,9 +116,9 @@ stdenv.mkDerivation rec { meta = with lib; { description = "mDNS/DNS-SD implementation"; - homepage = "http://avahi.org"; - license = licenses.lgpl2Plus; - platforms = platforms.unix; + homepage = "http://avahi.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; maintainers = with maintainers; [ lovek323 globin ]; longDescription = '' diff --git a/pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch b/pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch deleted file mode 100644 index 72965c9f02825..0000000000000 --- a/pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch +++ /dev/null @@ -1,12 +0,0 @@ -Don't "mkdir $(localstatedir)" since we can't do it (/var). - ---- a/avahi-daemon/Makefile.in -+++ b/avahi-daemon/Makefile.in -@@ -1625,7 +1625,6 @@ xmllint: - done - - install-data-local: -- test -z "$(avahi_runtime_dir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_runtime_dir)" - - update-systemd: - curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index b457331983aac..82be84e1f1dfd 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -17,6 +17,8 @@ , cairo , gnome , substituteAll +, buildPackages +, gobject-introspection-unwrapped , nixStoreDir ? builtins.storeDir , x11Support ? true }: @@ -67,7 +69,7 @@ stdenv.mkDerivation rec { docbook_xml_dtd_45 python3 setupHook # move .gir files - ]; + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ gobject-introspection-unwrapped ]; buildInputs = [ python3 @@ -86,7 +88,11 @@ stdenv.mkDerivation rec { "--datadir=${placeholder "dev"}/share" "-Ddoctool=disabled" "-Dcairo=disabled" - "-Dgtk_doc=true" + "-Dgtk_doc=${lib.boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-Dgi_cross_ldd_wrapper=${buildPackages.prelink}/bin/prelink-rtld" + "-Dgi_cross_use_prebuilt_gi=true" + "-Dgi_cross_binary_wrapper=${stdenv.hostPlatform.emulator buildPackages}" ]; doCheck = !stdenv.isAarch64; @@ -97,6 +103,10 @@ stdenv.mkDerivation rec { patchShebangs tools/* ''; + postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + cp -r ${buildPackages.gobject-introspection-unwrapped.devdoc} $devdoc + ''; + preCheck = '' # Our gobject-introspection patches make the shared library paths absolute # in the GIR files. When running tests, the library is not yet installed, @@ -122,7 +132,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A middleware layer between C libraries and language bindings"; homepage = "https://gi.readthedocs.io/"; - maintainers = teams.gnome.members ++ (with maintainers; [ lovek323 ]); + maintainers = teams.gnome.members ++ (with maintainers; [ lovek323 artturin ]); platforms = platforms.unix; license = with licenses; [ gpl2 lgpl2 ]; diff --git a/pkgs/development/libraries/gobject-introspection/wrapper.nix b/pkgs/development/libraries/gobject-introspection/wrapper.nix new file mode 100644 index 0000000000000..44d31540e6456 --- /dev/null +++ b/pkgs/development/libraries/gobject-introspection/wrapper.nix @@ -0,0 +1,29 @@ +{ lib +, stdenv +, buildPackages +, gobject-introspection-unwrapped +, targetPackages +}: + +# to build, run +# `nix build ".#pkgsCross.aarch64-multiplatform.buildPackages.gobject-introspection"` +gobject-introspection-unwrapped.overrideAttrs (_previousAttrs: { + pname = "gobject-introspection-wrapped"; + postFixup = '' + mv $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped + mv $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped + + ( + export bash="${buildPackages.bash}/bin/bash" + export emulator=${lib.escapeShellArg (stdenv.targetPlatform.emulator buildPackages)} + export buildprelink="${buildPackages.prelink}/bin/prelink-rtld" + + export targetgir="${lib.getDev targetPackages.gobject-introspection-unwrapped}" + + substituteAll "${./wrappers/g-ir-compiler.sh}" "$dev/bin/g-ir-compiler" + substituteAll "${./wrappers/g-ir-scanner.sh}" "$dev/bin/g-ir-scanner" + chmod +x "$dev/bin/g-ir-compiler" + chmod +x "$dev/bin/g-ir-scanner" + ) + ''; +}) diff --git a/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh b/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh new file mode 100644 index 0000000000000..fde3dcfe0c008 --- /dev/null +++ b/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh @@ -0,0 +1,4 @@ +#! @bash@ +# shellcheck shell=bash + +exec @emulator@ @targetgir@/bin/g-ir-compiler "$@" diff --git a/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh b/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh new file mode 100644 index 0000000000000..0825f10e166e9 --- /dev/null +++ b/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh @@ -0,0 +1,7 @@ +#! @bash@ +# shellcheck shell=bash + +exec @dev@/bin/.g-ir-scanner-wrapped \ + --use-binary-wrapper=@emulator@ \ + --use-ldd-wrapper=@buildprelink@ \ + "$@" diff --git a/pkgs/development/libraries/libaom/default.nix b/pkgs/development/libraries/libaom/default.nix index 3a3866911b8d9..f6921091bea86 100644 --- a/pkgs/development/libraries/libaom/default.nix +++ b/pkgs/development/libraries/libaom/default.nix @@ -1,4 +1,7 @@ -{ lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3 }: +{ lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3 +, enableButteraugli ? false, libjxl # Broken +, enableVmaf ? true, libvmaf +}: stdenv.mkDerivation rec { pname = "libaom"; @@ -16,6 +19,9 @@ stdenv.mkDerivation rec { yasm perl cmake pkg-config python3 ]; + propagatedBuildInputs = lib.optional enableButteraugli libjxl + ++ lib.optional enableVmaf libvmaf; + preConfigure = '' # build uses `git describe` to set the build version cat > $NIX_BUILD_TOP/git << "EOF" @@ -32,6 +38,10 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DENABLE_TESTS=OFF" + ] ++ lib.optionals enableButteraugli [ + "-DCONFIG_TUNE_BUTTERAUGLI=1" + ] ++ lib.optionals enableVmaf [ + "-DCONFIG_TUNE_VMAF=1" ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ # CPU detection isn't supported on Darwin and breaks the aarch64-darwin build: "-DCONFIG_RUNTIME_CPU_DETECT=0" @@ -58,7 +68,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://aomedia.org/av1-features/get-started/"; changelog = "https://aomedia.googlesource.com/aom/+/refs/tags/v${version}/CHANGELOG"; - maintainers = with maintainers; [ primeos kiloreux ]; + maintainers = with maintainers; [ primeos kiloreux dandellion ]; platforms = platforms.all; license = licenses.bsd2; }; diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index e08a467324801..90963cf516b24 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "libdrm"; - version = "2.4.110"; + version = "2.4.111"; src = fetchurl { url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0dwpry9m5l27dlhq48j4bsiqwm0247cxdqwv3b7ddmkynk2f9kpf"; + sha256 = "1adjg96mz0ghjzsgp9hrdr622shrvqmjcz5sxksfcka2fx7idmqs"; }; outputs = [ "out" "dev" "bin" ]; diff --git a/pkgs/development/libraries/libjxl/default.nix b/pkgs/development/libraries/libjxl/default.nix index 049d79c7025eb..2017fc66d7033 100644 --- a/pkgs/development/libraries/libjxl/default.nix +++ b/pkgs/development/libraries/libjxl/default.nix @@ -1,10 +1,7 @@ { stdenv, lib, fetchFromGitHub , fetchpatch -, asciidoc , brotli , cmake -, graphviz -, doxygen , giflib , gperftools , gtest @@ -14,8 +11,12 @@ , libwebp , openexr , pkg-config -, python3 , zlib +, buildDocs ? true +, asciidoc +, graphviz +, doxygen +, python3 }: stdenv.mkDerivation rec { @@ -50,13 +51,14 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ - asciidoc # for docs cmake - graphviz # for docs via doxygen component `dot` - doxygen # for docs gtest pkg-config - python3 # for docs + ] ++ lib.optionals buildDocs [ + asciidoc + graphviz + doxygen + python3 ]; # Functionality not currently provided by this package @@ -76,10 +78,8 @@ stdenv.mkDerivation rec { # conclusively in its README or otherwise; they can best be determined # by checking the CMake output for "Could NOT find". buildInputs = [ - brotli giflib gperftools # provides `libtcmalloc` - libhwy libjpeg libpng libwebp @@ -87,6 +87,11 @@ stdenv.mkDerivation rec { zlib ]; + propagatedBuildInputs = [ + brotli + libhwy + ]; + cmakeFlags = [ # For C dependencies like brotli, which are dynamically linked, # we want to use the system libraries, so that we don't have to care about diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index fe097b6c66772..91e0033cd2746 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { pname = "librsvg"; - version = "2.54.3"; + version = "2.54.4"; outputs = [ "out" "dev" "installedTests" ] ++ lib.optionals withIntrospection [ "devdoc" @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "ZhWPLvRt3iYAJoRsTaEC5KndTlKTAQ8wlJxswm3W7+g="; + sha256 = "6hUqJD9qQ8DgNqKMcN4/y83qVmTGgRx4WSvCKezCSDM="; }; cargoVendorDir = "vendor"; diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix index fbc8a026af593..7cea80696a923 100644 --- a/pkgs/development/libraries/libseccomp/default.nix +++ b/pkgs/development/libraries/libseccomp/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libseccomp"; - version = "2.5.3"; + version = "2.5.4"; src = fetchurl { url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz"; - sha256 = "sha256-WQZchzM2RyXpchukjDqZu8Uq+SHa9I30seAS+8exCnY="; + sha256 = "sha256-2CkCQAQFzwBoV07z3B/l9ZJiB1Q7oa5vjnoVdjUdy9s="; }; outputs = [ "out" "lib" "dev" "man" "pythonsrc" ]; diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix index 5c632009beef0..ca7feb996f7ec 100644 --- a/pkgs/development/libraries/libxkbcommon/default.nix +++ b/pkgs/development/libraries/libxkbcommon/default.nix @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { pname = "libxkbcommon"; - version = "1.4.0"; + version = "1.4.1"; src = fetchurl { url = "https://xkbcommon.org/download/${pname}-${version}.tar.xz"; - sha256 = "0ca00awfzvxiznvd4mgwgxyqxiwvi07j5xxmg5z0l47rcd9fqv0h"; + sha256 = "0fbb2dyjvf71p42y2jmwdcylsvj03w52f5rb23c2d00rwahhfg4l"; }; outputs = [ "out" "dev" "doc" ]; diff --git a/pkgs/development/python-modules/hatchling/default.nix b/pkgs/development/python-modules/hatchling/default.nix index 6385b32a48cfe..d2d212f5417f9 100644 --- a/pkgs/development/python-modules/hatchling/default.nix +++ b/pkgs/development/python-modules/hatchling/default.nix @@ -15,13 +15,12 @@ , build , python , requests -, toml , virtualenv }: let pname = "hatchling"; - version = "0.25.0"; + version = "1.0.0"; in buildPythonPackage { inherit pname version; @@ -29,7 +28,7 @@ buildPythonPackage { src = fetchPypi { inherit pname version; - hash = "sha256-k/bjZvGaOjZshVr6w3Jb7XaC1dAOlIaraFQKCth2ZII="; + sha256 = "d235a5fa8aff89e8d9d6d4033594aa4c3bc00ec5e31d3e80c153bfcf951b4f98"; }; # listed in backend/src/hatchling/ouroboros.py @@ -38,9 +37,10 @@ buildPythonPackage { packaging pathspec pluggy - tomli ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli ]; pythonImportsCheck = [ @@ -56,7 +56,6 @@ buildPythonPackage { build packaging requests - toml virtualenv ]; @@ -72,7 +71,7 @@ buildPythonPackage { meta = with lib; { description = "Modern, extensible Python build backend"; - homepage = "https://ofek.dev/hatch/latest/"; + homepage = "https://hatch.pypa.io/latest/"; license = licenses.mit; maintainers = with maintainers; [ hexa ofek ]; }; diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index 1d9592022d16f..772d9c79c2b11 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -1,6 +1,7 @@ { stdenv , buildPythonPackage , fetchFromGitHub +, fetchpatch , python , bootstrapped-pip , lib @@ -27,6 +28,14 @@ let patches = [ ./tag-date.patch ./setuptools-distutils-C++.patch + # Use sysconfigdata to find headers. Fixes cross-compilation of extension modules. + # https://github.com/pypa/distutils/pull/145 + (fetchpatch { + url = "https://github.com/pypa/distutils/commit/aed7294b7b0c228cc0666a8b04f2959bf310ab57.patch"; + hash = "sha256-/9+TKv0nllBfnj48zcXLrOgyBj52dBIVbrpnIaQ4O84="; + stripLen = 2; + extraPrefix = "setuptools/_distutils/"; + }) ]; buildPhase = '' diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix index 6f631045f00cc..e602339303f70 100644 --- a/pkgs/development/tools/analysis/valgrind/default.nix +++ b/pkgs/development/tools/analysis/valgrind/default.nix @@ -20,6 +20,20 @@ stdenv.mkDerivation rec { url = "https://bugsfiles.kde.org/attachment.cgi?id=148912"; sha256 = "Za+7K93pgnuEUQ+jDItEzWlN0izhbynX2crSOXBBY/I="; }) + # Fix build on armv7l. + # https://bugs.kde.org/show_bug.cgi?id=454346 + (fetchpatch { + url = "https://bugsfiles.kde.org/attachment.cgi?id=149172"; + sha256 = "sha256-4MASLsEK8wcshboR4YOc6mIt7AvAgDPvqIZyHqlvTEs="; + }) + (fetchpatch { + url = "https://bugsfiles.kde.org/attachment.cgi?id=149173"; + sha256 = "sha256-jX9hD4utWRebbXMJYZ5mu9jecvdrNP05E5J+PnKRTyQ="; + }) + (fetchpatch { + url = "https://bugsfiles.kde.org/attachment.cgi?id=149174"; + sha256 = "sha256-f1YIFIhWhXYVw3/UNEWewDak2mvbAd3aGzK4B+wTlys="; + }) ]; outputs = [ "out" "dev" "man" "doc" ]; diff --git a/pkgs/development/tools/build-managers/meson/emulator-hook.sh b/pkgs/development/tools/build-managers/meson/emulator-hook.sh new file mode 100644 index 0000000000000..4f08087cf5f55 --- /dev/null +++ b/pkgs/development/tools/build-managers/meson/emulator-hook.sh @@ -0,0 +1,5 @@ +add_meson_exe_wrapper_cross_flag() { + mesonFlagsArray+=(--cross-file=@crossFile@) +} + +preConfigureHooks+=(add_meson_exe_wrapper_cross_flag) diff --git a/pkgs/development/tools/misc/prelink/default.nix b/pkgs/development/tools/misc/prelink/default.nix index 2fbee4ca5f527..384829daadf09 100644 --- a/pkgs/development/tools/misc/prelink/default.nix +++ b/pkgs/development/tools/misc/prelink/default.nix @@ -1,22 +1,54 @@ -{ lib, stdenv, fetchurl, libelf }: +{ stdenv +, lib +, fetchgit +, autoreconfHook +, libelf +, libiberty +}: stdenv.mkDerivation rec { pname = "prelink"; - version = "20130503"; + version = "unstable-2019-06-24"; + + src = fetchgit { + url = "https://git.yoctoproject.org/git/prelink-cross"; + branchName = "cross_prelink"; + rev = "f9975537dbfd9ade0fc813bd5cf5fcbe41753a37"; + sha256 = "sha256-O9/oZooLRyUBBZX3SFcB6LFMmi2vQqkUlqtZnrq5oZc="; + }; + + strictDeps = true; + + configurePlatforms = [ "build" "host" ]; + + nativeBuildInputs = [ + autoreconfHook + ]; buildInputs = [ - libelf stdenv.cc.libc (lib.getOutput "static" stdenv.cc.libc) + stdenv.cc.libc + libelf + libiberty ]; - src = fetchurl { - url = "https://people.redhat.com/jakub/prelink/prelink-${version}.tar.bz2"; - sha256 = "1w20f6ilqrz8ca51qhrn1n13h7q1r34k09g33d6l2vwvbrhcffb3"; - }; + # Disable some tests because they're failing + preCheck = '' + for f in reloc2 layout1 unprel1 tls3 cxx2 cxx3 quick1 quick2 deps1 deps2; do + echo '#' > testsuite/''${f}.sh + done + patchShebangs --build testsuite + ''; + + # most tests fail + doCheck = !stdenv.isAarch64; + + enableParallelBuilding = true; - meta = { - homepage = "https://people.redhat.com/jakub/prelink/"; - license = "GPL"; + meta = with lib;{ description = "ELF prelinking utility to speed up dynamic linking"; - platforms = lib.platforms.linux; + homepage = "https://wiki.yoctoproject.org/wiki/Cross-Prelink"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ artturin ]; }; } diff --git a/pkgs/development/tools/rust/cbindgen/default.nix b/pkgs/development/tools/rust/cbindgen/default.nix index 555ed3a080d97..61553ffad86f2 100644 --- a/pkgs/development/tools/rust/cbindgen/default.nix +++ b/pkgs/development/tools/rust/cbindgen/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "rust-cbindgen"; - version = "0.24.2"; + version = "0.24.3"; src = fetchFromGitHub { owner = "eqrion"; repo = "cbindgen"; rev = "v${version}"; - hash = "sha256-7nl2VHw4l0hUVLs4fAnmkVaxTFRe3OcUwHXMqf/cH40="; + hash = "sha256-v5g6/ul6mJtzC4O4WlNopPtFUSbx2Jv79mZL72mucws="; }; - cargoSha256 = "sha256:0q99vy5k57phi80viqhkw8cyw7kglap1yf6m8n25n4knf7z9l119"; + cargoSha256 = "sha256-j3/2cFjSDkx0TXCaxYSCLrBbAHrJfJ6hwBcXlDedwh8="; buildInputs = lib.optional stdenv.isDarwin Security; diff --git a/pkgs/os-specific/linux/fuse/default.nix b/pkgs/os-specific/linux/fuse/default.nix index b1d9d3dc41ef8..6aa3e46d4e1ae 100644 --- a/pkgs/os-specific/linux/fuse/default.nix +++ b/pkgs/os-specific/linux/fuse/default.nix @@ -11,7 +11,7 @@ in { }; fuse_3 = mkFuse { - version = "3.10.5"; - sha256Hash = "1yxh85m8fnn3w21f6g6vza7k2giizmyhcbkms4rmkcd2dd2rzk3y"; + version = "3.11.0"; + sha256Hash = "1wx80xxlvjn0wxhmkr1g91vwrgxssyzds1hizzxc2xrd4kjh9dfb"; }; } diff --git a/pkgs/test/make-binary-wrapper/add-flags.c b/pkgs/test/make-binary-wrapper/add-flags.c index 7ce682c6be647..3ae8678d4421a 100644 --- a/pkgs/test/make-binary-wrapper/add-flags.c +++ b/pkgs/test/make-binary-wrapper/add-flags.c @@ -3,7 +3,7 @@ #include <assert.h> int main(int argc, char **argv) { - char **argv_tmp = calloc(5 + argc, sizeof(*argv_tmp)); + char **argv_tmp = calloc(4 + argc + 2 + 1, sizeof(*argv_tmp)); assert(argv_tmp != NULL); argv_tmp[0] = argv[0]; argv_tmp[1] = "-x"; @@ -13,7 +13,9 @@ int main(int argc, char **argv) { for (int i = 1; i < argc; ++i) { argv_tmp[4 + i] = argv[i]; } - argv_tmp[4 + argc] = NULL; + argv_tmp[4 + argc + 0] = "-foo"; + argv_tmp[4 + argc + 1] = "-bar"; + argv_tmp[4 + argc + 2] = NULL; argv = argv_tmp; argv[0] = "/send/me/flags"; diff --git a/pkgs/test/make-binary-wrapper/add-flags.cmdline b/pkgs/test/make-binary-wrapper/add-flags.cmdline index f840c772e3494..f42d26f3adf0e 100644 --- a/pkgs/test/make-binary-wrapper/add-flags.cmdline +++ b/pkgs/test/make-binary-wrapper/add-flags.cmdline @@ -1,2 +1,3 @@ + --append-flags "-foo -bar" \ --add-flags "-x -y -z" \ --add-flags -abc diff --git a/pkgs/test/make-binary-wrapper/add-flags.env b/pkgs/test/make-binary-wrapper/add-flags.env index 9b8d1fb9f6a5d..3626b8cf97b06 100644 --- a/pkgs/test/make-binary-wrapper/add-flags.env +++ b/pkgs/test/make-binary-wrapper/add-flags.env @@ -4,3 +4,5 @@ SUBST_ARGV0 -y -z -abc +-foo +-bar diff --git a/pkgs/test/make-binary-wrapper/combination.c b/pkgs/test/make-binary-wrapper/combination.c index e9ce5f1d72440..8ce8a4722a0b8 100644 --- a/pkgs/test/make-binary-wrapper/combination.c +++ b/pkgs/test/make-binary-wrapper/combination.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) { set_env_suffix("PATH", ":", "/usr/local/bin/"); putenv("MESSAGE2=WORLD"); - char **argv_tmp = calloc(4 + argc, sizeof(*argv_tmp)); + char **argv_tmp = calloc(3 + argc + 0 + 1, sizeof(*argv_tmp)); assert(argv_tmp != NULL); argv_tmp[0] = argv[0]; argv_tmp[1] = "-x"; @@ -45,7 +45,7 @@ int main(int argc, char **argv) { for (int i = 1; i < argc; ++i) { argv_tmp[3 + i] = argv[i]; } - argv_tmp[3 + argc] = NULL; + argv_tmp[3 + argc + 0] = NULL; argv = argv_tmp; argv[0] = "my-wrapper"; diff --git a/pkgs/test/make-wrapper/default.nix b/pkgs/test/make-wrapper/default.nix index 62ccd272adf47..5cc7cee5a864b 100644 --- a/pkgs/test/make-wrapper/default.nix +++ b/pkgs/test/make-wrapper/default.nix @@ -62,7 +62,7 @@ runCommand "make-wrapper-test" (mkWrapperBinary { name = "test-unset"; args = [ "--unset" "VAR" ]; }) (mkWrapperBinary { name = "test-run"; args = [ "--run" "echo bar" ]; }) (mkWrapperBinary { name = "test-run-and-set"; args = [ "--run" "export VAR=foo" "--set" "VAR" "bar" ]; }) - (mkWrapperBinary { name = "test-args"; args = [ "--add-flags" "abc" ]; wrapped = wrappedBinaryArgs; }) + (mkWrapperBinary { name = "test-args"; args = [ "--add-flags" "abc" "--append-flags" "xyz" ]; wrapped = wrappedBinaryArgs; }) (mkWrapperBinary { name = "test-prefix"; args = [ "--prefix" "VAR" ":" "abc" ]; }) (mkWrapperBinary { name = "test-prefix-noglob"; args = [ "--prefix" "VAR" ":" "./*" ]; }) (mkWrapperBinary { name = "test-suffix"; args = [ "--suffix" "VAR" ":" "abc" ]; }) @@ -89,10 +89,10 @@ runCommand "make-wrapper-test" # --unset works + mkTest "VAR=foo test-unset" "VAR=" - # --add-flags works - + mkTest "test-args" "abc" - # given flags are appended - + mkTest "test-args foo" "abc foo" + # --add-flags and --append-flags work + + mkTest "test-args" "abc xyz" + # given flags are kept + + mkTest "test-args foo" "abc foo xyz" # --run works + mkTest "test-run" "bar\nVAR=" diff --git a/pkgs/tools/filesystems/f2fs-tools/default.nix b/pkgs/tools/filesystems/f2fs-tools/default.nix index df4d2e44e51b6..f7de571dc099f 100644 --- a/pkgs/tools/filesystems/f2fs-tools/default.nix +++ b/pkgs/tools/filesystems/f2fs-tools/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "f2fs-tools"; - version = "1.14.0"; + version = "1.15.0"; src = fetchgit { url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git"; rev = "refs/tags/v${version}"; - sha256 = "06ss05n87i1c3149qb3n7j1qp2scv3g2adx0v6ljkl59ab9b5saj"; + sha256 = "sha256-RSWvdC6kV0KfyJefK9qyFCWjlezFc7DBOOn+uy7S3Lk="; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 9b982f2c2eac5..eb14a4a714249 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -7,14 +7,14 @@ stdenv.mkDerivation rec { pname = "file"; - version = "5.41"; + version = "5.42"; src = fetchurl { urls = [ - "ftp://ftp.astron.com/pub/file/${pname}-${version}.tar.gz" + "https://astron.com/pub/file/${pname}-${version}.tar.gz" "https://distfiles.macports.org/file/${pname}-${version}.tar.gz" ]; - sha256 = "sha256-E+Uyx7Nk99V+I9/uoxRxAxUMuQWTpXr4bBDk9uQRYD8="; + sha256 = "sha256-wHb7TQKcdAc/FcQzYe9XLPuGhAfTRxkLqDSvOxY5sOQ="; }; strictDeps = true; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index b92fb23d64e58..cf1c7f717e664 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -43,11 +43,11 @@ stdenv.mkDerivation rec { pname = "unbound"; - version = "1.14.0"; + version = "1.16.0"; src = fetchurl { url = "https://nlnetlabs.nl/downloads/unbound/unbound-${version}.tar.gz"; - sha256 = "sha256-bvkcvwLVKZ6rOTKMCFc5Pee0iFov5yM93+PBJP9aicg="; + hash = "sha256-ZwFTTJOOsBliZgEZHtxtAS/FNMCdJBjVuSgn2wy+SKU="; }; 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 a99c40a8531ce..5b46288bee896 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3971,6 +3971,24 @@ with pkgs; meson = callPackage ../development/tools/build-managers/meson { }; + # while building documentation meson may want to run binaries for host + # which needs an emulator + # example of an error which this fixes + # [Errno 8] Exec format error: './gdk3-scan' + mesonEmulatorHook = + if (stdenv.buildPlatform != stdenv.targetPlatform) then + makeSetupHook + { + name = "mesonEmulatorHook"; + substitutions = { + crossFile = writeText "cross-file.conf" '' + [binaries] + exe_wrapper = ${lib.escapeShellArg (stdenv.targetPlatform.emulator buildPackages)} + ''; + }; + } ../development/tools/build-managers/meson/emulator-hook.sh + else throw "mesonEmulatorHook has to be in a cross conditional i.e. (stdenv.buildPlatform != stdenv.hostPlatform)"; + meson-tools = callPackage ../misc/meson-tools { }; metabase = callPackage ../servers/metabase { }; @@ -17646,7 +17664,10 @@ with pkgs; gns3-gui = gns3Packages.guiStable; gns3-server = gns3Packages.serverStable; - gobject-introspection = callPackage ../development/libraries/gobject-introspection { + gobject-introspection = if (stdenv.hostPlatform != stdenv.targetPlatform) + then callPackage ../development/libraries/gobject-introspection/wrapper.nix { } else gobject-introspection-unwrapped; + + gobject-introspection-unwrapped = callPackage ../development/libraries/gobject-introspection { nixStoreDir = config.nix.storeDir or builtins.storeDir; inherit (darwin) cctools; }; @@ -18255,7 +18276,10 @@ with pkgs; libantlr3c = callPackage ../development/libraries/libantlr3c {}; - libaom = callPackage ../development/libraries/libaom { }; + libaom = callPackage ../development/libraries/libaom { + # Remove circular dependency for libavif + libjxl = libjxl.override { buildDocs = false; }; + }; libappindicator-gtk2 = libappindicator.override { gtkVersion = "2"; }; libappindicator-gtk3 = libappindicator.override { gtkVersion = "3"; }; |