diff mbox series

[bug#61750,1/2] gnu: shepherd: Build Shepherd from git.

Message ID 20230224140243.15315-1-attila@lendvai.name
State New
Headers show
Series [bug#61750,1/2] gnu: shepherd: Build Shepherd from git. | expand

Commit Message

Attila Lendvai Feb. 24, 2023, 2:02 p.m. UTC
The rationale for this is that it makes it simpler to start VM's with a
Shepherd that is compiled from a local checkout.  This facilitates hacking on
Shepherd itself, and testing it in the Guix init environment, by speeding up
the edit-compile-test cycle.

* gnu/packages/admin.scm (shepherd-0.9): Source points to the git repo; adjust
native-inputs accordingly.  Also delete the strip build phase.
---

the first commit works, except when cross-compiling: help2man wants
to run the foreign binary, and fails.

the second commit is a WIP attempt to get the compiled man pages
from the native package when cross compiling. it's not ready,
but i got stuck at needing to gunzip the man pages, and where
to put them to convince the makefile to not execute help2man, etc.

my suggestion is to simply get rid of the not-very-useful
auto generated man page to fix cross-compilation.

if that's not desirable, then the second commit needs to be
polished, or implemented some other way.

 gnu/packages/admin.scm | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index d4cc8ca6ca..91f98bf48e 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -335,12 +335,13 @@  (define-public shepherd-0.9
     (inherit shepherd)
     (version "0.9.3")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/shepherd/shepherd-"
-                                  version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.savannah.gnu.org/git/shepherd.git/")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name "shepherd" version))
               (sha256
-               (base32
-                "0qy2yq13xhf05an5ilz7grighdxicx56211yaarqq5qigiiybc32"))))
+               (base32 "1pvdpx2mfki8wvhcac54p8fn5idqszicww60ikswszz2cv5d0s11"))))
     (arguments
      (list #:configure-flags #~'("--localstatedir=/var")
            #:make-flags #~'("GUILE_AUTO_COMPILE=0")
@@ -360,12 +361,17 @@  (define-public shepherd-0.9
                                       (this-package-input "guile-fibers")
                                       "/lib/guile/3.0/site-ccache"))))))
                         #~%standard-phases)))
-
-    ;; Note: Use 'guile-3.0-latest' to address the continuation-related memory
-    ;; leak reported at <https://issues.guix.gnu.org/58631>.
-    (native-inputs (list pkg-config guile-3.0-latest
-                         guile-fibers-1.1))       ;for cross-compilation
-    (inputs (list guile-3.0-latest guile-fibers-1.1))))
+    (native-inputs
+     (list autoconf
+           automake
+           gettext-minimal
+           guile-3.0
+           guile-fibers-1.1             ; for cross-compilation
+           help2man
+           pkg-config
+           texinfo))
+    (inputs (list guile-3.0
+                  guile-fibers-1.1))))
 
 (define-public guile2.2-shepherd
   (package