about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libunarr
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libunarr')
-rw-r--r--nixpkgs/pkgs/development/libraries/libunarr/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libunarr/default.nix b/nixpkgs/pkgs/development/libraries/libunarr/default.nix
new file mode 100644
index 000000000000..1feafabfd4df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunarr/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunarr";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
+    hash = "sha256-5wCnhjoj+GTmaeDTCrUnm1Wt9SsWAbQcPSYM//FNeOA=";
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt \
+      --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;
+  };
+}