2024-02-29 18:03:58 +00:00
|
|
|
(use-modules
|
|
|
|
(gnu packages)
|
|
|
|
(gnu packages autotools)
|
|
|
|
(gnu packages guile)
|
|
|
|
(gnu packages guile-xyz)
|
|
|
|
(gnu packages pkg-config)
|
|
|
|
(gnu packages texinfo)
|
|
|
|
(guix build-system gnu)
|
|
|
|
(guix download)
|
|
|
|
(guix gexp)
|
|
|
|
((guix licenses) #:prefix license:)
|
|
|
|
(guix packages)
|
|
|
|
(srfi srfi-1))
|
|
|
|
|
|
|
|
(package
|
|
|
|
(name "guile-runewidth")
|
|
|
|
(version "0.1")
|
|
|
|
(source
|
|
|
|
(local-file
|
|
|
|
(dirname (current-filename))
|
|
|
|
#:recursive?
|
|
|
|
#t
|
|
|
|
#:select?
|
|
|
|
(lambda (file stat)
|
|
|
|
(not (any (lambda (my-string)
|
|
|
|
(string-contains file my-string))
|
|
|
|
(list ".git" ".dir-locals.el" "guix.scm"))))))
|
|
|
|
(build-system gnu-build-system)
|
2024-03-02 18:37:54 +00:00
|
|
|
(arguments
|
|
|
|
`(#:modules
|
|
|
|
((ice-9 match)
|
|
|
|
(ice-9 ftw)
|
|
|
|
,@%gnu-build-system-modules)
|
|
|
|
#:phases
|
|
|
|
(modify-phases
|
|
|
|
%standard-phases
|
|
|
|
(add-after
|
|
|
|
'install
|
|
|
|
'hall-wrap-binaries
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(let* ((compiled-dir
|
|
|
|
(lambda (out version)
|
|
|
|
(string-append
|
|
|
|
out
|
|
|
|
"/lib/guile/"
|
|
|
|
version
|
|
|
|
"/site-ccache")))
|
|
|
|
(uncompiled-dir
|
|
|
|
(lambda (out version)
|
|
|
|
(string-append
|
|
|
|
out
|
|
|
|
"/share/guile/site"
|
|
|
|
(if (string-null? version) "" "/")
|
|
|
|
version)))
|
|
|
|
(dep-path
|
|
|
|
(lambda (env modules path)
|
|
|
|
(list env
|
|
|
|
":"
|
|
|
|
'prefix
|
|
|
|
(cons modules
|
|
|
|
(map (lambda (input)
|
|
|
|
(string-append
|
|
|
|
(assoc-ref inputs input)
|
|
|
|
path))
|
|
|
|
,''())))))
|
|
|
|
(out (assoc-ref outputs "out"))
|
|
|
|
(bin (string-append out "/bin/"))
|
|
|
|
(site (uncompiled-dir out "")))
|
|
|
|
(match (scandir site)
|
|
|
|
(("." ".." version)
|
|
|
|
(for-each
|
|
|
|
(lambda (file)
|
|
|
|
(wrap-program
|
|
|
|
(string-append bin file)
|
|
|
|
(dep-path
|
|
|
|
"GUILE_LOAD_PATH"
|
|
|
|
(uncompiled-dir out version)
|
|
|
|
(uncompiled-dir "" version))
|
|
|
|
(dep-path
|
|
|
|
"GUILE_LOAD_COMPILED_PATH"
|
|
|
|
(compiled-dir out version)
|
|
|
|
(compiled-dir "" version))))
|
|
|
|
,''("generate-east-asian" "generate-emoji"))
|
|
|
|
#t))))))))
|
2024-02-29 18:03:58 +00:00
|
|
|
(native-inputs
|
|
|
|
(list autoconf automake pkg-config texinfo))
|
|
|
|
(inputs (list guile-3.0))
|
|
|
|
(propagated-inputs (list))
|
|
|
|
(synopsis "Library for utf-8 rune widths")
|
|
|
|
(description
|
2024-02-29 20:17:43 +00:00
|
|
|
"A library that provides guile character sets and operations to work with runes that are more than a single character width.")
|
2024-02-29 18:03:58 +00:00
|
|
|
(home-page
|
|
|
|
"https://git.solarpunk.moe/vv/guile-runewidth")
|
|
|
|
(license license:gpl3+))
|
|
|
|
|