Merge pull request #84816 from FlorianFranzen/texmacs

texmacs: 1.99.11 -> 1.99.13
This commit is contained in:
Doron Behar 2020-10-20 20:17:26 +03:00 committed by GitHub
commit 0f3d40ef68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 21 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, callPackage,
fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
{ lib, mkDerivation, callPackage, fetchurl, fetchpatch,
guile_1_8, qtbase, xmodmap, which, freetype,
libjpeg,
sqlite,
tex ? null,
@ -16,23 +16,30 @@
let
pname = "TeXmacs";
version = "1.99.11";
version = "1.99.13";
common = callPackage ./common.nix {
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
};
in
stdenv.mkDerivation {
mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
sha256 = "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg";
sha256 = "Aq0cS47QqmFQHelxRjANeJlgXCXagnYRykpAq7wHqbQ=";
};
cmakeFlags = [
# Texmacs' cmake build as of writing defaults to Qt5,
# but we haven't updated to that yet.
"-DTEXMACS_GUI=Qt4"
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=";
})
];
enableParallelBuilding = true;
@ -40,8 +47,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
guile_1_8
qt4
makeWrapper
qtbase
ghostscriptX
freetype
libjpeg
@ -51,18 +57,26 @@ stdenv.mkDerivation {
];
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";
qtWrapperArgs = [
"--suffix" "PATH" ":" (lib.makeBinPath [
xmodmap
which
ghostscriptX
aspell
tex
git
python3
])
];
postFixup = ''
wrapQtApp $out/bin/texmacs
'';
inherit (common) postPatch;
meta = common.meta // {
maintainers = [ stdenv.lib.maintainers.roconnor ];
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
maintainers = [ lib.maintainers.roconnor ];
platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
};
}

View file

@ -7373,7 +7373,7 @@ in
inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa;
tex = texlive.combined.scheme-small;
extraFonts = true;
} else callPackage ../applications/editors/texmacs {
} else libsForQt5.callPackage ../applications/editors/texmacs {
tex = texlive.combined.scheme-small;
extraFonts = true;
};