diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-11-06 21:52:13 -0500 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-11-06 22:32:36 -0500 |
commit | 19fbec8a7fc87e27220d32de13f7d3eb04b90285 (patch) | |
tree | 0b1d6c06f1c3c56bf37d83d6aae99b9cf96628cd /pkgs/tools/archivers | |
parent | 311c0ae69975edb036a3f22dca42d9832e17d5b1 (diff) |
unar: fix build with clang 16
* Set deployment target based on stdenv; and * Work around https://github.com/NixOS/nixpkgs/issues/166205.
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r-- | pkgs/tools/archivers/unar/default.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/tools/archivers/unar/default.nix b/pkgs/tools/archivers/unar/default.nix index ee1693ee18e25..07aa89fa5caf2 100644 --- a/pkgs/tools/archivers/unar/default.nix +++ b/pkgs/tools/archivers/unar/default.nix @@ -50,15 +50,17 @@ stdenv.mkDerivation rec { lib.optionals stdenv.isLinux [ gnustep.make ] ++ lib.optionals stdenv.isDarwin [ xcbuildHook ]; + # Work around https://github.com/NixOS/nixpkgs/issues/166205. + # xcbuild links with clang instead of clang++. + env = lib.optionalAttrs stdenv.isDarwin { + LD_FLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; + }; + xcbuildFlags = lib.optionals stdenv.isDarwin [ "-target unar" "-target lsar" "-configuration Release" - "MACOSX_DEPLOYMENT_TARGET=10.12" - # Fix "ld: file not found: /nix/store/*-clang-7.1.0/lib/arc/libarclite_macosx." error - # Disabling ARC may leak memory, however since this program is generally not used for - # long periods of time, it shouldn't be an issue - "CLANG_LINK_OBJC_RUNTIME=NO" + "MACOSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}" ]; makefile = lib.optionalString (!stdenv.isDarwin) "Makefile.linux"; |