unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 716fff56b63c66cb30d0c3141e34bbf7256134f8 2267 bytes (raw)
name: guix/build/janet-build-system.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
53
54
55
56
57
58
59
60
61
62
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guix build janet-build-system)
  #:use-module ((guix build gnu-build-system) #:prefix gnu:)
  #:use-module (guix build utils)
  #:use-module (guix utils)
  #:export (%standard-phases
            janet-build))

;; Commentary:
;;
;; Builder-side code of the standard Janet package build procedure.
;;
;; Code:

(define* (build #:rest arguments)
  "Build a Janet package with jpm"
  (invoke "jpm" "--verbose"
          (string-append "--compiler=" (cc-for-target))
          (string-append "--cpp-compiler=" (cxx-for-target))
          "build"))

(define* (check #:key tests? #:allow-other-keys)
  "Test a janet package with jpm.  Skip the tests if TESTS?  is #f."
  (if tests?
      (invoke "jpm" "--verbose" "test")))

(define* (install #:key outputs #:allow-other-keys)
  "Install a Janet package with jpm"
  (let ((out (assoc-ref outputs "out")))
    (invoke "jpm" "--verbose"
            (string-append "--modpath=" out "/lib/janet")
            (string-append "--binpath=" out "/bin")
            "install")))

(define %standard-phases
  (modify-phases gnu:%standard-phases
    (delete 'bootstrap)
    (delete 'configure)
    (replace 'build build)
    (replace 'check check)
    (replace 'install install)))

(define* (janet-build #:key inputs (phases %standard-phases)
                     #:allow-other-keys #:rest args)
  (apply gnu:gnu-build #:inputs inputs #:phases phases args))

debug log:

solving da4a6f3698 ...
found da4a6f3698 in https://yhetil.org/guix-devel/alpine.DEB.2.21.2105150054190.2109@marsh.hcoop.net/

applying [1/1] https://yhetil.org/guix-devel/alpine.DEB.2.21.2105150054190.2109@marsh.hcoop.net/
diff --git a/guix/build/janet-build-system.scm b/guix/build/janet-build-system.scm\r
new file mode 100644\r
index 0000000000..da4a6f3698\r

1:7: trailing whitespace.
;;; GNU Guix --- Functional package management for GNU\r
1:8: trailing whitespace.
;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>\r
1:9: trailing whitespace.
;;;\r
1:10: trailing whitespace.
;;; This file is part of GNU Guix.\r
1:11: trailing whitespace.
;;;\r
Checking patch guix/build/janet-build-system.scm...
Applied patch guix/build/janet-build-system.scm cleanly.
warning: squelched 57 whitespace errors
warning: 62 lines add whitespace errors.

index at:
100644 716fff56b63c66cb30d0c3141e34bbf7256134f8	guix/build/janet-build-system.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).