Skip to content

Fix Nix outdated glibc <3 - #201

Merged
Inrixia merged 1 commit into
Inrixia:masterfrom
meowarex:master
Oct 12, 2026
Merged

Inrixia merged 1 commit into
Inrixia:masterfrom
meowarex:master

Conversation

@meowarex

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 15:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The coordinated lockfile, fetcher, hash, and documentation updates are consistent and complete.

0 open findings

What changed in this PR

Updates Nix dependencies and consumer guidance to avoid outdated glibc incompatibilities.

Changes:

  • Updates the pinned nixpkgs revision.
  • Migrates pnpm dependency fetching to version 4.
  • Documents following the consumer’s nixpkgs input.
File Description
README.md Documents nixpkgs input following.
flake.lock Updates the pinned nixpkgs revision.
nix/​injection-linux.nix Updates Linux pnpm dependency fetching.
nix/​injection-darwin.nix Updates macOS pnpm dependency fetching.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

Flake Review Results for #201

Available systems: aarch64-darwin, aarch64-linux, armv6l-linux, armv7l-linux, i686-linux, powerpc64le-linux, riscv64-linux, x86_64-darwin, x86_64-freebsd, x86_64-linux
Requested systems: x86_64-linux

🔄 Modified (1)

  • ✅ packages.x86_64-linux.default

    • Output: /nix/store/83ag8bkn5b2v8vv4a6fl2kcw265v6jjl-tidal-hifi-8.1.3
    Derivation diff
    - /nix/store/bndq5sn01adma0kj26afagm99hqjsypb-tidal-hifi-6.3.1-Mavy.drv:{out}
    + /nix/store/h1pa89s4y72fczkzr8b6g611ndja6y52-tidal-hifi-8.1.3.drv:{out}
    • The builders do not match
        - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
        + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
    • The set of input derivation names do not match:
        - alsa-lib-1.2.15.3
        - at-spi2-core-2.58.3
        - bash-5.3p9
        - castlabs-electron-40.7.0
        - cups-2.4.16
        - expat-2.7.5
        - gcc-15.2.0
        - gdk-pixbuf-2.44.5
        - glib-2.86.3
        - gtk4-4.20.3
        - libdrm-2.4.131
        - libxkbcommon-1.13.1
        - libxkbfile-1.1.3
        - mesa-libgbm-26.0.3
        - nodejs-24.14.1
        - nspr-4.38.2
        - nss-3.112.3
        - pango-1.57.0
        - pciutils-3.14.0
        - pipewire-1.6.3
        - python3-3.13.12
        - systemd-260.1
        - tidal-hifi-6.3.1-Mavy-npm-deps
        - vulkan-loader-1.4.341.0
        + alsa-lib-1.2.16.1
        + at-spi2-core-2.60.6
        + bash-5.3p15
        + castlabs-electron-43.0.0
        + cups-2.4.19
        + expat-2.8.5
        + gcc-16.2.0
        + gdk-pixbuf-2.44.8
        + glib-2.88.3
        + gtk4-4.22.4
        + libdrm-2.4.134
        + libxkbcommon-1.13.2
        + libxkbfile-1.2.0
        + mesa-libgbm-26.1.3
        + nodejs-24.21.0
        + nspr-4.40
        + nss-3.112.5
        + pango-1.57.1
        + pciutils-3.15.0
        + pipewire-1.6.9
        + python3-3.14.7
        + systemd-261.3
        + tidal-hifi-8.1.3-npm-deps
        + vulkan-loader-1.4.357.0
    • The input derivation named `TidaLuna-1.17.1-beta` differs
      - /nix/store/1b3sd82b0kdavmcmr0dhdd0l6fpiv3lc-TidaLuna-1.17.1-beta.drv:{out}
      + /nix/store/mk4pa2swwa21yjkxc3mr2fk6xrxz5db7-TidaLuna-1.17.1-beta.drv:{out}
      • The builders do not match
          - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
          + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
      • The set of input source names do not match:
          - qbhk3m237mc096bph5f8dmxzgqsxd8km-source
          + iysb59nlysmik0ap5mi68dwjka91l1jd-source
      • The set of input derivation names do not match:
          - bash-5.3p9
          - nodejs-24.14.1
          - pnpm-10.33.4
          + bash-5.3p15
          + nodejs-24.21.0
          + pnpm-12.9.0
      • The input derivation named `TidaLuna-pnpm-deps` differs
        - /nix/store/bqbafzr0mfv0b5vh2ii6sijpv69260w3-TidaLuna-pnpm-deps.drv:{out}
        + /nix/store/72sny3l6riv2slhnvh72w6fsmkyq7cfk-TidaLuna-pnpm-deps.drv:{out}
        • The builders do not match
            - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
            + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
        • The set of input source names do not match:
            - qbhk3m237mc096bph5f8dmxzgqsxd8km-source
            + iysb59nlysmik0ap5mi68dwjka91l1jd-source
        • The set of input derivation names do not match:
            - bash-5.3p9
            - jq-1.8.1
            - nss-cacert-3.121
            - pnpm-10.33.4
            - python3.13-yq-3.4.3
            - stdenv-linux
            + bash-5.3p15
            + jq-1.8.2
            + nodejs-slim-24.21.0
            + nss-cacert-3.126
            + pnpm-12.9.0
            + pnpm-fixup-state-db-1.0.0
            + python3.14-yq-3.4.3
            + sqlite-3.53.3
            + stdenv-linux-no-cc
            + writable-tmpdir-as-home-hook
        • The input derivation named `moreutils-0.70` differs
          - /nix/store/rbh3zyacbqaq8ggyxnyg9qkdpdj7nb52-moreutils-0.70.drv:{out}
          + /nix/store/d0fq21lm7qv9yz5bb6mqw1s0r4fr9nr3-moreutils-0.70.drv:{out}
          • The builders do not match
              - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
              + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
          • The set of input derivation names do not match:
              - bash-5.3p9
              - libxml2-2.15.1
              - perl-5.42.0
              - perl-5.42.0-env
              + bash-5.3p15
              + gcc-wrapper-16.2.0
              + libxml2-2.15.4
              + perl-5.42.3
              + perl-5.42.3-env
          • The input derivation named `docbook-xml-4.4` differs
            - /nix/store/pwisvc6d7dg4hr19998i9zp2islx4k1s-docbook-xml-4.4.drv:{out}
            + /nix/store/shn4i7ksq0rdq3p4xrp3v4ncav3128sk-docbook-xml-4.4.drv:{out}
            • The builders do not match
                - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
                + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
            • The set of input derivation names do not match:
                - bash-5.3p9
                + bash-5.3p15
            • The input derivation named `docbook-xml-4.4.zip` differs
              - /nix/store/z13l24bbx7m07b9gka638z795ih626c6-docbook-xml-4.4.zip.drv:{out}
              + /nix/store/g0pi6s1yz0rp6scx2x9s4cyjymww373p-docbook-xml-4.4.zip.drv:{out}
              • The builders do not match
                  - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
                  + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
              • The arguments do not match
                  • -e
                  • /nix/store/l622p70vy8k5sh7y5wizi5f2mic6ynpg-source-stdenv.sh
                  - /nix/store/vvlgjnnch92k53af32iwim3d7jdxai3y-builder.sh
                  + /nix/store/1fsaxrzl5qrycwbcgvs38sz86f07ymwd-builder.sh
              • The set of input source names do not match:
                  + mirrors-list
              • The input source named `builder.sh` differs
                  ''
                  source "$NIX_ATTRS_SH_FILE"
                  source $mirrorsFile
                  
                  source "$NIX_ATTRS_SH_FILE"
                  
                  # This file will bring variables of the form "_mirror_<mirrorname>" into scope.
                  # DO NOT USE the "_mirror" prefix for variables in this script to avoid
                  # accidentally clobbering them.
                  source "$mirrorsListFile"
                  
                  # Normalize `curlOpts` as a string.
                  # If defined as a list (deprecated), it would be a bash array.
                  if [[ "$(declare -p curlOpts 2&>/dev/null || true)" =~ ^"declare -a" ]]; then
                      unset _temp
                      _temp="${curlOpts[*]}"
                      unset curlOpts
                      curlOpts=$_temp
                      unset _temp
                  fi
                  
                  curlVersion=$(curl -V | head -1 | cut -d' ' -f2)
                  
                  # Curl flags to handle redirects, not use EPSV, handle cookies for
                  # servers to need them during redirects, and work on SSL without a
                  # certificate (this isn't a security problem because we check the
                  # cryptographic hash of the output anyway).
                  curl=(
                      curl
                      --location
                      --max-redirs 20
                      --retry 3
                      --retry-all-errors
                      --continue-at -
                      --disable-epsv
                      --cookie-jar cookies
                      --user-agent "curl/$curlVersion Nixpkgs/$nixpkgsVersion"
                  )
                  
                  if ! [ -f "$SSL_CERT_FILE" ]; then
                      curl+=(--insecure)
                  fi
                  
                  # NOTE:
                  # `netrcPhase` should not attempt to access builder.sh implementation details (e.g., the `${curl[@]}` array),
                  # The implementation detail could change in any Nixpkgs revision, including backports.
                  if [[ -n "${netrcPhase-}" ]]; then
                      runPhase netrcPhase
                      curl+=(--netrc-file "$PWD/netrc")
                  fi
                  
                  curl+=(
                      "${curlOptsList[@]}"
                      $curlOpts
                      $NIX_CURL_FLAGS
                  )
                  
                  curl+=("${curlOptsList[@]}")
                  concatTo curl curlOpts NIX_CURL_FLAGS
                  
                  downloadedFile="$out"
                  if [ -n "$downloadToTemp" ]; then downloadedFile="$TMPDIR/file"; fi
                  
                  tryDownload() {
                      local url="$1"
                      local target="$2"
                      echo
                      echo "trying $url"
                      local curlexit=18;
                  
                      success=
                  
                      # if we get error code 18, resume partial download
                      while [ $curlexit -eq 18 ]; do
                      while [ "$curlexit" -eq 18 ]; do
                         # keep this inside an if statement, since on failure it doesn't abort the script
                         if "${curl[@]}" -C - --fail "$url" --output "$target"; then
                         if "${curl[@]}" -C - --fail "$url" --output "$target" 2> >(tr '\r' '\n'); then
                            success=1
                            break
                         else
                            curlexit=$?;
                         fi
                      done
                  }
                  
                  
                  finish() {
                      local skipPostFetch="$1"
                  
                      set +o noglob
                  
                      if [[ $executable == "1" ]]; then
                        chmod +x $downloadedFile
                      if [[ "$executable" == "1" ]]; then
                        chmod +x "$downloadedFile"
                      fi
                  
                      if [ -z "$skipPostFetch" ]; then
                          runHook postFetch
                      fi
                  
                      exit 0
                  }
                  
                  
                  tryHashedMirrors() {
                      # The hashed mirrors are stored in the mirrorsListFile,
                      # so we have to use the "_mirror_" prefix, the same as for any other mirror
                      if test -n "$NIX_HASHED_MIRRORS"; then
                          hashedMirrors="$NIX_HASHED_MIRRORS"
                          IFS=' ' read -r -a _mirror_hashedMirrors <<< "$NIX_HASHED_MIRRORS"
                      fi
                  
                      for mirror in $hashedMirrors; do
                          url="$mirror/$outputHashAlgo/$outputHash"
                      local mirror
                      for mirror in "${_mirror_hashedMirrors[@]}"; do
                          local url="$mirror/$outputHashAlgo/$outputHash"
                          if "${curl[@]}" --retry 0 --connect-timeout "${NIX_CONNECT_TIMEOUT:-15}" \
                              --fail --silent --show-error --head "$url" \
                              --write-out "%{http_code}" --output /dev/null > code 2> log; then
                              # Directly download to $out, because postFetch doesn't need to run,
                              # since hashed mirrors provide pre-built derivation outputs.
                              tryDownload "$url" "$out"
                  
                              # We skip postFetch here, because hashed-mirrors are
                              # already content addressed. So if $outputHash is in the
                              # hashed-mirror, changes from ‘postFetch’ would already be
                              # made. So, running postFetch will end up applying the
                              # change /again/, which we don’t want.
                              if test -n "$success"; then finish skipPostFetch; fi
                          else
                              # Be quiet about 404 errors, which we interpret as the file
                              # not being present on this particular mirror.
                              if test "$(cat code)" != 404; then
                                  echo "error checking the existence of $url:"
                                  cat log
                              fi
                          fi
                      done
                  }
                  
                  
                  # URL list may contain ?. No glob expansion for that, please
                  set -o noglob
                  
                  resolvedUrls=()
                  for url in "${urls[@]}"; do
                      if test "${url:0:9}" != "mirror://"; then
                          resolvedUrls+=("$url")
                      else
                          url2="${url:9}"; echo "${url2/\// }" > split; read site fileName < split
                          #varName="mirror_$site"
                          varName="$site" # !!! danger of name clash, fix this
                          if test -z "${!varName}"; then
                              echo "warning: unknown mirror:// site \`$site'"
                  resolvedUrls=()
                  
                  _resolveUrls() {
                      local url
                      for url in "${urls[@]}"; do
                          # Direct URL: just add it and we're done
                          if test "${url:0:9}" != "mirror://"; then
                              resolvedUrls+=("${url}")
                              continue
                          fi
                  
                          # Try to get appropriate mirrors via the sourced mirrorsListFile or
                          # environment variable NIX_MIRROR_site
                          # Start by looking for mirror:// and splitting everything after that
                          # into a site and a path - the site part should lead us to an array
                          # with the URLs, or the appropriate env variable
                          if ! [[ "$url" =~ ^mirror://([^/ ]+)[/]([^ ]+)$ ]]; then
                            echo "error: fetchurl: $name: invalid mirror:// URL format: $url" >&2
                            exit 1
                          fi
                          local site="${BASH_REMATCH[1]}"
                          local filePath="${BASH_REMATCH[2]}"
                  
                          # The name of the array containing mirrors for site
                          local varName="_mirror_${site}"
                          # Needed to iterate over the array using an indirect reference
                          local arrName="${varName}[@]"
                          # The environment variable that can potentially override the mirrors
                          local envVarName="NIX_MIRRORS_${site}"
                  
                          local mirrorUrls
                          if test -v "${arrName}"; then
                              if test -n "${!envVarName}"; then
                                  echo "resolving url via NIX_MIRRORS_${site}"
                                  IFS=' ' read -r -a mirrorUrls <<< "${!envVarName}"
                              else
                                  mirrorUrls=("${!arrName}")
                              fi
                          else
                              mirrors=${!varName}
                  
                              # Allow command-line override by setting NIX_MIRRORS_$site.
                              varName="NIX_MIRRORS_$site"
                              if test -n "${!varName}"; then mirrors="${!varName}"; fi
                  
                              for url3 in $mirrors; do
                                  resolvedUrls+=("$url3$fileName");
                              done
                          fi
                      fi
                  done
                  
                              echo "warning: unknown mirror:// site \`${site}'"
                              continue
                          fi
                  
                          local mirrorUrl
                          for mirrorUrl in "${mirrorUrls[@]}"; do
                              resolvedUrls+=("${mirrorUrl}${filePath}");
                          done
                      done
                  }
                  
                  _resolveUrls
                  
                  # Restore globbing settings
                  set +o noglob
                  
                  if test -n "$showURLs"; then
                      echo "${resolvedUrls[*]}" > $out
                      echo "${resolvedUrls[*]}" > "$out"
                      exit 0
                  fi
                  
                  if test -n "$preferHashedMirrors"; then
                      tryHashedMirrors
                  fi
                  
                  # URL list may contain ?. No glob expansion for that, please
                  set -o noglob
                  
                  success=
                  for url in "${resolvedUrls[@]}"; do
                      if [ -z "$postFetch" ]; then
                         case "$url" in
                             https://github.com/*/archive/*)
                                 echo "warning: archives from GitHub revisions should use fetchFromGitHub"
                                 ;;
                             https://gitlab.com/*/-/archive/*)
                                 echo "warning: archives from GitLab revisions should use fetchFromGitLab"
                                 ;;
                             *)
                                 ;;
                         esac
                      fi
                      tryDownload "$url" "$downloadedFile"
                      if test -n "$success"; then finish; fi
                  done
                  
                  # Restore globbing settings
                  set +o noglob
                  
                  if test -z "$preferHashedMirrors"; then
                      tryHashedMirrors
                  fi
                  
                  
                  echo "error: cannot download $name from any mirror"
                  exit 1
                  
              ''
              • The set of input derivation names do not match:
                  - bash-5.3p9
                  - curl-8.19.0
                  - mirrors-list
                  - stdenv-linux
                  + bash-5.3p15
                  + curl-8.22.0
                  + stdenv-linux-no-cc
              • The environments do not match:
                  __json=''
                  {"SSL_CERT_FILE":"/no-cert-file.crt","buildInputs":[],"builder":"/nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash","cmakeFlags":[],"configureFlags":[],"curlOpts":"","curlOptsList":[],"depsBuildBuild":[],"depsBuildBuildPropagated":[],"depsBuildTarget":[],"depsBuildTargetPropagated":[],"depsHostHost":[],"depsHostHostPropagated":[],"depsTargetTarget":[],"depsTargetTargetPropagated":[],"doCheck":false,"doInstallCheck":false,"downloadToTemp":false,"env":{"SSL_CERT_FILE":"/no-cert-file.crt"},"executable":false,"hash":"sha256-AvFZ64jEJU2V6DHFHBRLGGOyFtkJtf9FdDoc5vUnMJA=","impureEnvVars":["http_proxy","https_proxy","ftp_proxy","all_proxy","no_proxy","HTTP_PROXY","HTTPS_PROXY","FTP_PROXY","ALL_PROXY","NO_PROXY","NIX_SSL_CERT_FILE","NIX_CURL_FLAGS","NIX_HASHED_MIRRORS","NIX_CONNECT_TIMEOUT","NIX_MIRRORS_alsa","NIX_MIRRORS_apache","NIX_MIRRORS_bioc","NIX_MIRRORS_bitlbee","NIX_MIRRORS_centos","NIX_MIRRORS_cpan","NIX_MIRRORS_cran","NIX_MIRRORS_debian","NIX_MIRRORS_dub","NIX_MIRRORS_fedora","NIX_MIRRORS_gcc","NIX_MIRRORS_gentoo","NIX_MIRRORS_gnome","NIX_MIRRORS_gnu","NIX_MIRRORS_gnupg","NIX_MIRRORS_hackage","NIX_MIRRORS_hashedMirrors","NIX_MIRRORS_ibiblioPubLinux","NIX_MIRRORS_imagemagick","NIX_MIRRORS_kde","NIX_MIRRORS_kernel","NIX_MIRRORS_luarocks","NIX_MIRRORS_maven","NIX_MIRRORS_mozilla","NIX_MIRRORS_mysql","NIX_MIRRORS_openbsd","NIX_MIRRORS_opensuse","NIX_MIRRORS_osdn","NIX_MIRRORS_postgresql","NIX_MIRRORS_pypi","NIX_MIRRORS_qt","NIX_MIRRORS_sageupstream","NIX_MIRRORS_samba","NIX_MIRRORS_savannah","NIX_MIRRORS_sourceforge","NIX_MIRRORS_steamrt","NIX_MIRRORS_tcsh","NIX_MIRRORS_testpypi","NIX_MIRRORS_ubuntu","NIX_MIRRORS_xfce","NIX_MIRRORS_xorg"],"mesonFlags":[],"mirrorsFile":"/nix/store/pdrv3g6m904x35m8n5qglf8hfry5csy6-mirrors-list","name":"docbook-xml-4.4.zip","nativeBuildInputs":["/nix/store/bs6pcmlpyv5q6304mjn137myab9qcfp3-curl-8.19.0-dev"],"nixpkgsVersion":"26.05","outputChecks":{"out":{}},"outputHash":"sha256-AvFZ64jEJU2V6DHFHBRLGGOyFtkJtf9FdDoc5vUnMJA=","outputHashMode":"flat","outputs":["out"],"patches":[],"postFetch":"","preferHashedMirrors":false,"preferLocalBuild":true,"propagatedBuildInputs":[],"propagatedNativeBuildInputs":[],"showURLs":false,"stdenv":"/nix/store/74ma22y9kdxjvvrrgz3q1dqnm8r4d99d-stdenv-linux","strictDeps":false,"system":"x86_64-linux","urls":["https://www.oasis-open.org/docbook/xml/4.4/docbook-xml-4.4.zip"]}{"SSL_CERT_FILE":"/no-cert-file.crt","buildInputs":[],"builder":"/nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash","cmakeFlags":[],"configureFlags":[],"curlOpts":"","curlOptsList":[],"depsBuildBuild":[],"depsBuildBuildPropagated":[],"depsBuildTarget":[],"depsBuildTargetPropagated":[],"depsHostHost":[],"depsHostHostPropagated":[],"depsTargetTarget":[],"depsTargetTargetPropagated":[],"doCheck":false,"doInstallCheck":false,"downloadToTemp":false,"env":{"SSL_CERT_FILE":"/no-cert-file.crt"},"executable":false,"hash":"sha256-AvFZ64jEJU2V6DHFHBRLGGOyFtkJtf9FdDoc5vUnMJA=","impureEnvVars":["http_proxy","https_proxy","ftp_proxy","all_proxy","no_proxy","HTTP_PROXY","HTTPS_PROXY","FTP_PROXY","ALL_PROXY","NO_PROXY","NIX_SSL_CERT_FILE","NIX_CURL_FLAGS","NIX_HASHED_MIRRORS","NIX_CONNECT_TIMEOUT","NIX_MIRRORS_alsa","NIX_MIRRORS_apache","NIX_MIRRORS_bioc","NIX_MIRRORS_bitlbee","NIX_MIRRORS_centos","NIX_MIRRORS_cpan","NIX_MIRRORS_cran","NIX_MIRRORS_debian","NIX_MIRRORS_dub","NIX_MIRRORS_fedora","NIX_MIRRORS_gcc","NIX_MIRRORS_gentoo","NIX_MIRRORS_gnome","NIX_MIRRORS_gnu","NIX_MIRRORS_gnupg","NIX_MIRRORS_hackage","NIX_MIRRORS_hashedMirrors","NIX_MIRRORS_ibiblioPubLinux","NIX_MIRRORS_imagemagick","NIX_MIRRORS_kde","NIX_MIRRORS_kernel","NIX_MIRRORS_luarocks","NIX_MIRRORS_maven","NIX_MIRRORS_mozilla","NIX_MIRRORS_mysql","NIX_MIRRORS_openbsd","NIX_MIRRORS_opensuse","NIX_MIRRORS_osdn","NIX_MIRRORS_postgresql","NIX_MIRRORS_pypi","NIX_MIRRORS_qt","NIX_MIRRORS_sageupstream","NIX_MIRRORS_samba","NIX_MIRRORS_savannah","NIX_MIRRORS_sourceforge","NIX_MIRRORS_steamrt","NIX_MIRRORS_tcsh","NIX_MIRRORS_testpypi","NIX_MIRRORS_texhistoric","NIX_MIRRORS_ubuntu","NIX_MIRRORS_xfce","NIX_MIRRORS_xorg"],"mesonFlags":[],"mirrorsListFile":"/nix/store/808pz59rm1qby6rnhg8jkgiwqjc1bl7a-mirrors-list","name":"docbook-xml-4.4.zip","nativeBuildInputs":["/nix/store/y3sbnb3z49c7xaq66cj5z5wss2v000wq-curl-8.22.0-dev"],"nixpkgsVersion":"26.11","outputChecks":{"out":{}},"outputHash":"sha256-AvFZ64jEJU2V6DHFHBRLGGOyFtkJtf9FdDoc5vUnMJA=","outputHashMode":"flat","outputs":["out"],"patches":[],"postFetch":"","preferHashedMirrors":false,"preferLocalBuild":true,"propagatedBuildInputs":[],"propagatedNativeBuildInputs":[],"showURLs":false,"stdenv":"/nix/store/xai718x2gpf0kf73zwhhv50likh5c18l-stdenv-linux-no-cc","strictDeps":true,"system":"x86_64-linux","urls":["https://www.oasis-open.org/docbook/xml/4.4/docbook-xml-4.4.zip"]}
              ''
            • The input derivation named `find-xml-catalogs-hook` differs
              - /nix/store/1nyw1iv09n7bj054k1nd1j0rb2z8w0ds-find-xml-catalogs-hook.drv:{out}
              + /nix/store/b2bwxawh4sdhfvpl9cjglbac6g11bbh5-find-xml-catalogs-hook.drv:{out}
              • The builders do not match
                  - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
                  + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
              • The set of input derivation names do not match:
                  - bash-5.3p9
                  - stdenv-linux
                  + bash-5.3p15
                  + stdenv-linux-no-cc
              • The environments do not match:
                  - __structuredAttrs=
                  - buildCommand=mkdir -p $out/nix-support
    cp /nix/store/81gwh57vnrm6qpw3gxmdmrjsp26dxi7p-find-xml-catalogs.sh $out/nix-support/setup-hook
    recordPropagatedDependencies
    
                  - buildInputs=
                  - builder=/nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
                  - cmakeFlags=
                  - configureFlags=
                  - depsBuildBuild=
                  - depsBuildBuildPropagated=
                  - depsBuildTarget=
                  - depsBuildTargetPropagated=
                  - depsHostHost=
                  - depsHostHostPropagated=
                  - depsTargetTarget=
                  - depsTargetTargetPropagated=
                  - doCheck=
                  - doInstallCheck=
                  - enableParallelBuilding=1
                  - enableParallelChecking=1
                  - enableParallelInstalling=1
                  - mesonFlags=
                  - name=find-xml-catalogs-hook
                  - nativeBuildInputs=
                  - outputs=out
                  - passAsFile=buildCommand
                  - patches=
                  - pname=find-xml-catalogs-hook
                  - propagatedBuildInputs=
                  - propagatedNativeBuildInputs=
                  - stdenv=/nix/store/74ma22y9kdxjvvrrgz3q1dqnm8r4d99d-stdenv-linux
                  - strictDeps=1
                  - system=x86_64-linux
                  - version=26.05pre-git
                  + __json={"buildCommand":"mkdir -p $out/nix-support\ncp /nix/store/81gwh57vnrm6qpw3gxmdmrjsp26dxi7p-find-xml-catalogs.sh $out/nix-support/setup-hook\nrecordPropagatedDependencies\n","buildInputs":[],"builder":"/nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash","cmakeFlags":[],"configureFlags":[],"depsBuildBuild":[],"depsBuildBuildPropagated":[],"depsBuildTarget":[],"depsBuildTargetPropagated":[],"depsHostHost":[],"depsHostHostPropagated":[],"depsTargetTarget":[],"depsTargetTargetPropagated":[],"doCheck":false,"doInstallCheck":false,"enableParallelBuilding":true,"enableParallelChecking":true,"enableParallelInstalling":true,"env":{},"mesonFlags":[],"name":"find-xml-catalogs-hook","nativeBuildInputs":[],"outputChecks":{"out":{}},"outputs":["out"],"passAsFile":["buildCommand"],"patches":[],"pname":"find-xml-catalogs-hook","propagatedBuildInputs":[],"propagatedNativeBuildInputs":[],"stdenv":"/nix/store/xai718x2gpf0kf73zwhhv50likh5c18l-stdenv-linux-no-cc","strictDeps":true,"system":"x86_64-linux","version":"26.05pre-git"}
            • The input derivation named `stdenv-linux` differs
              - /nix/store/q2xn5647kadsgpz40xcmjssa0pmdmiwi-stdenv-linux.drv:{out}
              + /nix/store/109gn1ryh0xvy67zcxjrbk7vm6h8jjfl-stdenv-linux.drv:{out}
              • The builders do not match
                  - /nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
                  + /nix/store/10dxp0qxqxxsyiljrh2kp0xqhz6arhcx-bash-5.3p15/bin/bash
              • The input source named `multiple-outputs.sh` differs
                  ''
                  # The base package for automatic multiple-output splitting. Used in stdenv as well.
                  preConfigureHooks+=(_multioutConfig)
                  preFixupHooks+=(_multioutDocs)
                  preFixupHooks+=(_multioutDevs)
                  postFixupHooks+=(_multioutPropagateDev)
                  
                  # _assignFirst varName otherVarNames*
                  #
                  # Set the value of the variable named $varName to the first of otherVarNames
                  # that refers to a non-empty variable name.
                  #
                  # If none of otherVarNames refers to a non-empty variable, the error message is
                  # specific to this function's use case, which is setting up the output variables.
                  _assignFirst() {
                      local varName="$1"
                      local _var
                      local REMOVE=REMOVE # slightly hacky - we allow REMOVE (i.e. not a variable name)
                      shift
                      for _var in "$@"; do
                          if [ -n "${!_var-}" ]; then eval "${varName}"="${_var}"; return; fi
                      done
                      echo
                      echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."
                      echo "       The following variables were all unset or empty:"
                      echo "           $*"
                      if [ -z "${out:-}" ]; then
                          echo '       If you do not want an "out" output in your derivation, make sure to define'
                          echo '       the other specific required outputs. This can be achieved by picking one'
                          echo "       of the above as an output."
                          echo '       You do not have to remove "out" if you want to have a different default'
                          echo '       output, because the first output is taken as a default.'
                          echo
                      fi
                      return 1 # none found
                  }
                  
                  # Same as _assignFirst, but only if "$1" = ""
                  _overrideFirst() {
                      if [ -z "${!1-}" ]; then
                          _assignFirst "$@"
                      fi
                  }
                  
                  
                  # Setup chains of sane default values with easy overridability.
                  # The variables are global to be usable anywhere during the build.
                  # Typical usage in package is defining outputBin = "dev";
                  
                  _overrideFirst outputDev "dev" "out"
                  _overrideFirst outputBin "bin" "out"
                  
                  _overrideFirst outputInclude "$outputDev"
                  
                  # so-libs are often among the main things to keep, and so go to $out
                  _overrideFirst outputLib "lib" "out"
                  
                  _overrideFirst outputDoc "doc" "out"
                  _overrideFirst outputDevdoc "devdoc" REMOVE # documentation for developers
                  # man and info pages are small and often useful to distribute with binaries
                  _overrideFirst outputMan "man" "$outputBin"
                  _overrideFirst outputDevman "devman" "devdoc" "$outputMan"
                  _overrideFirst outputInfo "info" "$outputBin"
                  
                  
                  # Add standard flags to put files into the desired outputs.
                  _multioutConfig() {
                      if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then return; fi;
                  
                      # try to detect share/doc/${shareDocName}
                      # Note: sadly, $configureScript detection comes later in configurePhase,
                      #   and reordering would cause more trouble than worth.
                      if [ -z "${shareDocName:-}" ]; then
                          local confScript="${configureScript:-}"
                          if [ -z "$confScript" ] && [ -x ./configure ]; then
                              confScript=./configure
                          fi
                          if [ -f "$confScript" ]; then
                              local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"
                          fi
                                                      # PACKAGE_TARNAME sometimes contains garbage.
                          if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then
                              shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"
                          fi
                      fi
                  
                      prependToVar configureFlags \
                          --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin \
                          --includedir="${!outputInclude}"/include \
                          --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info \
                          --docdir="${!outputDoc}"/share/doc/"${shareDocName}" \
                          --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec \
                          --localedir="${!outputLib}"/share/locale
                  
                      prependToVar installFlags \
                          pkgconfigdir="${!outputDev}"/lib/pkgconfig \
                          m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal
                  }
                  
                  
                  # Add rpath prefixes to library paths, and avoid stdenv doing it for $out.
                  _addRpathPrefix "${!outputLib}"
                  NIX_NO_SELF_RPATH=1
                  
                  
                  # Move subpaths that match pattern $1 from under any output/ to the $2 output/
                  # Beware: only globbing patterns are accepted, e.g.: * ? [abc]
                  # A special target "REMOVE" is allowed: moveToOutput foo REMOVE
                  moveToOutput() {
                      local patt="$1"
                      local dstOut="$2"
                      local output
                      for output in $(getAllOutputNames); do
                          if [ "${!output}" = "$dstOut" ]; then continue; fi
                          local srcPath
                          for srcPath in "${!output}"/$patt; do
                              # apply to existing files/dirs, *including* broken symlinks
                              if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then continue; fi
                  
                              if [ "$dstOut" = REMOVE ]; then
                                  echo "Removing $srcPath"
                                  rm -r "$srcPath"
                              else
                                  local dstPath="$dstOut${srcPath#${!output}}"
                                  echo "Moving $srcPath to $dstPath"
                  
                                  if [ -d "$dstPath" ] && [ -d "$srcPath" ]
                                  then # attempt directory merge
                                      # check the case of trying to move an empty directory
                                      rmdir "$srcPath" --ignore-fail-on-non-empty
                                      if [ -d "$srcPath" ]; then
                                        mv -t "$dstPath" "$srcPath"/*
                                        rmdir "$srcPath"
                                      fi
                                  else # usual move
                                      mkdir -p "$(readlink -m "$dstPath/..")"
                                      mv "$srcPath" "$dstPath"
                                  fi
                              fi
                  
                              # remove empty directories, printing iff at least one gets removed
                              local srcParent="$(readlink -m "$srcPath/..")"
                              if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
                                  echo "Removing empty $srcParent/ and (possibly) its parents"
                                  rmdir -p --ignore-fail-on-non-empty "$srcParent" \
                                      2> /dev/null || true # doesn't ignore failure for some reason
                              fi
                          done
                      done
                  }
                  
                  # Move documentation to the desired outputs.
                  _multioutDocs() {
                      local REMOVE=REMOVE # slightly hacky - we expand ${!outputFoo}
                  
                      moveToOutput share/info "${!outputInfo}"
                      moveToOutput share/doc "${!outputDoc}"
                      moveToOutput share/gtk-doc "${!outputDevdoc}"
                      moveToOutput share/devhelp/books "${!outputDevdoc}"
                  
                      # the default outputMan is in $bin
                      moveToOutput share/man "${!outputMan}"
                      moveToOutput share/man/man3 "${!outputDevman}"
                  }
                  
                  # Move development-only stuff to the desired outputs.
                  _multioutDevs() {
                      if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then return; fi;
                      moveToOutput include "${!outputInclude}"
                      # these files are sometimes provided even without using the corresponding tool
                      moveToOutput lib/pkgconfig "${!outputDev}"
                      moveToOutput share/pkgconfig "${!outputDev}"
                      moveToOutput lib/cmake "${!outputDev}"
                      moveToOutput share/aclocal "${!outputDev}"
                      # don't move *.la, as libtool needs them in the directory of the library
                  
                      for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; do
                          echo "Patching '$f' includedir to output ${!outputInclude}"
                          sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"
                      done
                  }
                  
                  # Make the "dev" propagate other outputs needed for development.
                  _multioutPropagateDev() {
                      if [ "$(getAllOutputNames)" = "out" ]; then return; fi;
                  
                      local outputFirst
                      for outputFirst in $(getAllOutputNames); do
                          break
                      done
                      local propagaterOutput="$outputDev"
                      if [ -z "$propagaterOutput" ]; then
                          propagaterOutput="$outputFirst"
                      fi
                  
                      # Default value: propagate binaries, includes and libraries
                      if [ -z "${propagatedBuildOutputs+1}" ]; then
                      local outputsToPropagate=()
                      if declare -p propagatedBuildOutputs &>/dev/null; then
                          concatTo outputsToPropagate propagatedBuildOutputs
                      else
                          local po_dirty="$outputBin $outputInclude $outputLib"
                          set +o pipefail
                          propagatedBuildOutputs=`echo "$po_dirty" \
                          readarray -t outputsToPropagate < <(echo "$po_dirty" \
                              | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" \
                              | sort -u | tr '\n' ' ' `
                              | sort -u )
                          set -o pipefail
                      fi
                  
                      # The variable was explicitly set to empty or we resolved it so
                      if [ -z "$propagatedBuildOutputs" ]; then
                      # Check whether we actually have any outputs to propagate
                      if [[ "${#outputsToPropagate[@]}" -eq 0 ]]; then
                          return
                      fi
                  
                      mkdir -p "${!propagaterOutput}"/nix-support
                      for output in $propagatedBuildOutputs; do
                      for output in "${outputsToPropagate[@]}"; do
                          echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs
                      done
                  }
                  
              ''
              • The input source named `setup.sh` differs
                  ''
                  # shellcheck shell=bash
                  # shellcheck disable=1090,2154,2123,2034,2178,2048,2068,1091
                  __nixpkgs_setup_set_original=$-
                  set -eu
                  set -o pipefail
                  
                  if [[ -n "${BASH_VERSINFO-}" && "${BASH_VERSINFO-}" -lt 5 ]]; then
                      echo "Detected Bash version that isn't supported by Nixpkgs (${BASH_VERSION})"
                      echo "Please install Bash 5 or greater to continue."
                      exit 1
                  fi
                  
                  shopt -s inherit_errexit
                  
                  # $NIX_DEBUG must be a documented integer level, if set, so we can use it safely as an integer.
                  # See the `Verbosity` enum in the Nix source for these levels.
                  if ! [[ -z ${NIX_DEBUG-} || $NIX_DEBUG == [0-7] ]]; then
                      # shellcheck disable=SC2016
                      printf 'The `NIX_DEBUG` environment variable has an unexpected value: %s\n' "${NIX_DEBUG}"
                      echo "It can only be unset or an integer between 0 and 7."
                      exit 1
                  fi
                  
                  if [[ ${NIX_DEBUG:-0} -ge 6 ]]; then
                      set -x
                  fi
                  
                  if [[ -n "${NIX_ATTRS_JSON_FILE:-}" ]]; then
                      __structuredAttrs=1
                      echo "structuredAttrs is enabled"
                  
                      for outputName in "${!outputs[@]}"; do
                          # ex: out=/nix/store/...
                          export "$outputName=${outputs[$outputName]}"
                      done
                      _exportOutputsByName() {
                          local outputName
                          for outputName in "${!outputs[@]}"; do
                              # ex: out=/nix/store/...
                              export "$outputName=${outputs[$outputName]}"
                          done
                      }
                  
                      _exportOutputsByName
                  else
                      __structuredAttrs=
                      : "${outputs:=out}"
                  fi
                  
                  getAllOutputNames() {
                      if [ -n "$__structuredAttrs" ]; then
                          echo "${!outputs[*]}"
                      else
                          echo "$outputs"
                      fi
                  }
                  
                  # All provided arguments are joined with a space, then prefixed by the name of the function which invoked `nixLog` (or
                  # the hook name if the caller was an implicit hook), then directed to $NIX_LOG_FD, if it's set.
                  nixLog() {
                    # Return a value explicitly instead of the implicit return of the last command (result of the test).
                    # NOTE: By requiring NIX_LOG_FD be set, we avoid dumping logging inside of nix-shell.
                    [[ -z ${NIX_LOG_FD-} ]] && return 0
                  
                    # Use the function name of the caller, unless it is _callImplicitHook, in which case use the name of the hook.
                    local callerName="${FUNCNAME[1]}"
                    if [[ $callerName == "_callImplicitHook" ]]; then
                      callerName="${hookName:?}"
                    fi
                    printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD"
                  }
                  
                  # Identical to nixLog, but additionally prefixed by the logLevel.
                  # NOTE: This function is only every meant to be called from the nix*Log family of functions.
                  _nixLogWithLevel() {
                    # Return a value explicitly instead of the implicit return of the last command (result of the test).
                    # NOTE: By requiring NIX_LOG_FD be set, we avoid dumping logging inside of nix-shell.
                    [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0
                  
                    local logLevel
                    case "${1:?}" in
                    0) logLevel=ERROR ;;
                    1) logLevel=WARN ;;
                    2) logLevel=NOTICE ;;
                    3) logLevel=INFO ;;
                    4) logLevel=TALKATIVE ;;
                    5) logLevel=CHATTY ;;
                    6) logLevel=DEBUG ;;
                    7) logLevel=VOMIT ;;
                    *)
                      echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD"
                      return 1
                      ;;
                    esac
                  
                    # Use the function name of the caller, unless it is _callImplicitHook, in which case use the name of the hook.
                    # NOTE: Our index into FUNCNAME is 2, not 1, because we are only ever to be called from the nix*Log family of
                    # functions, never directly.
                    local callerName="${FUNCNAME[2]}"
                    if [[ $callerName == "_callImplicitHook" ]]; then
                      callerName="${hookName:?}"
                    fi
                  
                    # Use the function name of the caller's caller, since we should only every be invoked by nix*Log functions.
                    printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlError` in the Nix source.
                  nixErrorLog() {
                    _nixLogWithLevel 0 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlWarn` in the Nix source.
                  nixWarnLog() {
                    _nixLogWithLevel 1 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlNotice` in the Nix source.
                  nixNoticeLog() {
                    _nixLogWithLevel 2 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlInfo` in the Nix source.
                  nixInfoLog() {
                    _nixLogWithLevel 3 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlTalkative` in the Nix source.
                  nixTalkativeLog() {
                    _nixLogWithLevel 4 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlChatty` in the Nix source.
                  nixChattyLog() {
                    _nixLogWithLevel 5 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlDebug` in the Nix source.
                  nixDebugLog() {
                    _nixLogWithLevel 6 "$*"
                  }
                  
                  # All provided arguments are joined with a space then directed to $NIX_LOG_FD, if it's set.
                  # Corresponds to `Verbosity::lvlVomit` in the Nix source.
                  nixVomitLog() {
                    _nixLogWithLevel 7 "$*"
                  }
                  
                  # Log a hook, to be run before the hook is actually called.
                  # logging for "implicit" hooks -- the ones specified directly
                  # in derivation's arguments -- is done in _callImplicitHook instead.
                  _logHook() {
                      # Fast path in case nixTalkativeLog is no-op.
                      if [[ -z ${NIX_LOG_FD-} ]]; then
                          return
                      fi
                  
                      local hookKind="$1"
                      local hookExpr="$2"
                      shift 2
                  
                      if declare -F "$hookExpr" > /dev/null 2>&1; then
                          nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@"
                      elif type -p "$hookExpr" > /dev/null; then
                          nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'"
                      elif [[ "$hookExpr" != "_callImplicitHook"* ]]; then
                          # Here we have a string hook to eval.
                          # Join lines onto one with literal \n characters unless NIX_DEBUG >= 5.
                          local exprToOutput
                          if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then
                              exprToOutput="$hookExpr"
                          else
                              # We have `r'\n'.join([line.lstrip() for lines in text.split('\n')])` at home.
                              local hookExprLine
                              while IFS= read -r hookExprLine; do
                                  # These lines often have indentation,
                                  # so let's remove leading whitespace.
                                  hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}"
                                  # If this line wasn't entirely whitespace,
                                  # then add it to our output
                                  if [[ -n "$hookExprLine" ]]; then
                                      exprToOutput+="$hookExprLine\\n "
                                  fi
                              done <<< "$hookExpr"
                  
                              # And then remove the final, unnecessary, \n
                              exprToOutput="${exprToOutput%%\\n }"
                          fi
                          nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'"
                      fi
                  }
                  
                  ######################################################################
                  # Hook handling.
                  
                  # Run all hooks with the specified name in the order in which they
                  # were added, stopping if any fails (returns a non-zero exit
                  # code). The hooks for <hookName> are the shell function or variable
                  # <hookName>, and the values of the shell array ‘<hookName>Hooks’.
                  runHook() {
                      local hookName="$1"
                      shift
                      local hooksSlice="${hookName%Hook}Hooks[@]"
                  
                      local hook
                      # Hack around old bash being bad and thinking empty arrays are
                      # undefined.
                      for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; do
                          _logHook "$hookName" "$hook" "$@"
                          _eval "$hook" "$@"
                      done
                  
                      return 0
                  }
                  
                  
                  # Run all hooks with the specified name, until one succeeds (returns a
                  # zero exit code). If none succeed, return a non-zero exit code.
                  runOneHook() {
                      local hookName="$1"
                      shift
                      local hooksSlice="${hookName%Hook}Hooks[@]"
                  
                      local hook ret=1
                      # Hack around old bash like above
                      for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; do
                          _logHook "$hookName" "$hook" "$@"
                          if _eval "$hook" "$@"; then
                              ret=0
                              break
                          fi
                      done
                  
                      return "$ret"
                  }
                  
                  
                  # Run the named hook, either by calling the function with that name or
                  # by evaluating the variable with that name. This allows convenient
                  # setting of hooks both from Nix expressions (as attributes /
                  # environment variables) and from shell scripts (as functions). If you
                  # want to allow multiple hooks, use runHook instead.
                  _callImplicitHook() {
                      local def="$1"
                      local hookName="$2"
                      if declare -F "$hookName" > /dev/null; then
                          nixTalkativeLog "calling implicit '$hookName' function hook"
                          "$hookName"
                      elif type -p "$hookName" > /dev/null; then
                          nixTalkativeLog "sourcing implicit '$hookName' script hook"
                          source "$hookName"
                      elif [ -n "${!hookName:-}" ]; then
                          nixTalkativeLog "evaling implicit '$hookName' string hook"
                          eval "${!hookName}"
                      else
                          return "$def"
                      fi
                      # `_eval` expects hook to need nounset disable and leave it
                      # disabled anyways, so Ok to to delegate. The alternative of a
                      # return trap is no good because it would affect nested returns.
                  }
                  
                  
                  # A function wrapper around ‘eval’ that ensures that ‘return’ inside
                  # hooks exits the hook, not the caller. Also will only pass args if
                  # command can take them
                  _eval() {
                      if declare -F "$1" > /dev/null 2>&1; then
                          "$@" # including args
                      else
                          eval "$1"
                      fi
                  }
                  
                  
                  ######################################################################
                  # Logging.
                  
                  # Prints a command such that all word splits are unambiguous. We need
                  # to split the command in three parts because the middle format string
                  # will be, and must be, repeated for each argument. The first argument
                  # goes before the ':' and is just for convenience.
                  echoCmd() {
                      printf "%s:" "$1"
                      shift
                      printf ' %q' "$@"
                      echo
                  }
                  
                  
                  ######################################################################
                  # Error handling.
                  
                  exitHandler() {
                      exitCode="$?"
                      set +e
                  
                      if [ -n "${showBuildStats:-}" ]; then
                          read -r -d '' -a buildTimes < <(times)
                          echo "build times:"
                          echo "user time for the shell             ${buildTimes[0]}"
                          echo "system time for the shell           ${buildTimes[1]}"
                          echo "user time for all child processes   ${buildTimes[2]}"
                          echo "system time for all child processes ${buildTimes[3]}"
                      fi
                  
                      if (( "$exitCode" != 0 )); then
                          runHook failureHook
                  
                          # If the builder had a non-zero exit code and
                          # $succeedOnFailure is set, create the file
                          # ‘$out/nix-support/failed’ to signal failure, and exit
                          # normally.  Otherwise, return the original exit code.
                          if [ -n "${succeedOnFailure:-}" ]; then
                              echo "build failed with exit code $exitCode (ignored)"
                              mkdir -p "$out/nix-support"
                              printf "%s" "$exitCode" > "$out/nix-support/failed"
                              exit 0
                          fi
                  
                      else
                          runHook exitHook
                      fi
                  
                      return "$exitCode"
                  }
                  
                  trap "exitHandler" EXIT
                  
                  
                  ######################################################################
                  # Helper functions.
                  
                  
                  addToSearchPathWithCustomDelimiter() {
                      local delimiter="$1"
                      local varName="$2"
                      local dir="$3"
                      if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" \
                            != *"${delimiter}${dir}${delimiter}"* ]]; then
                          export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"
                      fi
                  }
                  
                  addToSearchPath() {
                      addToSearchPathWithCustomDelimiter ":" "$@"
                  }
                  
                  # Prepend elements to variable "$1", which may come from an attr.
                  #
                  # This is useful in generic setup code, which must (for now) support
                  # both derivations with and without __structuredAttrs true, so the
                  # variable may be an array or a space-separated string.
                  #
                  # Expressions for individual packages should simply switch to array
                  # syntax when they switch to setting __structuredAttrs = true.
                  prependToVar() {
                      local -n nameref="$1"
                      local useArray type
                  
                      if [ -n "$__structuredAttrs" ]; then
                          useArray=true
                      else
                          useArray=false
                      fi
                  
                      # check if variable already exist and if it does then do extra checks
                      if type=$(declare -p "$1" 2> /dev/null); then
                          case "${type#* }" in
                              -A*)
                                  echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." >&2
                                  return 1 ;;
                              -a*)
                                  useArray=true ;;
                              *)
                                  useArray=false ;;
                          esac
                      fi
                  
                      shift
                  
                      if $useArray; then
                          nameref=( "$@" ${nameref+"${nameref[@]}"} )
                      else
                          nameref="$* ${nameref-}"
                      fi
                  }
                  
                  # Same as above
                  appendToVar() {
                      local -n nameref="$1"
                      local useArray type
                  
                      if [ -n "$__structuredAttrs" ]; then
                          useArray=true
                      else
                          useArray=false
                      fi
                  
                      # check if variable already exist and if it does then do extra checks
                      if type=$(declare -p "$1" 2> /dev/null); then
                          case "${type#* }" in
                              -A*)
                                  echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." >&2
                                  return 1 ;;
                              -a*)
                                  useArray=true ;;
                              *)
                                  useArray=false ;;
                          esac
                      fi
                  
                      shift
                  
                      if $useArray; then
                          nameref=( ${nameref+"${nameref[@]}"} "$@" )
                      else
                          nameref="${nameref-} $*"
                      fi
                  }
                  
                  # Accumulate flags from the named variables $2+ into the indexed array $1.
                  #
                  # Arrays are simply concatenated, strings are split on whitespace.
                  # Default values can be passed via name=default.
                  concatTo() {
                      local -
                      set -o noglob
                      local -n targetref="$1"; shift
                      local arg default name type
                      for arg in "$@"; do
                          IFS="=" read -r name default <<< "$arg"
                          local -n nameref="$name"
                          if [[ -z "${nameref[*]}" && -n "$default" ]]; then
                              targetref+=( "$default" )
                          elif type=$(declare -p "$name" 2> /dev/null); then
                              case "${type#* }" in
                                  -A*)
                                      echo "concatTo(): ERROR: trying to use concatTo on an associative array." >&2
                                      return 1 ;;
                                  -a*)
                                      targetref+=( "${nameref[@]}" ) ;;
                                  *)
                                      if [[ "$name" = *"Array" ]]; then
                                          nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future"
                                          # Reproduces https://github.com/NixOS/nixpkgs/pull/318614/files#diff-7c7ca80928136cfc73a02d5b28350bd900e331d6d304857053ffc9f7beaad576L359
                                          targetref+=( ${nameref+"${nameref[@]}"} )
                                      else
                                          # shellcheck disable=SC2206
                                          targetref+=( ${nameref-} )
                                      fi
                                      ;;
                              esac
                          fi
                      done
                  }
                  
                  # Concatenate a list of strings ($2) with a separator ($1) between each element.
                  # The list can be an indexed array of strings or a single string. A single string
                  # is split on spaces and then concatenated with the separator.
                  #
                  # $ flags="lorem ipsum dolor sit amet"
                  # $ concatStringsSep ";" flags
                  # lorem;ipsum;dolor;sit;amet
                  #
                  # $ flags=("lorem ipsum" "dolor" "sit amet")
                  # $ concatStringsSep ";" flags
                  # lorem ipsum;dolor;sit amet
                  #
                  # Also supports multi-character separators;
                  # $ flags=("lorem ipsum" "dolor" "sit amet")
                  # $ concatStringsSep " and " flags
                  # lorem ipsum and dolor and sit amet
                  concatStringsSep() {
                      local sep="$1"
                      local name="$2"
                      local type oldifs
                      if type=$(declare -p "$name" 2> /dev/null); then
                          local -n nameref="$name"
                          case "${type#* }" in
                              -A*)
                                  echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." >&2
                                  return 1 ;;
                              -a*)
                                  # \036 is the "record separator" character. We assume that this will never need to be part of
                                  # an argument string we create here. If anyone ever hits this limitation: Feel free to refactor.
                                  # To avoid leaking an unescaped rs character when dumping the environment with nix, we use printf
                                  # in a subshell.
                                  local IFS="$(printf '\036')" ;;
                              *)
                                  local IFS=" " ;;
                  
                          esac
                          local ifs_separated="${nameref[*]}"
                          echo -n "${ifs_separated//"$IFS"/"$sep"}"
                      fi
                  }
                  
                  # Add $1/lib* into rpaths.
                  # The function is used in multiple-outputs.sh hook,
                  # so it is defined here but tried after the hook.
                  _addRpathPrefix() {
                      if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then
                          export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"
                      fi
                  }
                  
                  # Return success if the specified file is an ELF object.
                  isELF() {
                      local fn="$1"
                      local fd
                      local magic
                      exec {fd}< "$fn"
                      LANG=C read -r -n 4 -u "$fd" magic
                      exec {fd}<&-
                      if [ "$magic" = $'\177ELF' ]; then return 0; else return 1; fi
                  }
                  
                  # Return success if the specified file is a Mach-O object.
                  isMachO() {
                      local fn="$1"
                      local fd
                      local magic
                      exec {fd}< "$fn"
                      LANG=C read -r -n 4 -u "$fd" magic
                      exec {fd}<&-
                  
                      # nix uses 'declare -F' in get-env.sh to retrieve the loaded functions.

Note: Report truncated to fit GitHub's 65536 character comment limit.
Full report in CI logs: https://github.com/Inrixia/TidaLuna/actions/runs/38268289908

@Inrixia
Inrixia merged commit 4b8c306 into Inrixia:master Oct 12, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants