2015-09-24 04:49:03 +01:00
|
|
|
{ fetchurl, stdenv, acl, openssl, libxml2, attr, zlib, bzip2, e2fsprogs, xz, lzo
|
2012-04-19 22:40:07 +01:00
|
|
|
, sharutils }:
|
2009-04-22 00:18:09 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-07-09 23:26:41 +01:00
|
|
|
name = "libarchive-${version}";
|
|
|
|
version = "3.2.1";
|
2009-04-22 00:18:09 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-07-09 23:26:41 +01:00
|
|
|
url = "${meta.homepage}/downloads/${name}.tar.gz";
|
|
|
|
sha256 = "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj";
|
2009-04-22 00:18:09 +01:00
|
|
|
};
|
|
|
|
|
2015-09-24 04:49:03 +01:00
|
|
|
buildInputs = [ sharutils libxml2 zlib bzip2 openssl xz lzo ] ++
|
2012-04-19 22:40:07 +01:00
|
|
|
stdenv.lib.optionals stdenv.isLinux [ e2fsprogs attr acl ];
|
2011-03-25 12:55:22 +00:00
|
|
|
|
2016-04-29 04:29:30 +01:00
|
|
|
# Without this, pkgconfig-based dependencies are unhappy
|
|
|
|
propagatedBuildInputs = stdenv.lib.optionals stdenv.isLinux [ attr acl ];
|
|
|
|
|
2014-10-29 22:45:15 +00:00
|
|
|
preBuild = if stdenv.isCygwin then ''
|
|
|
|
echo "#include <windows.h>" >> config.h
|
|
|
|
'' else null;
|
|
|
|
|
2015-07-28 14:22:40 +01:00
|
|
|
preFixup = ''
|
2015-09-25 13:06:23 +01:00
|
|
|
sed -i $out/lib/libarchive.la \
|
2015-10-15 00:07:37 +01:00
|
|
|
-e 's|-lcrypto|-L${openssl.out}/lib -lcrypto|' \
|
2015-09-25 13:06:23 +01:00
|
|
|
-e 's|-llzo2|-L${lzo}/lib -llzo2|'
|
2015-07-28 14:22:40 +01:00
|
|
|
'';
|
|
|
|
|
2009-04-22 00:18:09 +01:00
|
|
|
meta = {
|
2012-10-21 06:17:14 +01:00
|
|
|
description = "Multi-format archive and compression library";
|
|
|
|
longDescription = ''
|
|
|
|
This library has code for detecting and reading many archive formats and
|
|
|
|
compressions formats including (but not limited to) tar, shar, cpio, zip, and
|
|
|
|
compressed with gzip, bzip2, lzma, xz, ..
|
|
|
|
'';
|
2013-06-29 16:10:14 +01:00
|
|
|
homepage = http://libarchive.org;
|
2012-10-21 06:17:14 +01:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
platforms = with stdenv.lib.platforms; all;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ jcumming ];
|
2009-04-22 00:18:09 +01:00
|
|
|
};
|
|
|
|
}
|