[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/67: gnu: commencement: Add git-fetch-from-tarball utility.
From: |
guix-commits |
Subject: |
03/67: gnu: commencement: Add git-fetch-from-tarball utility. |
Date: |
Tue, 18 Jul 2023 10:56:59 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 161bab138845fe307ec92b8fea181e00ece86e58
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Jul 18 12:49:28 2023 +0200
gnu: commencement: Add git-fetch-from-tarball utility.
* gnu/packages/commencement.scm (git-fetch-from-tarball): New procedure.
---
gnu/packages/commencement.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d0603e62c8..1d69c2a80f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -57,7 +57,10 @@
#:use-module (gnu packages xml)
#:use-module (guix gexp)
#:use-module (guix packages)
+ #:use-module ((guix store) #:select (%store-monad))
+ #:use-module (guix monads)
#:use-module (guix download)
+ #:use-module ((guix git-download) #:select (git-reference git-file-name))
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
@@ -90,6 +93,34 @@
;;;
;;; Code:
+(define* (git-fetch-from-tarball tarball)
+ (lambda* (url hash-algo hash
+ #:optional name
+ #:key (system (%current-system))
+ (guile %bootstrap-guile))
+ (mlet %store-monad ((guile (package->derivation guile system)))
+ (gexp->derivation
+ (or name "git-checkout")
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils)
+ (ice-9 ftw)
+ (ice-9 match))
+ (setenv "PATH"
+ #+(file-append %bootstrap-coreutils&co "/bin"))
+ (invoke (string-append #+tar "/bin/tar")
+ "xf" #$tarball)
+ (match (scandir ".")
+ (("." ".." directory)
+ (copy-recursively directory #$output)))))
+ #:recursive? #t
+ #:hash-algo hash-algo
+ #:hash hash
+ #:system system
+ #:guile-for-build guile
+ #:graft? #f
+ #:local-build? #t))))
+
(define bootar
(package
(name "bootar")
- 49/67: gnu: fontforge: Support build on the Hurd., (continued)
- 49/67: gnu: fontforge: Support build on the Hurd., guix-commits, 2023/07/18
- 60/67: gnu: guix: Disable some tests on the Hurd., guix-commits, 2023/07/18
- 55/67: system: hurd: Add swap-services to hurd-default-essential-services., guix-commits, 2023/07/18
- 48/67: gnu: pango: Support build for the Hurd., guix-commits, 2023/07/18
- 66/67: gnu: Add libc-locales-for-target and glibc-locales/hurd., guix-commits, 2023/07/18
- 26/67: gnu: tcl: Remove failing tests on the Hurd.., guix-commits, 2023/07/18
- 65/67: DRAFT system: examples: Add devel-hurd.tmpl., guix-commits, 2023/07/18
- 29/67: gnu: emacs: Depend on libc-for-target., guix-commits, 2023/07/18
- 47/67: gnu: harfbuzz: Support build for the Hurd., guix-commits, 2023/07/18
- 04/67: gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20221224., guix-commits, 2023/07/18
- 03/67: gnu: commencement: Add git-fetch-from-tarball utility.,
guix-commits <=
- 05/67: gnu: commencement: mig-boot0: Update to 1.8+git20230520., guix-commits, 2023/07/18
- 06/67: gnu: commencement: hurd-headers-boot0: Update to 0.9.git20230216., guix-commits, 2023/07/18
- 07/67: gnu: commencement: hurd-minimal-boot0: Update to 0.9.git20230216., guix-commits, 2023/07/18
- 08/67: gnu: mig: Update to 1.8+git20230520., guix-commits, 2023/07/18
- 09/67: Revert "gnu: libunistring: Fix make check for the Hurd.", guix-commits, 2023/07/18
- 13/67: Revert "gnu: sed: Skip failing test on GNU/Hurd.", guix-commits, 2023/07/18
- 15/67: gnu: diffutils: Remove test-perror2 from XFAIL_TESTS on the Hurd., guix-commits, 2023/07/18
- 16/67: gnu: gettext-minimal: Remove XFAIL_TESTS for the Hurd., guix-commits, 2023/07/18
- 20/67: gnu: mpfr: Skip failing test on the Hurd., guix-commits, 2023/07/18
- 23/67: gnu: c-ares: Skip failing tests on the Hurd., guix-commits, 2023/07/18