From a40edfc8334103e1263f1b78b6aa5bb36cdf537d Mon Sep 17 00:00:00 2001 From: XYenon Date: Wed, 6 Dec 2023 16:32:22 +0800 Subject: [PATCH] ouch: fix build on darwin add workaround for #166205 patch test --- pkgs/tools/compression/ouch/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/compression/ouch/default.nix b/pkgs/tools/compression/ouch/default.nix index a1b4131ca703..5321982f189e 100644 --- a/pkgs/tools/compression/ouch/default.nix +++ b/pkgs/tools/compression/ouch/default.nix @@ -7,6 +7,7 @@ , xz , zlib , zstd +, stdenv }: rustPlatform.buildRustPackage rec { @@ -28,12 +29,19 @@ rustPlatform.buildRustPackage rec { buildFeatures = [ "zstd/pkg-config" ]; + preCheck = '' + substituteInPlace tests/ui.rs \ + --replace 'format!(r"/private{path}")' 'path.to_string()' + ''; + postInstall = '' installManPage artifacts/*.1 installShellCompletion artifacts/ouch.{bash,fish} --zsh artifacts/_ouch ''; - env.OUCH_ARTIFACTS_FOLDER = "artifacts"; + env = { OUCH_ARTIFACTS_FOLDER = "artifacts"; } // + # Work around https://github.com/NixOS/nixpkgs/issues/166205. + lib.optionalAttrs stdenv.cc.isClang { NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; }; meta = with lib; { description = "A command-line utility for easily compressing and decompressing files and directories";