81 lines
2.7 KiB
Scheme
81 lines
2.7 KiB
Scheme
(use-modules
|
|
(guix)
|
|
(guix git-download)
|
|
(guix packages)
|
|
((guix licenses) #:prefix license:)
|
|
(guix download)
|
|
(guix build-system gnu)
|
|
(gnu packages)
|
|
(gnu packages autotools)
|
|
(gnu packages guile)
|
|
(gnu packages guile-xyz)
|
|
(gnu packages package-management)
|
|
(gnu packages pkg-config)
|
|
(gnu packages texinfo))
|
|
|
|
(define vcs-file?
|
|
(or (git-predicate (current-source-directory))
|
|
(const #t)))
|
|
|
|
(package
|
|
(name "guix-cantrips")
|
|
(version "0.1-src")
|
|
(source (local-file (dirname (current-filename)) #:recursive? #t
|
|
#:select? vcs-file?))
|
|
(build-system gnu-build-system)
|
|
(arguments
|
|
(list
|
|
#:make-flags
|
|
#~(list "GUILE_AUTO_COMPILE=0")
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(delete 'strip)
|
|
(add-before 'configure 'hall-build
|
|
(lambda _
|
|
(system* "hall" "build" "-x")))
|
|
(add-after 'hall-build 'autoreconf
|
|
(lambda _
|
|
(system* "autoreconf" "-vif")))
|
|
(add-after 'install 'hall-wrap-binaries
|
|
(lambda _
|
|
(use-modules (ice-9 ftw))
|
|
(define (compiled-dir out version)
|
|
(string-append out "/lib/guile/"
|
|
version
|
|
"/site-ccache"))
|
|
(define (uncompiled-dir out version)
|
|
(string-append out
|
|
"/share/guile/site"
|
|
(if (string-null? version) ""
|
|
"/")
|
|
version))
|
|
(define (dep-path env modules path)
|
|
(list env ":"
|
|
'prefix
|
|
(cons modules
|
|
(map (lambda (input)
|
|
(string-append input path))
|
|
(list #$guile-config
|
|
#$guile-lib
|
|
#$guile-simple-iterators)))))
|
|
(define bin (string-append #$output "/bin/"))
|
|
(define site (uncompiled-dir #$output ""))
|
|
(define version (caddr (scandir site)))
|
|
(wrap-program (string-append bin "guix-cantrips")
|
|
(dep-path
|
|
"GUILE_LOAD_PATH"
|
|
(uncompiled-dir #$output version)
|
|
(uncompiled-dir "" version))
|
|
(dep-path
|
|
"GUILE_LOAD_COMPILED_PATH"
|
|
(compiled-dir #$output version)
|
|
(compiled-dir "" version))))))))
|
|
(native-inputs (list autoconf automake pkg-config texinfo guile-hall))
|
|
(inputs (list guile-3.0))
|
|
(propagated-inputs (list guix))
|
|
(synopsis "")
|
|
(description "")
|
|
(home-page "")
|
|
(license license:gpl3+))
|
|
|