From 7cb8324a9124b0ee38c97d690e90d1ac571d8c69 Mon Sep 17 00:00:00 2001 From: Felix Rath Date: Tue, 25 May 2021 00:44:09 +0200 Subject: [PATCH] arc_unpacker: 2019-01-28 -> 2021-05-17, add darwin build (#123393) Co-authored-by: midchildan Co-authored-by: Sandro --- .../arc_unpacker/add-missing-import.patch | 22 ---------------- pkgs/tools/archivers/arc_unpacker/default.nix | 26 ++++++++----------- 2 files changed, 11 insertions(+), 37 deletions(-) delete mode 100644 pkgs/tools/archivers/arc_unpacker/add-missing-import.patch diff --git a/pkgs/tools/archivers/arc_unpacker/add-missing-import.patch b/pkgs/tools/archivers/arc_unpacker/add-missing-import.patch deleted file mode 100644 index d0ed0bb5b83..00000000000 --- a/pkgs/tools/archivers/arc_unpacker/add-missing-import.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 29c0b393283395c69ecdd747e960301e95c93bcf Mon Sep 17 00:00:00 2001 -From: Felix Rath -Date: Sat, 15 May 2021 13:07:38 +0200 -Subject: [PATCH] add missing import - -`std::logic_error` is used in this file, which resides in ``, but was not imported before. This caused the build to fail, see, e.g., https://hydra.nixos.org/build/141997371/log. ---- - src/algo/crypt/lcg.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/algo/crypt/lcg.cc b/src/algo/crypt/lcg.cc -index 6c2a7945..66630a08 100644 ---- a/src/algo/crypt/lcg.cc -+++ b/src/algo/crypt/lcg.cc -@@ -17,6 +17,7 @@ - - #include "algo/crypt/lcg.h" - #include -+#include - - using namespace au; - using namespace au::algo::crypt; diff --git a/pkgs/tools/archivers/arc_unpacker/default.nix b/pkgs/tools/archivers/arc_unpacker/default.nix index c6259cf11b0..edf67f2f963 100644 --- a/pkgs/tools/archivers/arc_unpacker/default.nix +++ b/pkgs/tools/archivers/arc_unpacker/default.nix @@ -1,9 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libjpeg, zlib -, openssl, libwebp, catch }: +{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libiconv +, libjpeg, zlib, openssl, libwebp, catch }: stdenv.mkDerivation rec { - pname = "arc_unpacker-unstable"; - version = "2019-01-28"; + pname = "arc_unpacker"; + version = "unstable-2021-05-17"; src = fetchFromGitHub { owner = "vn-tools"; @@ -11,19 +11,13 @@ stdenv.mkDerivation rec { # Since the latest release (0.11) doesn't build, we've opened an upstream # issue in https://github.com/vn-tools/arc_unpacker/issues/187 to ask if a # a new release is upcoming - rev = "b9843a13e2b67a618020fc12918aa8d7697ddfd5"; - sha256 = "0wpl30569cip3im40p3n22s11x0172a3axnzwmax62aqlf8kdy14"; + rev = "9c2781fcf3ead7641e873b65899f6abeeabb2fc8"; + sha256 = "1xxrc9nww0rla3yh10z6glv05ax4rynwwbd0cdvkp7gyqzrv97xp"; }; nativeBuildInputs = [ cmake makeWrapper catch ]; - buildInputs = [ boost libpng libjpeg zlib openssl libwebp ]; - - patches = [ - # Add a missing `` import that caused the build to fail. - # Failure: https://hydra.nixos.org/build/141997371/log - # Also submitted as an upstream PR: https://github.com/vn-tools/arc_unpacker/pull/194 - ./add-missing-import.patch - ]; + buildInputs = [ boost libpng libjpeg zlib openssl libwebp ] + ++ lib.optionals stdenv.isDarwin [ libiconv ]; postPatch = '' cp ${catch}/include/catch/catch.hpp tests/test_support/catch.h @@ -51,12 +45,14 @@ stdenv.mkDerivation rec { runHook postInstall ''; - doCheck = true; + # A few tests fail on aarch64 + doCheck = !stdenv.isAarch64; meta = with lib; { description = "A tool to extract files from visual novel archives"; homepage = "https://github.com/vn-tools/arc_unpacker"; license = licenses.gpl3Plus; maintainers = with maintainers; [ midchildan ]; + platforms = platforms.all; }; }