From 26962c8787828ac3f38186c67aa9c51d02152255 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 26 Oct 2022 19:10:02 +0200 Subject: [PATCH] libunarr: fix build on darwin --- pkgs/development/libraries/libunarr/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libunarr/default.nix b/pkgs/development/libraries/libunarr/default.nix index 94269e85c66d..ccf65e64d293 100644 --- a/pkgs/development/libraries/libunarr/default.nix +++ b/pkgs/development/libraries/libunarr/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, cmake }: +{ lib, stdenv, fetchurl, fetchpatch, cmake }: stdenv.mkDerivation rec { pname = "libunarr"; @@ -16,11 +16,16 @@ stdenv.mkDerivation rec { 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 '' + substituteInPlace CMakeLists.txt \ + --replace '-Wl,--no-undefined -Wl,--as-needed' '-Wl,-undefined,error' ''; meta = with lib; { homepage = "https://github.com/selmf/unarr"; description = "A lightweight decompression library with support for rar, tar and zip archives"; - license = licenses.lgpl3; + license = licenses.lgpl3Plus; }; }