Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 41 lines 1.1 kB view raw
1{ stdenv, fetchurl, perl, zlib }: 2 3stdenv.mkDerivation rec { 4 name = "libzip-${version}"; 5 version = "1.3.0"; 6 7 src = fetchurl { 8 url = "https://www.nih.at/libzip/${name}.tar.gz"; 9 sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9"; 10 }; 11 12 postPatch = '' 13 patchShebangs test-driver 14 patchShebangs man/handle_links 15 ''; 16 17 outputs = [ "out" "dev" ]; 18 19 nativeBuildInputs = [ perl ]; 20 propagatedBuildInputs = [ zlib ]; 21 22 preCheck = '' 23 # regress/runtests is a generated file 24 patchShebangs regress 25 ''; 26 27 # At least mysqlWorkbench cannot find zipconf.h; I think also openoffice 28 # had this same problem. This links it somewhere that mysqlworkbench looks. 29 postInstall = '' 30 mkdir -p $dev/lib 31 mv $out/lib/libzip $dev/lib/libzip 32 ( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h ) 33 ''; 34 35 meta = with stdenv.lib; { 36 homepage = https://www.nih.at/libzip; 37 description = "A C library for reading, creating and modifying zip archives"; 38 license = licenses.bsd3; 39 platforms = platforms.unix; 40 }; 41}