gnu: rime-data: Iterate over inputs to find Rime schemas.
* gnu/packages/ibus.scm (rime-data)[arguments]: Iterate over inputs to find Rime schemas rather than using a pre-loaded list. [native-inputs]: Move to ... [inputs]: ... here. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
parent
387bc21544
commit
fa7bd6110b
|
@ -363,7 +363,9 @@ traditional Chinese output.")
|
||||||
(base32 "06ad5c4m7xsfr4if5ywshfj2aj5g5b5hwzh38dzccn7c1l2ibi0z"))))
|
(base32 "06ad5c4m7xsfr4if5ywshfj2aj5g5b5hwzh38dzccn7c1l2ibi0z"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no tests
|
`(#:modules ((ice-9 match)
|
||||||
|
,@%gnu-build-system-modules)
|
||||||
|
#:tests? #f ; no tests
|
||||||
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||||
"no_update=1")
|
"no_update=1")
|
||||||
#:phases
|
#:phases
|
||||||
|
@ -376,40 +378,21 @@ traditional Chinese output.")
|
||||||
(("^\\.DEFAULT_GOAL := preset")
|
(("^\\.DEFAULT_GOAL := preset")
|
||||||
".DEFAULT_GOAL := all"))
|
".DEFAULT_GOAL := all"))
|
||||||
#t))
|
#t))
|
||||||
;; Add schema packages into "package/rime" directory.
|
;; Copy Rime schemas into the "package/rime" directory.
|
||||||
(add-after 'unpack 'add-packages
|
(add-after 'unpack 'copy-rime-schemas
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let* ((dest-dir "package/rime"))
|
(let ((dest-dir "package/rime"))
|
||||||
(mkdir-p dest-dir)
|
(mkdir-p dest-dir)
|
||||||
(for-each (lambda (pkg)
|
(for-each
|
||||||
(symlink (assoc-ref inputs
|
(match-lambda
|
||||||
(string-append "rime-" pkg))
|
((name . path)
|
||||||
(string-append dest-dir "/" pkg)))
|
(if (string-prefix? "rime-" name)
|
||||||
'("array"
|
(let ((schema (substring name (string-length "rime-"))))
|
||||||
"bopomofo"
|
(symlink path (string-append dest-dir "/" schema))))))
|
||||||
"cangjie"
|
inputs))
|
||||||
"cantonese"
|
|
||||||
"combo-pinyin"
|
|
||||||
"double-pinyin"
|
|
||||||
"emoji"
|
|
||||||
"essay"
|
|
||||||
"ipa"
|
|
||||||
"jyutping"
|
|
||||||
"luna-pinyin"
|
|
||||||
"middle-chinese"
|
|
||||||
"pinyin-simp"
|
|
||||||
"prelude"
|
|
||||||
"quick"
|
|
||||||
"scj"
|
|
||||||
"soutzoe"
|
|
||||||
"stenotype"
|
|
||||||
"stroke"
|
|
||||||
"terra-pinyin"
|
|
||||||
"wubi"
|
|
||||||
"wugniu")))
|
|
||||||
#t))
|
#t))
|
||||||
(delete 'configure))))
|
(delete 'configure))))
|
||||||
(native-inputs
|
(inputs
|
||||||
`(("rime-array"
|
`(("rime-array"
|
||||||
,(origin
|
,(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
|
Reference in New Issue