Merge pull request #253392 from wegank/libunarr-bump

libunarr: 1.0.1 -> 1.1.0
This commit is contained in:
Weijia Wang 2023-09-05 12:41:06 +02:00 committed by GitHub
commit 6097e4c08b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,31 +1,33 @@
{ lib, stdenv, fetchurl, fetchpatch, cmake }:
{ lib
, stdenv
, fetchurl
, cmake
}:
stdenv.mkDerivation rec {
pname = "libunarr";
version = "1.0.1";
version = "1.1.0";
src = fetchurl {
url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
sha256 = "1db500k6w90qn6qb4j3zcczailmmv81q9lv4bwq516hbncg5p4sl";
hash = "sha256-5wCnhjoj+GTmaeDTCrUnm1Wt9SsWAbQcPSYM//FNeOA=";
};
nativeBuildInputs = [ cmake ];
# https://github.com/selmf/unarr/issues/23
postPatch = ''
substituteInPlace pkg-config.pc.cmake \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
''
# ld: unknown option: --no-undefined
+ lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace '-Wl,--no-undefined -Wl,--as-needed' '-Wl,-undefined,error'
--replace "-flto" "" \
--replace "AppleClang" "Clang"
'';
nativeBuildInputs = [
cmake
];
meta = with lib; {
homepage = "https://github.com/selmf/unarr";
description = "A lightweight decompression library with support for rar, tar and zip archives";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ wegank ];
platforms = platforms.unix;
};
}