aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/zziplib/default.nix
blob: 228dfdcf77a480014099c2ea58e32c62c4812be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{ stdenv
, perl
, pkg-config
, fetchFromGitHub
, fetchpatch
, zip
, unzip
, python3
, xmlto
, zlib
}:

stdenv.mkDerivation rec {
  pname = "zziplib";
  version = "0.13.71";

  src = fetchFromGitHub {
    owner = "gdraheim";
    repo = "zziplib";
    rev = "v${version}";
    sha256 = "P+7D57sc2oIABhk3k96aRILpGnsND5SLXHh2lqr9O4E=";
  };

  patches = [
    # Install man pages
    (fetchpatch {
      url = "https://github.com/gdraheim/zziplib/commit/5583ccc7a247ee27556ede344e93d3ac1dc72e9b.patch";
      sha256 = "wVExEZN8Ml1/3GicB0ZYsLVS3KJ8BSz8i4Gu46naz1Y=";
      excludes = [ "GNUmakefile" ];
    })

    # Fix man page formatting
    (fetchpatch {
      url = "https://github.com/gdraheim/zziplib/commit/22ed64f13dc239f86664c60496261f544bce1088.patch";
      sha256 = "ScFVWLc4LQPqkcHn9HK/VkLula4b5HzuYl0b5vi4Ikc=";
    })
  ];

  nativeBuildInputs = [
    perl
    pkg-config
    zip
    python3
    xmlto
  ];

  buildInputs = [
    zlib
  ];

  checkInputs = [
    unzip
  ];

  # tests are broken (https://github.com/gdraheim/zziplib/issues/20),
  # and test/zziptests.py requires network access
  # (https://github.com/gdraheim/zziplib/issues/24)
  doCheck = false;
  checkTarget = "check";

  meta = with stdenv.lib; {
    description = "Library to extract data from files archived in a zip file";

    longDescription = ''
      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.
    '';

    license = with licenses; [ lgpl2Plus mpl11 ];

    homepage = "http://zziplib.sourceforge.net/";

    maintainers = [ ];
    platforms = python3.meta.platforms;
  };
}