all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 6541630ddda7b6722eee69b22ad97cffea127e7e 4061 bytes (raw)
name: gnu/packages/guix-extensions.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
 
;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; 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 (gnu packages guix-extensions)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix build-system trivial)
  #:use-module (guix build-system guile)
  #:use-module (guix git-download)
  #:use-module (gnu packages base)
  #:use-module (gnu packages package-management))

(define-public guix-example
  (let ((commit "d600bd742dae9df86e980a25cf1d0ac71ee01438")
        (revision "0"))
    (package
      (name "guix-example")
      (version (git-version "0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://gitlab.com/zimoun/guix-example")
               (commit commit)))
         (file-name (string-append name version "-checkout"))
         (sha256
          (base32
           "0s48b5a1i0vkx5lq7jn9b46zzqv2g3dli7b54sd9365dszqjqzmx"))))
      (build-system guile-build-system)
      (arguments
       '(#:phases (modify-phases %standard-phases
                    (add-after 'install 'move-to-extension-directory
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((out (assoc-ref outputs "out"))
                               (target (string-append
                                        out
                                        "/share/guix/extensions/example.scm")))
                          (mkdir-p (dirname target))
                          (rename-file (car (find-files out "example.scm"))
                                       target)))))))
      (native-inputs (list (lookup-package-input guix "guile") guix))
      (home-page "") ; Should be documentation location for GUIX_EXTENSIONS_PATH
      (synopsis "Example of Guix sub-command extension")
      (description "This Guix extension provides a simple example to extend Guix subcommands.")
      (license license:gpl3+))))

(define-public guix-hello
  (package
    (name "guix-hello")
    (version "0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     (list
      #:modules '((guix build utils))
      #:builder
      #~(begin
          (use-modules (guix build utils))
          (let ((dest (string-append #$output
                                     "/share/guix/extensions/hello.scm"))
                (hello            #$(this-package-input "hello")))
            (mkdir-p (dirname dest))
            (with-output-to-file dest
              (lambda ()
                (format #t
                        "(define-module (guix extensions hello)~@
                #:use-module (guix scripts)~@
                #:export (guix-hello))~@
~@
(define-command (guix-hello . args)~@
                (category extension)~@
                (synopsis \"world\")~@
                (apply system* \"~a/bin/hello\" args))~%"
                        hello)))))))
    (home-page "") ; Should be documentation location for GUIX_EXTENSIONS_PATH
    (inputs
     (list hello))
    (synopsis "Example of Guix sub-command extension")
    (description "This Guix extension provides a shell redirection from
@code{guix hello} to @code{hello}.")
    ;; The package definition is longer than the code;
    ;; let this serve as the declaration of the license.
    (license license:gpl3+)))

debug log:

solving 6541630ddd ...
found 6541630ddd in https://yhetil.org/guix/20221006163935.2282212-2-zimon.toutoune@gmail.com/
found 6294c15f3d in https://yhetil.org/guix/20221006163935.2282212-1-zimon.toutoune@gmail.com/

applying [1/2] https://yhetil.org/guix/20221006163935.2282212-1-zimon.toutoune@gmail.com/
diff --git a/gnu/packages/guix-extensions.scm b/gnu/packages/guix-extensions.scm
new file mode 100644
index 0000000000..6294c15f3d


applying [2/2] https://yhetil.org/guix/20221006163935.2282212-2-zimon.toutoune@gmail.com/
diff --git a/gnu/packages/guix-extensions.scm b/gnu/packages/guix-extensions.scm
index 6294c15f3d..6541630ddd 100644

Checking patch gnu/packages/guix-extensions.scm...
Applied patch gnu/packages/guix-extensions.scm cleanly.
Checking patch gnu/packages/guix-extensions.scm...
Applied patch gnu/packages/guix-extensions.scm cleanly.

index at:
100644 6541630ddda7b6722eee69b22ad97cffea127e7e	gnu/packages/guix-extensions.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.