guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Packaging LyX


From: Gammel Holte
Subject: Packaging LyX
Date: Fri, 22 Dec 2017 16:44:47 +0100

Hi all,

I'm planning to switch a dozen or so machines to GuixSD.

The only major package my users are missing is LyX (a LaTeX editor, see https://www.lyx.org/) so I packaged it, and it works fine. See code below.

I would appreciate some help wrapping python. I'm familiar how to do this in Nix, but not in Guix. Despite requiring a python interpreter for during build, LyX dynamically looks for a python interpreter at runtime. Obviously, it'd be desirable to link LyX to the python instance used as input. For the record this is the LyX package in Nixpkgs:

https://github.com/NixOS/nixpkgs/blob/86da6d441f7a248b02d545ac1b2c90ef27f42d0b/pkgs/applications/misc/lyx/default.nix

I also had some doubts when packaging:

- Is a xz source preferred to a gz one?
- Nix uses qtcore and qtsvg as inputs, but if I use these in Guix (in place of the whole qt) then LyX can't render its icons (svgz)

There are another minor TODOs:

- Transition to proper package and define-public syntax, as I was installing with guix package -f
- Decide whether the package should live in tex.scm or elsewhere

Once this is done, I'm happy to submit a proper patch.

Thanks.

(use-modules
 (guix packages)
 (guix download)
 (guix build-system gnu)
 (guix licenses)
 (gnu packages algebra)
 (gnu packages compression)
 (gnu packages pkg-config)
 (gnu packages python)
 (gnu packages qt))

(package
 (name "lyx")
 (version "2.2.3")
 (source (origin
      (method url-fetch)
      (uri (string-append "ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/lyx-"
                  version ".tar.gz"))
      (sha256
       (base32 "0xvaz0i371nn2ndinc0d3ywj76ivb62649a4sdgwbivisiahd2fj"))))
 (build-system gnu-build-system)
 (inputs `(("pkg-config" ,pkg-config)
       ("python" ,python-2)
       ("qt" ,qt)
       ("bc" ,bc)
       ("zlib" ,zlib)))
 (arguments `(#:configure-flags (list "--enable-qt5")))
 (home-page "http://www.lyx.org")
 (synopsis "An advanced WYSIWYM document processor and LaTeX front-end")
 (description "LyX is a document processor that encourages an approach
to writing based on the structure of your documents (WYSIWYM) and not
simply their appearance (WYSIWYG). LyX combines the power and
flexibility of TeX/LaTeX with the ease of use of a graphical
interface.")
 (license gpl2+))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]