Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
28 lines
784 B
Racket
28 lines
784 B
Racket
#lang racket/base
|
|
(require
|
|
racket/function
|
|
racket/list
|
|
racket/pretty
|
|
racket/string
|
|
setup/dirs
|
|
)
|
|
|
|
(define config-file (build-path (find-config-dir) "config.rktd"))
|
|
|
|
(define lib-paths
|
|
((compose remove-duplicates
|
|
(curry map (curryr string-trim "-L" #:right? #f))
|
|
(curry filter (curryr string-prefix? "-L"))
|
|
string-split)
|
|
(getenv "NIX_LDFLAGS")))
|
|
|
|
(define config
|
|
(let* ([prev-config (read-installation-configuration-table)]
|
|
[prev-lib-search-dirs (hash-ref prev-config 'lib-search-dirs '(#f))]
|
|
[lib-search-dirs (remove-duplicates (append lib-paths prev-lib-search-dirs))])
|
|
(hash-set prev-config 'lib-search-dirs lib-search-dirs)))
|
|
|
|
(call-with-output-file config-file
|
|
#:exists 'replace
|
|
(curry pretty-write config))
|