1{ lib, stdenv, fetchurl, texinfo, lzip }:
2
3stdenv.mkDerivation rec {
4 pname = "lzlib";
5 version = "1.13";
6 outputs = [ "out" "info" ];
7
8 nativeBuildInputs = [ texinfo lzip ];
9
10 src = fetchurl {
11 url = "mirror://savannah/lzip/${pname}/${pname}-${version}.tar.lz";
12 sha256 = "sha256-3ea9WzJTXxeyjJrCS2ZgfgJQUGrBQypBEso8c/XWYsM=";
13 };
14
15 postPatch = lib.optionalString stdenv.isDarwin ''
16 substituteInPlace Makefile.in --replace '-Wl,--soname=' '-Wl,-install_name,$(out)/lib/'
17 '';
18
19 makeFlags = [ "CC:=$(CC)" ];
20 doCheck = true;
21
22 configureFlags = [ "--enable-shared" ];
23
24 meta = with lib; {
25 homepage = "https://www.nongnu.org/lzip/${pname}.html";
26 description =
27 "Data compression library providing in-memory LZMA compression and decompression functions, including integrity checking of the decompressed data";
28 license = licenses.bsd2;
29 platforms = platforms.all;
30 maintainers = with maintainers; [ ehmry ];
31 };
32}