about summary refs log tree commit diff
path: root/pkgs/tools/archivers/arc_unpacker
diff options
context:
space:
mode:
authorFelix Rath <felixm.rath@gmail.com>2021-05-25 00:44:09 +0200
committerGitHub <noreply@github.com>2021-05-25 00:44:09 +0200
commit7cb8324a9124b0ee38c97d690e90d1ac571d8c69 (patch)
tree9bfea6ec17171258727e44848a063fa087670ffa /pkgs/tools/archivers/arc_unpacker
parentf55c3e2f21073be564fed477847ad5bd649c9fb9 (diff)
arc_unpacker: 2019-01-28 -> 2021-05-17, add darwin build (#123393)
Co-authored-by: midchildan <git@midchildan.org>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/tools/archivers/arc_unpacker')
-rw-r--r--pkgs/tools/archivers/arc_unpacker/add-missing-import.patch22
-rw-r--r--pkgs/tools/archivers/arc_unpacker/default.nix26
2 files changed, 11 insertions, 37 deletions
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 d0ed0bb5b8303..0000000000000
--- 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 <felixm.rath@gmail.com>
-Date: Sat, 15 May 2021 13:07:38 +0200
-Subject: [PATCH] add missing <stdexcept> import
-
-`std::logic_error` is used in this file, which resides in `<stdexcept>`, 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 <functional>
-+#include <stdexcept>
- 
- 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 c6259cf11b0f2..edf67f2f963b5 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 `<stdexcept>` 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;
   };
 }