2017-11-20 22:29:37 +00:00
|
|
|
{ stdenv, callPackage,
|
|
|
|
fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype,
|
|
|
|
tex ? null,
|
|
|
|
aspell ? null,
|
|
|
|
ghostscriptX ? null,
|
|
|
|
extraFonts ? false,
|
|
|
|
chineseFonts ? false,
|
|
|
|
japaneseFonts ? false,
|
|
|
|
koreanFonts ? false }:
|
|
|
|
|
|
|
|
let
|
2010-10-04 15:07:38 +00:00
|
|
|
pname = "TeXmacs";
|
2015-07-25 17:38:45 +00:00
|
|
|
version = "1.99.2";
|
2017-11-20 22:29:37 +00:00
|
|
|
common = callPackage ./common.nix {
|
|
|
|
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
|
2010-10-04 15:07:38 +00:00
|
|
|
};
|
|
|
|
in
|
2017-11-20 22:29:37 +00:00
|
|
|
stdenv.mkDerivation {
|
2010-10-04 15:07:38 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2015-07-25 17:38:45 +00:00
|
|
|
url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
|
|
|
|
sha256 = "0l48g9746igiaxw657shm8g3xxk565vzsviajlrxqyljbh6py0fs";
|
2010-10-04 15:07:38 +00:00
|
|
|
};
|
|
|
|
|
2015-07-25 17:38:45 +00:00
|
|
|
buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
|
2010-10-04 15:07:38 +00:00
|
|
|
|
|
|
|
postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
|
|
|
|
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
|
|
|
|
(if aspell == null then "" else "${aspell}/bin:") +
|
|
|
|
(if tex == null then "" else "${tex}/bin:") +
|
|
|
|
"${xmodmap}/bin:${which}/bin";
|
|
|
|
|
2017-11-20 22:29:37 +00:00
|
|
|
inherit (common) postPatch;
|
|
|
|
|
2015-07-25 17:38:45 +00:00
|
|
|
postFixup = ''
|
|
|
|
bin="$out/libexec/TeXmacs/bin/texmacs.bin"
|
|
|
|
rpath=$(patchelf --print-rpath "$bin")
|
2016-01-24 07:30:24 +00:00
|
|
|
patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin"
|
2015-07-25 17:38:45 +00:00
|
|
|
'';
|
|
|
|
|
2017-11-20 22:29:37 +00:00
|
|
|
meta = common.meta // {
|
2013-08-16 21:44:33 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
2010-10-04 15:07:38 +00:00
|
|
|
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
|
|
|
};
|
|
|
|
}
|