anchor.diff:  { lib, stdenv
   , cmake
  -, fetchpatch
   , fetchurl
   , perl
   , zlib
  
positive.code:   propagatedBuildInputs = [ zlib ];
    buildInputs = lib.optionals withLZMA [ xz ]
      ++ lib.optionals withBzip2 [ bzip2 ]
      ++ lib.optionals withOpenssl [ openssl ];
  
    preCheck = ''
      # regress/runtest is a generated file
  
negative.code: , xz
  , withOpenssl ? false
  , openssl
  , withZstd ? false
  , zstd
  }:
  
  stdenv.mkDerivation rec {
    pname = "libzip";
    version = "1.8.0";
  
    src = fetchurl {
      url = "https://libzip.org/download/${pname}-${version}.tar.gz";
      sha256 = "17l3ygrnbszm3b99dxmw94wcaqpbljzg54h4c0y8ss8aij35bvih";
    };
  
    outputs = [ "out" "dev" "man" ];
  
  