Merge pull request #205689 from panicgh/minizip2

minizip2 -> minizip-ng: 2.10.6 -> 3.0.7
This commit is contained in:
Robert Scott 2022-12-29 23:16:05 +00:00 committed by GitHub
commit a8ce53810a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 82 additions and 34 deletions

View file

@ -8,7 +8,7 @@
, liblinphone
, mediastreamer
, mediastreamer-openh264
, minizip2
, minizip-ng
, mkDerivation
, qtgraphicaleffects
, qtquickcontrols2
@ -70,7 +70,7 @@ mkDerivation rec {
mediastreamer
mediastreamer-openh264
minizip2
minizip-ng
qtgraphicaleffects
qtquickcontrols2
qttranslations
@ -81,7 +81,7 @@ mkDerivation rec {
];
cmakeFlags = [
"-DMINIZIP_INCLUDE_DIRS=${minizip2}/include"
"-DMINIZIP_INCLUDE_DIRS=${minizip-ng}/include"
"-DMINIZIP_LIBRARIES=minizip"
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/

View 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;
};
})

View file

@ -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;
};
}

View file

@ -946,6 +946,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

View file

@ -21724,7 +21724,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 { };