From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gammel Holte Subject: Packaging LyX Date: Fri, 22 Dec 2017 16:44:47 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140e47442db110560efb286" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPVC-0002wV-E2 for guix-devel@gnu.org; Fri, 22 Dec 2017 10:44:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSPVA-0008FQ-V0 for guix-devel@gnu.org; Fri, 22 Dec 2017 10:44:50 -0500 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]:39034) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSPVA-0008FD-OU for guix-devel@gnu.org; Fri, 22 Dec 2017 10:44:48 -0500 Received: by mail-qt0-x233.google.com with SMTP id k19so36718435qtj.6 for ; Fri, 22 Dec 2017 07:44:48 -0800 (PST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --001a1140e47442db110560efb286 Content-Type: text/plain; charset="UTF-8" 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+)) --001a1140e47442db110560efb286 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

I'm planning to sw= itch 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 c= ode 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 i= nterpreter 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 Ni= xpkgs:

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

I als= o had some doubts when packaging:

- Is a xz source prefer= red to a gz one?
- Nix uses qtcore and qtsvg as inputs, but i= f 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 t= he package should live in tex.scm or elsewhere

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

Thanks.<= br>

(use-modules
=C2=A0(guix packages)
=C2=A0(guix down= load)
=C2=A0(guix build-system gnu)
=C2=A0(guix licenses)
=C2=A0(g= nu packages algebra)
=C2=A0(gnu packages compression)
=C2=A0(gnu pack= ages pkg-config)
=C2=A0(gnu packages python)
=C2=A0(gnu packages qt))=

(package
=C2=A0(name "lyx")
=C2=A0(version "2.= 2.3")
=C2=A0(source (origin
=C2=A0=C2=A0=C2=A0 =C2=A0 (method ur= l-fetch)
=C2=A0=C2=A0=C2=A0 =C2=A0 (uri (string-append "ftp://ftp.lyx.org/pub/lyx/stab= le/2.2.x/lyx-"
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 version ".tar.gz"))
= =C2=A0=C2=A0=C2=A0 =C2=A0 (sha256
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 (base3= 2 "0xvaz0i371nn2ndinc0d3ywj76ivb62649a4sdgwbivisiahd2fj"))))
= =C2=A0(build-system gnu-build-system)
=C2=A0(inputs `(("pkg-config&= quot; ,pkg-config)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 ("python" ,= python-2)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 ("qt" ,qt)
=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0 ("bc" ,bc)
=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0 ("zlib" ,zlib)))
=C2=A0(arguments `(#:configure-flags (= list "--enable-qt5")))
=C2=A0(home-page "http://www.lyx.org")
=C2=A0(synopsis "An ad= vanced WYSIWYM document processor and LaTeX front-end")
=C2=A0(desc= ription "LyX is a document processor that encourages an approach
to= writing based on the structure of your documents (WYSIWYM) and not
simp= ly their appearance (WYSIWYG). LyX combines the power and
flexibility of= TeX/LaTeX with the ease of use of a graphical
interface.")
=C2= =A0(license gpl2+))
--001a1140e47442db110560efb286--