guix-patches
[Top][All Lists]
Advanced

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

[bug#54216] [PATCH v4] gnu: shepherd: Build Shepherd 0.9.0 from git.


From: Attila Lendvai
Subject: [bug#54216] [PATCH v4] gnu: shepherd: Build Shepherd 0.9.0 from git.
Date: Sun, 1 May 2022 16:31:17 +0200

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 greatly
reducing 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.
---
 gnu/packages/admin.scm | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 94636faf8b..fd7df3f09f 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -314,19 +314,23 @@ (define-public shepherd shepherd-0.8)
 (define-public shepherd-0.9
   (package
     (inherit shepherd)
+    (name "shepherd") ; Only for git-file-name below; not ideal.
     (version "0.9.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/shepherd/shepherd-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1rdwhrcibs2ly4hjwwb5kmzb133ccjmrfvb0a70cqkv9jy1pg061"))))
+    (source
+     (origin
+       (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 name version))
+       (sha256
+        (base32 "1caxw0549jfadnvjbh0jlawg6k535mb5mc226darcfihvjy3crma"))))
     (arguments
      (list #:configure-flags #~'("--localstatedir=/var")
            #:make-flags #~'("GUILE_AUTO_COMPILE=0")
            #:phases (if (%current-target-system)
                         #~(modify-phases %standard-phases
+                            (delete 'strip)  ; Warns when stripping .go files.
                             (add-before 'configure 'set-fibers-directory
                               (lambda _
                                 ;; When cross-compiling, refer to the target
@@ -341,8 +345,10 @@ (define-public shepherd-0.9
                                       (this-package-input "guile-fibers")
                                       "/lib/guile/3.0/site-ccache"))))))
                         #~%standard-phases)))
-    (native-inputs (list pkg-config guile-3.0
-                         guile-fibers-1.1))       ;for cross-compilation
+    (native-inputs
+     (list autoconf automake gettext-minimal help2man texinfo pkg-config
+           guile-fibers-1.1             ; for cross-compilation
+           guile-3.0))
     (inputs (list guile-3.0 guile-fibers-1.1))))
 
 (define-public guile2.2-shepherd
-- 
2.35.1






reply via email to

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