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