1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 17:25:11 +00:00
nixpkgs/pkgs/development/libraries/libzip/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

42 lines
1.1 KiB
Nix

{ stdenv, fetchurl, perl, zlib }:
stdenv.mkDerivation rec {
pname = "libzip";
version = "1.3.0";
src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9";
};
postPatch = ''
patchShebangs test-driver
patchShebangs man/handle_links
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ perl ];
propagatedBuildInputs = [ zlib ];
preCheck = ''
# regress/runtests is a generated file
patchShebangs regress
'';
# At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
# had this same problem. This links it somewhere that mysqlworkbench looks.
postInstall = ''
mkdir -p $dev/lib
mv $out/lib/libzip $dev/lib/libzip
( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h )
'';
meta = with stdenv.lib; {
homepage = https://www.nih.at/libzip;
description = "A C library for reading, creating and modifying zip archives";
license = licenses.bsd3;
platforms = platforms.unix;
};
}