python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / zziplib / default.nix
blob90758db16edd4e37a5e6d9e940822a02a321d6f2
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchpatch
5 , cmake
6 , perl
7 , pkg-config
8 , python3
9 , xmlto
10 , zip
11 , zlib
14 stdenv.mkDerivation rec {
15   pname = "zziplib";
16   version = "0.13.72";
18   src = fetchFromGitHub {
19     owner = "gdraheim";
20     repo = pname;
21     rev = "v${version}";
22     hash = "sha256-Ht3fBgdrTm4mCi5uhgQPNtpGzADoRVOpSuGPsIS6y0Q=";
23   };
25   patches = [
26     # apply https://github.com/gdraheim/zziplib/pull/113
27     (fetchpatch {
28       url = "https://github.com/gdraheim/zziplib/commit/82a7773cd17828a3b0a4f5f552ae80c1cc8777c7.diff";
29       sha256 = "0ifqdzxwb5d19mziy9j6lhl8wj95jpxzm0d2c6y3bgwa931avd3y";
30     })
31     (fetchpatch {
32       url = "https://github.com/gdraheim/zziplib/commit/1cd611514c5f9559eb9dfc191d678dfc991f66db.diff";
33       sha256 = "11w9qa46xq49l113k266dnv8izzdk1fq4y54yy5w8zps8zd3xfny";
34     })
35     (fetchpatch {
36       url = "https://github.com/gdraheim/zziplib/commit/e47b1e1da952a92f917db6fb19485b8a0b1a42f3.diff";
37       sha256 = "0d032hkmi3s3db12z2zbppl2swa3gdpbj0c6w13ylv2g2ixglrwg";
38     })
39   ];
41   nativeBuildInputs = [
42     cmake
43     perl
44     pkg-config
45     python3
46     xmlto
47     zip
48   ];
49   buildInputs = [
50     zlib
51   ];
53   # test/zziptests.py requires network access
54   # (https://github.com/gdraheim/zziplib/issues/24)
55   cmakeFlags = [
56     "-DZZIP_TESTCVE=OFF"
57     "-DBUILD_SHARED_LIBS=True"
58     "-DBUILD_STATIC_LIBS=False"
59     "-DBUILD_TESTS=OFF"
60     "-DMSVC_STATIC_RUNTIME=OFF"
61     "-DZZIPSDL=OFF"
62     "-DZZIPTEST=OFF"
63     "-DZZIPWRAP=OFF"
64     "-DBUILDTESTS=OFF"
65   ];
67   meta = with lib; {
68     homepage = "https://github.com/gdraheim/zziplib";
69     description = "Library to extract data from files archived in a zip file";
70     longDescription = ''
71       The zziplib library is intentionally lightweight, it offers the ability to
72       easily extract data from files archived in a single zip file.
73       Applications can bundle files into a single zip archive and access them.
74       The implementation is based only on the (free) subset of compression with
75       the zlib algorithm which is actually used by the zip/unzip tools.
76     '';
77     license = with licenses; [ lgpl2Plus mpl11 ];
78     maintainers = with maintainers; [ AndersonTorres ];
79     platforms = python3.meta.platforms;
80   };