actually use packages
This commit is contained in:
parent
60ac71a756
commit
9d1b4a6f4b
2 changed files with 32 additions and 0 deletions
30
artoria/packages.scm
Normal file
30
artoria/packages.scm
Normal file
|
@ -0,0 +1,30 @@
|
|||
(define-module (artoria packages)
|
||||
#:use-module ((gnu packages) #:prefix gnu:)
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:export (search-patch
|
||||
search-patches
|
||||
%patch-path))
|
||||
|
||||
(define (search-patch file-name)
|
||||
"Search the patch FILE-NAME. Raise an error if not found."
|
||||
(or (search-path (%patch-path) file-name)
|
||||
(raise (formatted-message (G_ "~a: patch not found")
|
||||
file-name))))
|
||||
|
||||
(define-syntax-rule (search-patches file-name ...)
|
||||
"Return the list of absolute file names corresponding to each
|
||||
FILE-NAME found in %PATCH-PATH."
|
||||
(list (search-patch file-name) ...))
|
||||
|
||||
(define %channel-root
|
||||
(find (lambda (path)
|
||||
(file-exists? (string-append path "/artoria/packages.scm")))
|
||||
%load-path))
|
||||
|
||||
(define %patch-path
|
||||
(make-parameter
|
||||
(append
|
||||
(list (string-append %channel-root "/artoria/packages/patches"))
|
||||
(gnu:%patch-path))))
|
|
@ -40,6 +40,8 @@
|
|||
#:use-module (guix packages)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (artoria packages) ; patches
|
||||
|
||||
#:use-module ((srfi srfi-1) #:hide (zip))
|
||||
#:use-module ((guix licenses) #:prefix license:))
|
||||
|
||||
|
|
Loading…
Reference in a new issue