nixpkgs/pkgs/applications/editors/texmacs/default.nix

69 lines
1.7 KiB
Nix
Raw Normal View History

2017-11-20 22:29:37 +00:00
{ stdenv, callPackage,
fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
libjpeg,
sqlite,
2017-11-20 22:29:37 +00:00
tex ? null,
aspell ? null,
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
pname = "TeXmacs";
version = "1.99.11";
2017-11-20 22:29:37 +00:00
common = callPackage ./common.nix {
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
};
in
2017-11-20 22:29:37 +00:00
stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
sha256 = "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg";
};
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";
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:") +
(if git == null then "" else "${git}/bin:") +
(if python3 == null then "" else "${python3}/bin:") +
"${xmodmap}/bin:${which}/bin";
2017-11-20 22:29:37 +00:00
inherit (common) postPatch;
meta = common.meta // {
2013-08-16 21:44:33 +00:00
maintainers = [ stdenv.lib.maintainers.roconnor ];
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
};
}