1 { lib, stdenv, callPackage, fetchurl,
2 guile_1_8, xmodmap, which, freetype,
19 japaneseFonts ? false,
20 koreanFonts ? false }:
25 common = callPackage ./common.nix {
26 inherit extraFonts chineseFonts japaneseFonts koreanFonts;
31 inherit pname version;
34 url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
35 hash = "sha256-h6aSLuDdrAtVzOnNVPqMEWX9WLDHtkCjPy9JXWnBgYY=";
38 postPatch = common.postPatch + ''
39 substituteInPlace configure \
40 --replace "-mfpmath=sse -msse2" ""
61 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
65 cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
66 (lib.cmakeFeature "TEXMACS_GUI" "Qt")
67 (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "./TeXmacs.app/Contents/Resources")
70 env.NIX_LDFLAGS = "-lz";
72 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
73 mkdir -p $out/{Applications,bin}
74 mv TeXmacs.app $out/Applications/
75 makeWrapper $out/Applications/TeXmacs.app/Contents/MacOS/TeXmacs $out/bin/texmacs
79 "--suffix" "PATH" ":" (lib.makeBinPath [
90 postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
91 wrapQtApp $out/bin/texmacs
94 meta = common.meta // {
95 maintainers = [ lib.maintainers.roconnor ];
96 platforms = lib.platforms.all;