xar: fix cross compilation

This commit is contained in:
Andrew Childs
2021-05-17 00:27:00 +09:00
parent 2931a2e1d5
commit 1fc0499569
3 changed files with 193 additions and 5 deletions
+9 -5
View File
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libxml2, xz, openssl, zlib, bzip2, fts, autoconf }:
{ lib, stdenv, fetchurl, pkg-config, libxml2, xz, openssl, zlib, bzip2, fts, autoreconfHook }:
stdenv.mkDerivation rec {
version = "1.6.1";
@@ -9,16 +9,20 @@ stdenv.mkDerivation rec {
sha256 = "0ghmsbs6xwg1092v7pjcibmk5wkyifwxw6ygp08gfz25d2chhipf";
};
buildInputs = [ libxml2 xz openssl zlib bzip2 fts autoconf ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libxml2 xz openssl zlib bzip2 fts ];
prePatch = ''
patches = [
./0001-Add-useless-descriptions-to-AC_DEFINE.patch
./0002-Use-pkg-config-for-libxml2.patch
];
postPatch = ''
substituteInPlace configure.ac \
--replace 'OpenSSL_add_all_ciphers' 'OPENSSL_init_crypto' \
--replace 'openssl/evp.h' 'openssl/crypto.h'
'';
preConfigure = "./autogen.sh";
meta = {
homepage = "https://mackyle.github.io/xar/";
description = "Extensible Archiver";