From 5cf38fb6d6f4ab68cff5d58a91d7907a0b9f1327 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 5 Jun 2023 20:09:06 +0300 Subject: doc: cookbook: Update example my-libgit2 package. * doc/guix-cookbook.texi (Packaging Tutorial): Improve the code quality of the example my-libgit2 package. --- doc/guix-cookbook.texi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index b9f5f6b6a9..b3c3bac971 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -844,12 +844,12 @@ another, more sophisticated package (slightly modified from the source): #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system cmake) - #:use-module (gnu packages ssh) - #:use-module (gnu packages web) + #:use-module (gnu packages compression) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages compression) - #:use-module (gnu packages tls)) + #:use-module (gnu packages ssh) + #:use-module (gnu packages tls) + #:use-module (gnu packages web)) (define-public my-libgit2 (let ((commit "e98d0a37c93574d2c6107bf7f31140b548c6a7bf") @@ -886,9 +886,11 @@ another, more sophisticated package (slightly modified from the source): (("/bin/rm") (which "rm"))))) ;; Run checks more verbosely. (replace 'check - (lambda _ (invoke "./libgit2_clar" "-v" "-Q"))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./libgit2_clar" "-v" "-Q")))) (add-after 'unpack 'make-files-writable-for-tests - (lambda _ (for-each make-file-writable (find-files "." ".*"))))))) + (lambda _ (for-each make-file-writable (find-files "."))))))) (inputs (list libssh2 http-parser python-wrapper)) (native-inputs -- cgit 1.4.1