diff options
author | Robert Scott <code@humanleg.org.uk> | 2022-04-17 12:07:41 +0100 |
---|---|---|
committer | Robert Scott <code@humanleg.org.uk> | 2022-04-17 20:56:49 +0100 |
commit | 0a74e0b66e49731b6ac1ba668846aa3f339c2724 (patch) | |
tree | 664a480a5c405b7d27feb6fe759908ca7956c589 /pkgs/development/libraries/libarchive | |
parent | 7408ce3c7074ac10ce4daf4870c0389de97a31e5 (diff) | |
download | nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.tar nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.tar.gz nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.tar.bz2 nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.tar.lz nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.tar.xz nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.tar.zst nixpkgs-0a74e0b66e49731b6ac1ba668846aa3f339c2724.zip |
libarchive: enable tests
Diffstat (limited to 'pkgs/development/libraries/libarchive')
-rw-r--r-- | pkgs/development/libraries/libarchive/default.nix | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index 240371917f1..aabb471d9e3 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -37,6 +37,22 @@ stdenv.mkDerivation rec { hash = "sha256-G4wL5DDbX0FqaA4cnOlVLZ25ObN8dNsRtxyas29tpDA="; }; + postPatch = '' + substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)" + + declare -a skip_tests=( + # test won't work in nix sandbox + 'test_write_disk_perms' + # can't be sure builder will have sparse-capable fs + 'test_sparse_basic' + ) + + for test_name in "''${skip_tests[@]}" ; do + sed -i "/$test_name/d" Makefile.am + rm "libarchive/test/$test_name.c" + done + ''; + outputs = [ "out" "lib" "dev" ]; nativeBuildInputs = [ @@ -60,17 +76,12 @@ stdenv.mkDerivation rec { configureFlags = lib.optional (!xarSupport) "--without-xml2"; - postPatch = '' - substituteInPlace Makefile.am --replace '/bin/pwd' 'pwd' - ''; - preBuild = lib.optionalString stdenv.isCygwin '' echo "#include <windows.h>" >> config.h ''; - # 484: test_write_disk_perms FAIL - # TODO: how to disable it? Should it be reported upstream? - doCheck = false; + # https://github.com/libarchive/libarchive/issues/1475 + doCheck = !stdenv.hostPlatform.isMusl; preFixup = '' sed -i $lib/lib/libarchive.la \ |