; to update, browse to https://hg.mozilla.org/projects/nss/tags
; find the last release (click on the tag, find the "changeset .. ID" line)
; rm -f lib/certdata.txt
; dune build lib/certdata.txt
; mv _build/default/lib/certdata.txt lib
;(rule
; (targets certdata.txt)
; (action
;  (bash
;    "wget https://hg.mozilla.org/projects/nss/raw-file/c8e02a52aa1979e28bdba814df1b72fc743d66d4/lib/ckfw/builtins/certdata.txt -O %{targets}")))

(rule
 (targets trust_anchor.ml)
 (deps certdata.txt)
 (action
  (run %{bin:extract-from-certdata} certdata.txt --output trust_anchor.ml)))

(library
 (name ca_certs_nss)
 (public_name ca-certs-nss)
 (modules ca_certs_nss trust_anchor)
 (libraries x509 mirage-clock mirage-crypto))
