diff --git a/pkgs/development/tools/misc/patchelf/0.13.nix b/pkgs/development/tools/misc/patchelf/0.13.nix new file mode 100644 index 0000000000000..0111a4b065c47 --- /dev/null +++ b/pkgs/development/tools/misc/patchelf/0.13.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, patchelf }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "patchelf"; + version = "0.13.1"; + + src = fetchurl { + url = "https://github.com/NixOS/${pname}/releases/download/${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-OeiuzNdJXVTfCU0rSnwIAQ/3d3A2+q8k8o4Hd30VmOI="; + }; + + setupHook = [ ./setup-hook.sh ]; + + # fails 8 out of 24 tests, problems when loading libc.so.6 + doCheck = stdenv.name == "stdenv-linux"; + + inherit (patchelf) meta; +} diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 86a91a09c3ebe..da60a80f77fca 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -113,8 +113,10 @@ stdenv.mkDerivation (rec { # Darwin (http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/19351), # and {Open,Free}BSD. # With non-standard storeDir: https://github.com/NixOS/nix/issues/512 + # On aarch64+musl, test-init.sh fails due to a segfault in diff. doCheck = stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.isMusl) + && !(stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) && !stdenv.isAarch32; # Prevents attempts of running 'help2man' on cross-built binaries. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c544a4ad29bce..7fb8b938187b5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15799,8 +15799,15 @@ with pkgs; parse-cli-bin = callPackage ../development/tools/parse-cli-bin { }; - patchelf = callPackage ../development/tools/misc/patchelf { }; + patchelf = if with stdenv.buildPlatform; isAarch64 && isMusl then + patchelf_0_13 + else + patchelf_0_14; patchelf_0_9 = callPackage ../development/tools/misc/patchelf/0.9.nix { }; + patchelf_0_13 = callPackage ../development/tools/misc/patchelf/0.13.nix { + patchelf = patchelf_0_14; + }; + patchelf_0_14 = callPackage ../development/tools/misc/patchelf { }; patchelfUnstable = lowPrio (callPackage ../development/tools/misc/patchelf/unstable.nix { });