nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.09 35 lines 954 B view raw
1{ stdenv, fetchurl, cmake, perl, zlib }: 2 3stdenv.mkDerivation rec { 4 pname = "libzip"; 5 version = "1.6.1"; 6 7 src = fetchurl { 8 url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz"; 9 sha256 = "120xgf7cgjmz9d3yp10lks6lhkgxqb4skbmbiiwf46gx868qxsq6"; 10 }; 11 12 # Fix pkgconfig file paths 13 postPatch = '' 14 sed -i CMakeLists.txt \ 15 -e 's#\\''${exec_prefix}/''${CMAKE_INSTALL_LIBDIR}#''${CMAKE_INSTALL_FULL_LIBDIR}#' \ 16 -e 's#\\''${prefix}/''${CMAKE_INSTALL_INCLUDEDIR}#''${CMAKE_INSTALL_FULL_INCLUDEDIR}#' 17 ''; 18 19 outputs = [ "out" "dev" ]; 20 21 nativeBuildInputs = [ cmake perl ]; 22 propagatedBuildInputs = [ zlib ]; 23 24 preCheck = '' 25 # regress/runtest is a generated file 26 patchShebangs regress 27 ''; 28 29 meta = with stdenv.lib; { 30 homepage = "https://www.nih.at/libzip"; 31 description = "A C library for reading, creating and modifying zip archives"; 32 license = licenses.bsd3; 33 platforms = platforms.unix; 34 }; 35}