2017-11-20 22:29:37 +00:00
|
|
|
{ stdenv, callPackage,
|
2019-06-16 20:59:06 +01:00
|
|
|
fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
|
2019-06-30 03:22:21 +01:00
|
|
|
libjpeg,
|
|
|
|
sqlite,
|
2017-11-20 22:29:37 +00:00
|
|
|
tex ? null,
|
|
|
|
aspell ? null,
|
2019-06-30 03:22:21 +01:00
|
|
|
git ? null,
|
|
|
|
python3 ? null,
|
|
|
|
cmake,
|
|
|
|
pkgconfig,
|
2017-11-20 22:29:37 +00:00
|
|
|
ghostscriptX ? null,
|
|
|
|
extraFonts ? false,
|
|
|
|
chineseFonts ? false,
|
|
|
|
japaneseFonts ? false,
|
|
|
|
koreanFonts ? false }:
|
|
|
|
|
|
|
|
let
|
2010-10-04 16:07:38 +01:00
|
|
|
pname = "TeXmacs";
|
2019-08-13 00:30:47 +01:00
|
|
|
version = "1.99.11";
|
2017-11-20 22:29:37 +00:00
|
|
|
common = callPackage ./common.nix {
|
|
|
|
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
|
2010-10-04 16:07:38 +01:00
|
|
|
};
|
|
|
|
in
|
2017-11-20 22:29:37 +00:00
|
|
|
stdenv.mkDerivation {
|
2010-10-04 16:07:38 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-06-30 03:22:21 +01:00
|
|
|
url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
|
2019-08-13 00:30:47 +01:00
|
|
|
sha256 = "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg";
|
2010-10-04 16:07:38 +01:00
|
|
|
};
|
|
|
|
|
2019-06-30 03:22:21 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
# Texmacs' cmake build as of writing defaults to Qt5,
|
|
|
|
# but we haven't updated to that yet.
|
|
|
|
"-DTEXMACS_GUI=Qt4"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [
|
|
|
|
guile_1_8
|
|
|
|
qt4
|
|
|
|
makeWrapper
|
|
|
|
ghostscriptX
|
|
|
|
freetype
|
|
|
|
libjpeg
|
|
|
|
sqlite
|
|
|
|
git
|
|
|
|
python3
|
|
|
|
];
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_LDFLAGS = "-lz";
|
2010-10-04 16:07:38 +01: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:") +
|
2019-06-30 03:22:21 +01:00
|
|
|
(if git == null then "" else "${git}/bin:") +
|
|
|
|
(if python3 == null then "" else "${python3}/bin:") +
|
2010-10-04 16:07:38 +01:00
|
|
|
"${xmodmap}/bin:${which}/bin";
|
|
|
|
|
2017-11-20 22:29:37 +00:00
|
|
|
inherit (common) postPatch;
|
|
|
|
|
|
|
|
meta = common.meta // {
|
2013-08-16 22:44:33 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
2018-04-30 23:47:47 +01:00
|
|
|
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
|
2010-10-04 16:07:38 +01:00
|
|
|
};
|
|
|
|
}
|