Make a start on prerequisite data.
This commit is contained in:
parent
2a8fb2ce5b
commit
6f217e006e
3 changed files with 21 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
scratch/
|
||||
/.dir-locals.el
|
17
modules/ordo/prerequisite-data.scm
Normal file
17
modules/ordo/prerequisite-data.scm
Normal file
|
@ -0,0 +1,17 @@
|
|||
(define-module (ordo prerequisite-data)
|
||||
#:use-module (oop goops))
|
||||
|
||||
(define-class <prerequisite-data> ())
|
||||
|
||||
(define-class <local-file> (<prerequisite-data>)
|
||||
(path #:init-keyword #:path #:getter get-path))
|
||||
|
||||
(define-method (equal? (x <local-file>) (y <local-file>))
|
||||
(equal? (get-path x) (get-path y)))
|
||||
|
||||
(define (local-file path)
|
||||
(make <local-file> #:path path))
|
||||
|
||||
(define-class <local-lookup> (<prerequisite-data>)
|
||||
(handler #:init-keyword #:handler #:getter get-handler)
|
||||
(args #:init-keyword #:args :getter get-args))
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
;; This is based on reading guix/build/syscalls.scm but less general
|
||||
;; than their implementation.
|
||||
;; TODO: why is this needed? The guile standard library has mkdtemp
|
||||
;; that seems to do the same thing.
|
||||
(define mkdtemp!
|
||||
(let* ((ptr (dynamic-func "mkdtemp" (dynamic-link)))
|
||||
(proc (pointer->procedure '* ptr '(*) #:return-errno? #t)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue