diff options
author | Vikram Narayanan <vikram186@gmail.com> | 2021-11-21 00:32:42 -0800 |
---|---|---|
committer | Vikram Narayanan <vikram186@gmail.com> | 2021-11-21 19:32:25 -0800 |
commit | 7d6b3abe12c1c8b2e6f760ab82de80d087df57d8 (patch) | |
tree | f230d7ee34efcff2636cecd4154a6e9ceb088322 /pkgs/tools/archivers | |
parent | 77e1b5f81d70445ef4f01a5e17e701e366fd7dc6 (diff) | |
download | nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.tar nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.tar.gz nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.tar.bz2 nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.tar.lz nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.tar.xz nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.tar.zst nixpkgs-7d6b3abe12c1c8b2e6f760ab82de80d087df57d8.zip |
arc_unpacker: Move to catch2 to support aarch64-darwin
catch is ancient and has no support for aarch64-darwin. The following snippet is an example of what is supported on darwin platforms in catch (i.e., prior to v2). ``` #ifdef CATCH_PLATFORM_MAC #if defined(__ppc64__) || defined(__ppc__) #define CATCH_TRAP() \ __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ : : : "memory","r0","r3","r4" ) /* NOLINT */ #else #define CATCH_TRAP() __asm__("int $3\n" : : /* NOLINT */ ) #endif ```
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r-- | pkgs/tools/archivers/arc_unpacker/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/tools/archivers/arc_unpacker/default.nix b/pkgs/tools/archivers/arc_unpacker/default.nix index edf67f2f963..7fbd9302397 100644 --- a/pkgs/tools/archivers/arc_unpacker/default.nix +++ b/pkgs/tools/archivers/arc_unpacker/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libiconv -, libjpeg, zlib, openssl, libwebp, catch }: +, libjpeg, zlib, openssl, libwebp, catch2 }: stdenv.mkDerivation rec { pname = "arc_unpacker"; @@ -15,12 +15,12 @@ stdenv.mkDerivation rec { sha256 = "1xxrc9nww0rla3yh10z6glv05ax4rynwwbd0cdvkp7gyqzrv97xp"; }; - nativeBuildInputs = [ cmake makeWrapper catch ]; + nativeBuildInputs = [ cmake makeWrapper catch2 ]; buildInputs = [ boost libpng libjpeg zlib openssl libwebp ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; postPatch = '' - cp ${catch}/include/catch/catch.hpp tests/test_support/catch.h + cp ${catch2}/include/catch2/catch.hpp tests/test_support/catch.h ''; checkPhase = '' @@ -45,8 +45,8 @@ stdenv.mkDerivation rec { runHook postInstall ''; - # A few tests fail on aarch64 - doCheck = !stdenv.isAarch64; + # A few tests fail on aarch64-linux + doCheck = !(stdenv.isLinux && stdenv.isAarch64); meta = with lib; { description = "A tool to extract files from visual novel archives"; |