Skip to content

Commit 7da8bc7

Browse files
committed
sigil: support darwin
1 parent 440a5e9 commit 7da8bc7

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pkgs/applications/editors/sigil/default.nix

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ stdenv.mkDerivation rec {
4747
sed -i '/^QTLIB_DIR=/ d' src/Resource_Files/bash/sigil-sh_install
4848
'';
4949

50+
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
51+
runHook preInstall
52+
53+
mkdir -p $out/Applications
54+
mv bin/Sigil.app $out/Applications
55+
# https://github.com/NixOS/nixpkgs/issues/186653
56+
chmod -x $out/Applications/Sigil.app/Contents/lib/*.dylib \
57+
$out/Applications/Sigil.app/Contents/polyfills/*.js \
58+
$out/Applications/Sigil.app/Contents/python3lib/*.py \
59+
$out/Applications/Sigil.app/Contents/hunspell_dictionaries/*.{aff,dic}
60+
61+
runHook postInstall
62+
'';
63+
5064
preFixup = ''
5165
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
5266
'';
@@ -56,7 +70,7 @@ stdenv.mkDerivation rec {
5670
homepage = "https://github.com/Sigil-Ebook/Sigil/";
5771
license = lib.licenses.gpl3;
5872
maintainers = with lib.maintainers; [ prince213 ];
59-
platforms = lib.platforms.linux;
73+
platforms = with lib.platforms; linux ++ darwin;
6074
mainProgram = "sigil";
6175
};
6276
}

0 commit comments

Comments
 (0)