2021-08-05 21:33:18 +00:00
|
|
|
{ fetchurl, lib, mkDerivation, pkg-config, python3, file, bc
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtbase, qtsvg, hunspell, makeWrapper #, mythes, boost
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
2021-03-19 17:17:44 +00:00
|
|
|
version = "2.3.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "lyx";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/${pname}-${version}.tar.xz";
|
2021-03-19 17:17:44 +00:00
|
|
|
sha256 = "sha256-xr7SYzQZiY4Bp8w1AxDX2TS/WRyrcln8JYGqTADq+ng=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
# Needed with GCC 12
|
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <iterator>' -i src/lyxfind.cpp
|
|
|
|
sed '1i#include <cstring>' -i src/insets/InsetListings.cpp
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# LaTeX is used from $PATH, as people often want to have it with extra pkgs
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper python3 qtbase ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2023-04-12 12:48:02 +00:00
|
|
|
qtbase qtsvg file/*for libmagic*/ bc
|
2022-09-09 14:08:57 +00:00
|
|
|
hunspell # enchant
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-qt5"
|
|
|
|
#"--without-included-boost"
|
|
|
|
/* Boost is a huge dependency from which 1.4 MB of libs would be used.
|
|
|
|
Using internal boost stuff only increases executable by around 0.2 MB. */
|
|
|
|
#"--without-included-mythes" # such a small library isn't worth a separate package
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
# python is run during runtime to do various tasks
|
|
|
|
qtWrapperArgs = [
|
2021-08-05 21:33:18 +00:00
|
|
|
" --prefix PATH : ${python3}/bin"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "WYSIWYM frontend for LaTeX, DocBook";
|
|
|
|
homepage = "http://www.lyx.org";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.vcunat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|