2023-09-05 09:30:48 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
}:
|
2018-11-04 10:22:56 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libunarr";
|
2023-10-21 12:07:36 +00:00
|
|
|
version = "1.1.1";
|
2018-11-04 10:22:56 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
|
2023-10-21 12:07:36 +00:00
|
|
|
hash = "sha256-Mo76BOqZbdOJFrEkeozxdqwpuFyvkhdONNMZmN5BdNI=";
|
2018-11-04 10:22:56 +00:00
|
|
|
};
|
|
|
|
|
2023-09-05 09:30:48 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
2022-10-26 17:10:02 +00:00
|
|
|
substituteInPlace CMakeLists.txt \
|
2023-09-05 09:30:48 +00:00
|
|
|
--replace "-flto" "" \
|
|
|
|
--replace "AppleClang" "Clang"
|
2022-05-18 11:47:10 +00:00
|
|
|
'';
|
|
|
|
|
2023-09-05 09:30:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/selmf/unarr";
|
2024-06-07 07:46:46 +00:00
|
|
|
description = "Lightweight decompression library with support for rar, tar and zip archives";
|
2022-10-26 17:10:02 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2023-09-05 09:30:48 +00:00
|
|
|
maintainers = with maintainers; [ wegank ];
|
|
|
|
platforms = platforms.unix;
|
2018-11-04 10:22:56 +00:00
|
|
|
};
|
|
|
|
}
|