all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob ea9c63f86fe3957de366ef193dac2bc87589a985 1947 bytes (raw)
name: build-aux/guix.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
;;; guix.scm -- Guix package definition

(use-modules
  (guix packages)
  ((guix git-download) #:select (git-version))
  ((guix build utils) #:select (find-files))
  ((guix gexp) #:select (local-file))
  ((gnu packages) #:select (specification->package))
  ((ice-9 popen) #:select (open-pipe))
  ((ice-9 rdelim) #:select (read-string))
  ((srfi srfi-1) #:select (any)))

(define %source-dir (dirname (dirname (current-filename))))

(define %git-commit
  (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ)))

(define (keep-file? file stat)
  (not (any (lambda (my-string)
              (string-contains file my-string))
            (list ".git" ".dir-locals.el" "build-aux"))))

(define (build-from-git base)
  (package
    (inherit base)
    (version (git-version (package-version base) "HEAD" %git-commit))
    (source (local-file %source-dir
                        #:recursive? #t
                        #:select? keep-file?))
    (native-inputs
     `(("autoconf" ,(specification->package "autoconf"))
       ("automake" ,(specification->package "automake"))
       ("gettext" ,(specification->package "gettext"))
       ("help2man" ,(specification->package "help2man"))
       ("texinfo" ,(specification->package "texinfo"))
       ,@(package-native-inputs base)))
    (arguments
     `(#:configure-flags '("--localstatedir=/var")
       #:make-flags (list "GUILE_AUTO_COMPILE=0")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'make-po-directory-writable
           (lambda _
             (for-each make-file-writable
               (find-files "po" "."))
               #t)))))))

(list (build-from-git (specification->package "shepherd"))
      (build-from-git (specification->package "guile2.2-shepherd"))
      ;; This version FTBFS due to an import of '(ice-9 threads)' in modules/shepherd.scm
      ;(build-from-git (specification->package "guile2.0-shepherd"))
      )

debug log:

solving ea9c63f ...
found ea9c63f in https://yhetil.org/guix/20201119125244.3674-1-efraim@flashner.co.il/

applying [1/1] https://yhetil.org/guix/20201119125244.3674-1-efraim@flashner.co.il/
diff --git a/build-aux/guix.scm b/build-aux/guix.scm
new file mode 100644
index 0000000..ea9c63f

Checking patch build-aux/guix.scm...
Applied patch build-aux/guix.scm cleanly.

index at:
100644 ea9c63f86fe3957de366ef193dac2bc87589a985	build-aux/guix.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.