diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-12-18 07:56:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-18 07:56:44 +0100 |
commit | 0ef5737dd73181d5dbe989a6ea73ef86fc965970 (patch) | |
tree | 38d4cadcebf2643370497fb1116a8d97d5f48e4d /pkgs/applications/editors | |
parent | 526457722c5462deab0a85eac739493e54b55e94 (diff) | |
parent | 13a1d1919e72b739d848fdbfcb058922e1c7f686 (diff) |
Merge pull request #273780 from wegank/texmacs-bundle
texmacs: build as bundle on darwin
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r-- | pkgs/applications/editors/texmacs/default.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix index 5d6c3687a0be1..cf19ea5a8cca1 100644 --- a/pkgs/applications/editors/texmacs/default.nix +++ b/pkgs/applications/editors/texmacs/default.nix @@ -45,7 +45,6 @@ stdenv.mkDerivation { pkg-config wrapQtAppsHook xdg-utils - ] ++ lib.optionals (!stdenv.isDarwin) [ cmake ]; @@ -63,8 +62,19 @@ stdenv.mkDerivation { qtmacextras ]; + cmakeFlags = lib.optionals stdenv.isDarwin [ + (lib.cmakeFeature "TEXMACS_GUI" "Qt") + (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "./TeXmacs.app/Contents/Resources") + ]; + env.NIX_LDFLAGS = "-lz"; + postInstall = lib.optionalString stdenv.isDarwin '' + mkdir -p $out/{Applications,bin} + mv TeXmacs.app $out/Applications/ + makeWrapper $out/Applications/TeXmacs.app/Contents/MacOS/TeXmacs $out/bin/texmacs + ''; + qtWrapperArgs = [ "--suffix" "PATH" ":" (lib.makeBinPath [ xmodmap @@ -77,7 +87,7 @@ stdenv.mkDerivation { ]) ]; - postFixup = '' + postFixup = lib.optionalString (!stdenv.isDarwin) '' wrapQtApp $out/bin/texmacs ''; |