nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ fetchurl, lib, mkDerivation, pkg-config, python3, file, bc
2, qtbase, qtsvg, hunspell, makeWrapper #, mythes, boost
3}:
4
5mkDerivation rec {
6 version = "2.3.6.1";
7 pname = "lyx";
8
9 src = fetchurl {
10 url = "ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/${pname}-${version}.tar.xz";
11 sha256 = "sha256-xr7SYzQZiY4Bp8w1AxDX2TS/WRyrcln8JYGqTADq+ng=";
12 };
13
14 # Needed with GCC 12
15 postPatch = ''
16 sed '1i#include <iterator>' -i src/lyxfind.cpp
17 sed '1i#include <cstring>' -i src/insets/InsetListings.cpp
18 '';
19
20 # LaTeX is used from $PATH, as people often want to have it with extra pkgs
21 nativeBuildInputs = [ pkg-config makeWrapper python3 ];
22 buildInputs = [
23 qtbase qtsvg file/*for libmagic*/ bc
24 hunspell # enchant
25 ];
26
27 configureFlags = [
28 "--enable-qt5"
29 #"--without-included-boost"
30 /* Boost is a huge dependency from which 1.4 MB of libs would be used.
31 Using internal boost stuff only increases executable by around 0.2 MB. */
32 #"--without-included-mythes" # such a small library isn't worth a separate package
33 ];
34
35 enableParallelBuilding = true;
36 doCheck = true;
37
38 # python is run during runtime to do various tasks
39 qtWrapperArgs = [
40 " --prefix PATH : ${python3}/bin"
41 ];
42
43 meta = with lib; {
44 description = "WYSIWYM frontend for LaTeX, DocBook";
45 homepage = "http://www.lyx.org";
46 license = licenses.gpl2Plus;
47 maintainers = [ maintainers.vcunat ];
48 platforms = platforms.linux;
49 };
50}
51