btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / li / libunarr / package.nix
blobc53196afe4201005a45b3921ba4793ad05cf922a
1 { lib
2 , stdenv
3 , fetchurl
4 , cmake
5 }:
7 stdenv.mkDerivation rec {
8   pname = "libunarr";
9   version = "1.1.1";
11   src = fetchurl {
12     url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
13     hash = "sha256-Mo76BOqZbdOJFrEkeozxdqwpuFyvkhdONNMZmN5BdNI=";
14   };
16   postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
17     substituteInPlace CMakeLists.txt \
18       --replace "-flto" "" \
19       --replace "AppleClang" "Clang"
20   '';
22   nativeBuildInputs = [
23     cmake
24   ];
26   meta = with lib; {
27     homepage = "https://github.com/selmf/unarr";
28     description = "Lightweight decompression library with support for rar, tar and zip archives";
29     license = licenses.lgpl3Plus;
30     maintainers = with maintainers; [ wegank ];
31     platforms = platforms.unix;
32   };