commit 7c876e3fb20160781207a8f652fb052647e6da0d parent 538c40956f702d04e91510915267159945668a70 Author: Nikolay Korotkiy <sikmir@disroot.org> Date: Thu, 27 Jan 2022 11:38:12 +0300 capture2text: fix on darwin Diffstat:
M | pkgs/misc/capture2text/default.nix | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pkgs/misc/capture2text/default.nix b/pkgs/misc/capture2text/default.nix @@ -33,8 +33,13 @@ stdenv.mkDerivation rec { "INCLUDEPATH+=${tesseract4}/include/tesseract" ]; - installPhase = '' - install -Dm755 Capture2Text_CLI $out/bin/capture2text + installPhase = if stdenv.isDarwin then '' + mkdir -p $out/Applications $out/bin + mv Capture2Text_CLI.app $out/Applications + ln -s $out/Applications/Capture2Text_CLI.app/Contents/MacOS/Capture2Text_CLI $out/bin/capture2text + '' else '' + install -Dm755 Capture2Text_CLI -t $out/bin + ln -s $out/bin/Capture2Text_CLI $out/bin/capture2text ''; meta = with lib; {