From 5fe89bc95dc792594446c435036815c3ffecb466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Fri, 12 Apr 2024 10:04:04 +1000 Subject: [PATCH] afio: darwin build --- pkgs/tools/archivers/afio/default.nix | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/archivers/afio/default.nix b/pkgs/tools/archivers/afio/default.nix index d321bd44985d..4f01c1c58ba6 100644 --- a/pkgs/tools/archivers/afio/default.nix +++ b/pkgs/tools/archivers/afio/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub } : +{ lib, stdenv, fetchFromGitHub, fetchpatch } : stdenv.mkDerivation rec { version = "2.5.2"; @@ -11,11 +11,20 @@ stdenv.mkDerivation rec { sha256 = "1vbxl66r5rp5a1qssjrkfsjqjjgld1cq57c871gd0m4qiq9rmcfy"; }; - /* - * A patch to simplify the installation and for removing the - * hard coded dependency on GCC. - */ - patches = [ ./0001-makefile-fix-installation.patch ]; + patches = [ + /* + * A patch to simplify the installation and for removing the + * hard coded dependency on GCC. + */ + ./0001-makefile-fix-installation.patch + + # fix darwin build (include headers) + (fetchpatch { + url = "https://github.com/kholtman/afio/pull/18/commits/a726614f99913ced08f6ae74091c56969d5db210.patch"; + name = "darwin-headers.patch"; + hash = "sha256-pK8mN29fC2mL4B69Fv82dWFIQMGwquyl825OBDTxzpo="; + }) + ]; installFlags = [ "DESTDIR=$(out)" ];