guix-patches
[Top][All Lists]
Advanced

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

[bug#52731] [PATCH] import: texlive: Check if Subversion is installed.


From: zimoun
Subject: [bug#52731] [PATCH] import: texlive: Check if Subversion is installed.
Date: Wed, 22 Dec 2021 15:23:54 +0100

Hi,

Your patch is an improvement considering this old discussion [1].

1: <https://issues.guix.gnu.org/issue/28303#5>


On Wed, 22 Dec 2021 at 14:42, Xinglu Chen <public@yoctocell.xyz> wrote:

> Which ‘svn-fetch’ are you referring to (there are two AFAICS)?  The
> Texlive importer uses ‘download-multi-svn-to-store’, which itself uses
> ‘svn-fetch’ from (guix build svn), but it requires the ‘svn’ program to
> be in PATH.
>
> There is another ‘svn-fetch’ procedure, in (guix svn-download), but that
> one returns a fixed-output derivation, so it can only be used if we
> already know the hash (which we don’t, that’s why we are fetching the
> SVN repo).

The one in (guix svn-download) uses under the hood (guix build svn), if
I read correctly:

--8<---------------cut here---------------start------------->8---
      #~(begin
          (use-modules (guix build svn))
          (svn-fetch '#$(svn-reference-url ref)
                     '#$(svn-reference-revision ref)
                     #$output
                     #:svn-command (string-append #+svn "/bin/svn")
                     #:recursive? #$(svn-reference-recursive? ref)
                     #:user-name #$(svn-reference-user-name ref)
                     #:password #$(svn-reference-password ref)))))
--8<---------------cut here---------------end--------------->8---

Anyway. :-)

> Importers that fetch a Git repo don’t need ‘git’ to be in PATH since
> they use the Guile-Git bindings to libgit2.  But we don’t have Guile
> bindings to SVN (or Hg, CVS, Bzr), so the program has to be installed on
> the host system.

I think it is not related how the call is done, here (invoke “svn”
“export” …) and not (libsvn-export …).

In the snippet above, #+svn is transparently picked from the current
subversion package.  Maybe the bit

--8<---------------cut here---------------start------------->8---
(define (subversion-package)
  "Return the default Subversion package."
  (let ((distro (resolve-interface '(gnu packages version-control))))
    (module-ref distro 'subversion)))
--8<---------------cut here---------------end--------------->8---

could go to ’(guix build svn)’, used overthere instead of “#:key
(svn-command "svn")”; and maybe exported if needed.

WDYT?


1: <https://issues.guix.gnu.org/issue/28303#5>


Cheers,
simon





reply via email to

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