Make the Guix package use the current sources
* guix.scm: Use Guile-Git to find the list of source files, and use those files for the source field of the package.
This commit is contained in:
parent
acaaa3c322
commit
88b376c014
17
guix.scm
17
guix.scm
|
@ -1,10 +1,12 @@
|
|||
(use-modules (gnu packages)
|
||||
(use-modules (git)
|
||||
(gnu packages)
|
||||
(gnu packages autotools)
|
||||
(gnu packages code)
|
||||
(gnu packages guile)
|
||||
(gnu packages pkg-config)
|
||||
(guix build utils)
|
||||
(guix build-system gnu)
|
||||
(guix gexp)
|
||||
((guix licenses) #:prefix license:)
|
||||
(guix packages)
|
||||
(guix utils)
|
||||
|
@ -21,10 +23,21 @@
|
|||
(close-pipe pipe)
|
||||
version)))
|
||||
|
||||
(define (make-select)
|
||||
(let* ((directory (repository-discover "/home/samplet/code/geesh"))
|
||||
(repository (repository-open directory))
|
||||
(oid (reference-target (repository-head repository)))
|
||||
(commit (commit-lookup repository oid))
|
||||
(tree (commit-tree commit))
|
||||
(paths (tree-list tree)))
|
||||
(lambda (file stat)
|
||||
(let ((relative (substring file (1+ (string-length *srcdir*)))))
|
||||
(member relative paths)))))
|
||||
|
||||
(package
|
||||
(name "geesh")
|
||||
(version *version*)
|
||||
(source #f)
|
||||
(source (local-file *srcdir* #:recursive? #t #:select? (make-select)))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
|
|
Loading…
Reference in New Issue