minizip2 -> minzip-ng: 2.10.6 -> 3.0.7
* The repository has been moved. The old URL https://github.com/nmoinvaz/minizip redirects to https://github.com/zlib-ng/minizip-ng * Enable unit tests * Make lib findable as libminizip-ng even if compat is enabled
This commit is contained in:
parent
a61b8298e0
commit
c20107f507
77
pkgs/development/libraries/minizip-ng/default.nix
Normal file
77
pkgs/development/libraries/minizip-ng/default.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, gtest
|
||||
, pkg-config
|
||||
, zlib
|
||||
, bzip2
|
||||
, xz
|
||||
, zstd
|
||||
, openssl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "minizip-ng";
|
||||
version = "3.0.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zlib-ng";
|
||||
repo = finalAttrs.pname;
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "sha256-m/zSVx8vYzLA23Cusd1p/ZSGd1mV3gM6UqDnmEXqpq4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "find-system-gtest.patch";
|
||||
url = "https://github.com/zlib-ng/minizip-ng/commit/be23c8d3b7e2cb5ba619e60517cad277ee510fb7.patch";
|
||||
sha256 = "sha256-azwrGj6kgTyTepGAmOlxDOFOwJKQE5J2bwUIn6sgKUY=";
|
||||
})
|
||||
|
||||
# otherwise signing unit tests fail
|
||||
(fetchpatch {
|
||||
name = "disable-mz-signing-by-default.patch";
|
||||
url = "https://github.com/zlib-ng/minizip-ng/commit/60649ada97581afc0bc2fffc50ce402ff1e6df5d.patch";
|
||||
sha256 = "sha256-bHGM4H8RPYkfAjxcS1bPohR9IFOFT0Mx4Mg34UnnD+w=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ zlib bzip2 xz zstd openssl ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
"-DMZ_OPENSSL=ON"
|
||||
"-DMZ_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DMZ_BUILD_UNIT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# missing header file
|
||||
"-DMZ_LIBCOMP=OFF"
|
||||
];
|
||||
|
||||
postInstall = let
|
||||
libext = if stdenv.hostPlatform.isStatic then ".a" else ".so";
|
||||
in ''
|
||||
# make lib findable as libminizip-ng even if compat is enabled
|
||||
if [ ! -e $out/lib/libminizip-ng${libext} ]; then
|
||||
ln -s $out/lib/libminizip${libext} $out/lib/libminizip-ng${libext}
|
||||
fi
|
||||
if [ ! -e $out/include/minizip-ng ]; then
|
||||
ln -s $out/include $out/include/minizip-ng
|
||||
fi
|
||||
'';
|
||||
|
||||
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
checkInputs = [ gtest ];
|
||||
enableParallelChecking = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fork of the popular zip manipulation library found in the zlib distribution";
|
||||
homepage = "https://github.com/zlib-ng/minizip-ng";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ gebner ris ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
})
|
|
@ -1,30 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zlib, bzip2, xz, zstd, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "minizip";
|
||||
version = "2.10.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nmoinvaz";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-OAm4OZeQdP2Q/UKYI9bR7OV9RmLmYF/j2NpK5TPoE60=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=YES"
|
||||
"-DMZ_OPENSSL=ON"
|
||||
];
|
||||
|
||||
buildInputs = [ zlib bzip2 xz zstd openssl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compression library implementing the deflate compression method found in gzip and PKZIP";
|
||||
homepage = "https://github.com/nmoinvaz/minizip";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -943,6 +943,7 @@ mapAliases ({
|
|||
minetestserver_4 = throw "minetestserver_4 has been removed from Nixpkgs; current version is available at minetestserver"; # added 2022-02-01
|
||||
minetime = throw "minetime has been removed from nixpkgs, because it was discontinued 2021-06-22"; # Added 2021-10-14
|
||||
miniupnpc_1 = throw "miniupnpc_1 has been removed; current version is available at miniupnpc"; # Added 2022-10-30
|
||||
minizip2 = pkgs.minizip-ng; # Added 2022-12-28
|
||||
mist = throw "mist has been removed as the upstream project has been abandoned, see https://github.com/ethereum/mist#mist-browser-deprecated"; # Added 2020-08-15
|
||||
mlt-qt5 = throw "'mlt-qt5' has been renamed to/replaced by 'libsForQt5.mlt'"; # Converted to throw 2022-02-22
|
||||
mobile_broadband_provider_info = throw "'mobile_broadband_provider_info' has been renamed to/replaced by 'mobile-broadband-provider-info'"; # Converted to throw 2022-02-22
|
||||
|
|
|
@ -21589,7 +21589,7 @@ with pkgs;
|
|||
|
||||
minizip = callPackage ../development/libraries/minizip { };
|
||||
|
||||
minizip2 = callPackage ../development/libraries/minizip2 { };
|
||||
minizip-ng = callPackage ../development/libraries/minizip-ng { };
|
||||
|
||||
mkvtoolnix = libsForQt5.callPackage ../applications/video/mkvtoolnix { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue