2020-04-09 15:05:11 +01:00
|
|
|
{ lib, mkDerivation, callPackage, fetchurl, fetchpatch,
|
|
|
|
guile_1_8, qtbase, xmodmap, which, 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";
|
2020-04-09 15:05:11 +01:00
|
|
|
version = "1.99.13";
|
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
|
2020-04-09 15:05:11 +01:00
|
|
|
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";
|
2020-04-09 15:05:11 +01:00
|
|
|
sha256 = "Aq0cS47QqmFQHelxRjANeJlgXCXagnYRykpAq7wHqbQ=";
|
2010-10-04 16:07:38 +01:00
|
|
|
};
|
|
|
|
|
2020-04-09 15:05:11 +01:00
|
|
|
patches = [
|
|
|
|
# Minor patch for Qt 5.15 support, should be included in next release.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/texmacs/texmacs/commit/3cf56af92326b74538f5e943928199ba6e963d0b.patch";
|
|
|
|
sha256 = "+OBQmnKgvQZZkLx6ea773Dwq0o7L92Sex/kcVUhmg6Q=";
|
|
|
|
})
|
|
|
|
# Fix returned version, lets hope they remember to bump the version next release.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/texmacs/texmacs/commit/da5b67005d2fc31bb32ea1ead882c26af12d8cbb.patch";
|
|
|
|
sha256 = "czMgdraQErrdvN83jY76P673L52BpQkDwntmKvF0Ykg=";
|
|
|
|
})
|
2019-06-30 03:22:21 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [
|
|
|
|
guile_1_8
|
2020-04-09 15:05:11 +01:00
|
|
|
qtbase
|
2019-06-30 03:22:21 +01:00
|
|
|
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
|
|
|
|
2020-04-09 15:05:11 +01:00
|
|
|
qtWrapperArgs = [
|
|
|
|
"--suffix" "PATH" ":" (lib.makeBinPath [
|
|
|
|
xmodmap
|
|
|
|
which
|
|
|
|
ghostscriptX
|
|
|
|
aspell
|
|
|
|
tex
|
|
|
|
git
|
|
|
|
python3
|
|
|
|
])
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapQtApp $out/bin/texmacs
|
|
|
|
'';
|
2010-10-04 16:07:38 +01:00
|
|
|
|
2017-11-20 22:29:37 +00:00
|
|
|
inherit (common) postPatch;
|
|
|
|
|
|
|
|
meta = common.meta // {
|
2020-04-09 15:05:11 +01:00
|
|
|
maintainers = [ lib.maintainers.roconnor ];
|
|
|
|
platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
|
2010-10-04 16:07:38 +01:00
|
|
|
};
|
|
|
|
}
|