@@ -307,6 +307,55 @@ (define-public shepherd
(license license:gpl3+)
(home-page "https://www.gnu.org/software/shepherd/")))
+;; This is the Shepherd package used by Guix. This package variant
+;; allows us to add new features and fix bugs in Shepherd and use the
+;; new features in Guix, without having to go through the 'staging'
+;; branch, and without having to wait for a new release, see
+;; [TODO] in the manual.
+(define-public shepherd-for-guix
+ (let* ((version "0.8.1")
+ ;; If it's an unreleased commit:
+ (commit "3ee9a7193d73821d6f1dd76a745ed5e4bb1a78c8")
+ ;; Use the below form if it's a release, and also set REVISION to #f.
+ ;; (commit (string-append "v" version))
+ (revision "1"))
+ (package
+ (inherit shepherd)
+ (version (if revision
+ (git-version version revision commit)
+ version))
+ (source
+ (origin
+ (inherit (package-source shepherd))
+ (method git-fetch)
+ (uri (git-reference
+ ;; Build from git and add Autotools inputs, to make developing
+ ;; Shepherd easier. It enables easier package inheritance.
+ (url "https://git.savannah.gnu.org/git/shepherd.git/")
+ (commit commit)))
+ (snippet #f) ; TODO delete this once parent is refactored.
+ (sha256
+ (base32
+ "07zaazw33p98n38j9hgjaipjvbh9mf0x3b5nbri5nyrxbgn0vvvb"))))
+ ;; TODO merge this back into the parent with a patch to staging.
+ (arguments
+ (append
+ (package-arguments shepherd)
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'strip) ; Avoid some warnings from stripping .go files.
+ (add-after 'unpack 'patch-source
+ (lambda _
+ ;; Build with -O1 to work around <https://bugs.gnu.org/48368>.
+ (substitute* "Makefile.am"
+ (("compile --target")
+ "compile -O1 --target"))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs shepherd)
+ (prepend autoconf automake gettext-minimal help2man texinfo)))
+ (description "A package variant for use in Guix. It helps lowering
+the build time of Guix when working on Shepherd."))))
+
(define-public guile2.2-shepherd
(package
(inherit shepherd)
@@ -88,7 +88,7 @@ (define-record-type* <shepherd-configuration>
shepherd-configuration make-shepherd-configuration
shepherd-configuration?
(shepherd shepherd-configuration-shepherd
- (default shepherd)) ; file-like
+ (default shepherd-for-guix)) ; file-like
(services shepherd-configuration-services
(default '()))) ; list of <shepherd-service>