From 7756269294910b60d85a0a093b12e68271e0db0e Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 14 Jun 2023 01:13:00 +0300 Subject: [PATCH] arc_unpacker: drop boost175 --- pkgs/tools/archivers/arc_unpacker/default.nix | 44 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/archivers/arc_unpacker/default.nix b/pkgs/tools/archivers/arc_unpacker/default.nix index 2ade0f88a8d0..ee40a7a5ab4a 100644 --- a/pkgs/tools/archivers/arc_unpacker/default.nix +++ b/pkgs/tools/archivers/arc_unpacker/default.nix @@ -1,7 +1,20 @@ -{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libiconv -, libjpeg, zlib, openssl, libwebp, catch2 }: +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, makeWrapper +, boost +, libpng +, libiconv +, libjpeg +, zlib +, openssl +, libwebp +, catch2 +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "arc_unpacker"; version = "unstable-2021-08-06"; @@ -12,14 +25,35 @@ stdenv.mkDerivation rec { hash = "sha256-STbdWH7Mr3gpOrZvujblYrIIKEWBHzy1/BaNuh4teI8="; }; - nativeBuildInputs = [ cmake makeWrapper catch2 ]; - buildInputs = [ boost libiconv libjpeg libpng libwebp openssl zlib ]; + patches = [ + (fetchpatch { + name = "failing_tests.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/failing_tests.patch?h=arc_unpacker-git&id=bda1ad9f69e6802e703b2e6913d71a36d76cfef9"; + hash = "sha256-bClACsf/+SktyLAPtt7EcSqprkw8JVIi1ZLpcJcv9IE="; + }) + ]; postPatch = '' cp ${catch2}/include/catch2/catch.hpp tests/test_support/catch.h sed '1i#include ' -i src/dec/eagls/pak_archive_decoder.cc # gcc12 ''; + nativeBuildInputs = [ + cmake + makeWrapper + catch2 + ]; + + buildInputs = [ + boost + libiconv + libjpeg + libpng + libwebp + openssl + zlib + ]; + checkPhase = '' runHook preCheck diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e08e59367e72..cca60b335bd2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1359,9 +1359,7 @@ with pkgs; type = "OPN"; }; - arc_unpacker = callPackage ../tools/archivers/arc_unpacker { - boost = boost175; # checkPhase fails with Boost 1.77 - }; + arc_unpacker = callPackage ../tools/archivers/arc_unpacker { }; adminer = callPackage ../servers/adminer { };