2021-03-23 17:08:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-03-24 21:56:00 +00:00
|
|
|
, fetchpatch
|
2021-03-23 17:08:03 +00:00
|
|
|
, cmake
|
2020-06-21 23:24:49 +01:00
|
|
|
, perl
|
2020-04-13 13:44:04 +01:00
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, xmlto
|
2021-03-23 17:08:03 +00:00
|
|
|
, zip
|
2020-04-13 13:44:04 +01:00
|
|
|
, zlib
|
|
|
|
}:
|
2009-07-31 11:24:02 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "zziplib";
|
2021-03-23 17:08:03 +00:00
|
|
|
version = "0.13.72";
|
2009-07-31 11:24:02 +01:00
|
|
|
|
2020-04-13 13:44:04 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gdraheim";
|
2021-03-23 17:08:03 +00:00
|
|
|
repo = pname;
|
2020-04-13 13:44:04 +01:00
|
|
|
rev = "v${version}";
|
2021-03-23 17:08:03 +00:00
|
|
|
hash = "sha256-Ht3fBgdrTm4mCi5uhgQPNtpGzADoRVOpSuGPsIS6y0Q=";
|
2009-07-31 11:24:02 +01:00
|
|
|
};
|
|
|
|
|
2021-03-24 21:56:00 +00:00
|
|
|
patches = [
|
|
|
|
# apply https://github.com/gdraheim/zziplib/pull/113
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/gdraheim/zziplib/commit/82a7773cd17828a3b0a4f5f552ae80c1cc8777c7.diff";
|
|
|
|
sha256 = "0ifqdzxwb5d19mziy9j6lhl8wj95jpxzm0d2c6y3bgwa931avd3y";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/gdraheim/zziplib/commit/1cd611514c5f9559eb9dfc191d678dfc991f66db.diff";
|
|
|
|
sha256 = "11w9qa46xq49l113k266dnv8izzdk1fq4y54yy5w8zps8zd3xfny";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/gdraheim/zziplib/commit/e47b1e1da952a92f917db6fb19485b8a0b1a42f3.diff";
|
|
|
|
sha256 = "0d032hkmi3s3db12z2zbppl2swa3gdpbj0c6w13ylv2g2ixglrwg";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-13 13:44:04 +01:00
|
|
|
nativeBuildInputs = [
|
2021-03-23 17:08:03 +00:00
|
|
|
cmake
|
2020-06-21 23:24:49 +01:00
|
|
|
perl
|
2020-04-13 13:44:04 +01:00
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
xmlto
|
2021-03-23 17:08:03 +00:00
|
|
|
zip
|
2020-04-13 13:44:04 +01:00
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
2021-03-23 17:08:03 +00:00
|
|
|
# test/zziptests.py requires network access
|
2018-02-23 20:11:05 +00:00
|
|
|
# (https://github.com/gdraheim/zziplib/issues/24)
|
2021-03-23 17:08:03 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DZZIP_TESTCVE=OFF"
|
|
|
|
"-DBUILD_SHARED_LIBS=True"
|
|
|
|
"-DBUILD_STATIC_LIBS=False"
|
|
|
|
"-DBUILD_TESTS=OFF"
|
|
|
|
"-DMSVC_STATIC_RUNTIME=OFF"
|
|
|
|
"-DZZIPSDL=OFF"
|
|
|
|
"-DZZIPTEST=OFF"
|
|
|
|
"-DZZIPWRAP=OFF"
|
|
|
|
"-DBUILDTESTS=OFF"
|
|
|
|
];
|
2009-07-31 11:24:02 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2021-03-23 17:08:03 +00:00
|
|
|
homepage = "https://github.com/gdraheim/zziplib";
|
2014-06-23 12:04:06 +01:00
|
|
|
description = "Library to extract data from files archived in a zip file";
|
2009-07-31 11:24:02 +01:00
|
|
|
longDescription = ''
|
2021-03-23 17:08:03 +00:00
|
|
|
The zziplib library is intentionally lightweight, it offers the ability to
|
|
|
|
easily extract data from files archived in a single zip file.
|
|
|
|
Applications can bundle files into a single zip archive and access them.
|
|
|
|
The implementation is based only on the (free) subset of compression with
|
|
|
|
the zlib algorithm which is actually used by the zip/unzip tools.
|
2009-07-31 11:24:02 +01:00
|
|
|
'';
|
2015-05-27 20:56:04 +01:00
|
|
|
license = with licenses; [ lgpl2Plus mpl11 ];
|
2021-03-23 17:08:03 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2020-04-13 13:44:04 +01:00
|
|
|
platforms = python3.meta.platforms;
|
2009-07-31 11:24:02 +01:00
|
|
|
};
|
|
|
|
}
|