Skip to content

Commit

Permalink
Merge pull request NixOS#272434 from XYenon/master
Browse files Browse the repository at this point in the history
ouch: fix build on darwin
  • Loading branch information
figsoda authored Dec 6, 2023
2 parents f800dd1 + a40edfc commit 23eb27c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/tools/compression/ouch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, xz
, zlib
, zstd
, stdenv
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -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";
Expand Down

0 comments on commit 23eb27c

Please sign in to comment.