Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Access opam package variable in dune rule

$
0
0

I have a dune rule that needs to be conditionally enabled based on the value of an opam package variable. I’ve tried the following setup, but it results in a dependency cycle:

(rule
 (with-stdout-to conf-ios-arch.txt
  (system "opam var conf-ios:arch")))

(rule
 (enabled_if (= %{read:conf-ios-arch.txt} "arm64")
 ...)

Can you suggest another solution?

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles