btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / lz / lzlib / package.nix
blobc44456bb45cadb31238b65d6ed89b2f743934efb
1 { lib, stdenv, fetchurl, texinfo, lzip }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "lzlib";
5   version = "1.14";
6   outputs = [ "out" "info" ];
8   nativeBuildInputs = [ texinfo lzip ];
10   src = fetchurl {
11     url = "mirror://savannah/lzip/lzlib/lzlib-${finalAttrs.version}.tar.lz";
12     hash = "sha256-42LszNgtTdKX32pRuVLGXSFy+b9BpcRZDTYE2DqlGdM=";
13     # hash from release email
14   };
16   postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
17     substituteInPlace Makefile.in --replace '-Wl,--soname=' '-Wl,-install_name,$(out)/lib/'
18   '';
20   makeFlags = [ "CC:=$(CC)" "AR:=$(AR)" ];
21   doCheck = true;
23   configureFlags = [ "--enable-shared" ];
25   meta = {
26     homepage = "https://www.nongnu.org/lzip/lzlib.html";
27     description =
28       "Data compression library providing in-memory LZMA compression and decompression functions, including integrity checking of the decompressed data";
29     license = lib.licenses.bsd2;
30     platforms = lib.platforms.all;
31     maintainers = with lib.maintainers; [ ehmry ];
32   };