Skip to content

Commit

Permalink
fix(opam): versions have a prefix v.........
Browse files Browse the repository at this point in the history
  • Loading branch information
W95Psp committed Jan 23, 2025
1 parent 2c4b368 commit 6501524
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
28 changes: 14 additions & 14 deletions engine/dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
(depends
(ocaml (>= "4.14.1"))
dune
(base (= "0.16"))
(core (= "0.16"))
(yojson (= "2.2"))
(base (= "v0.16.2"))
(core (= "v0.16.2"))
(yojson (= "2.2.0"))
(non_empty_list (= "0.1"))
(pprint (= "0.1"))
(ppx_deriving_yojson (= "3.7"))
(ppx_yojson_conv (= "0.15"))
(ppx_sexp_conv (= "0.16"))
(ppx_compare (= "0.16"))
(ppx_hash (= "0.16"))
(ppx_deriving (= "5.2"))
(cmdliner (= "1.3"))
(angstrom (= "0.16"))
(re (= "1.11"))
(ppx_deriving_yojson (= "3.7.0"))
(ppx_yojson_conv (= "v0.15.1"))
(ppx_sexp_conv (= "v0.16.0"))
(ppx_compare (= "v0.16.0"))
(ppx_hash (= "v0.16.0"))
(ppx_deriving (= "5.2.1"))
(cmdliner (= "1.3.0"))
(angstrom (= "0.16.0"))
(re (= "1.11.0"))
(ppx_matches (= "0.1"))
(ppx_string (= "0.16"))
(logs (= "0.7"))
(ppx_string (= "v0.16.0"))
(logs (= "0.7.0"))
(ocamlgraph (= "2.1"))

js_of_ocaml-compiler
Expand Down
28 changes: 14 additions & 14 deletions engine/hax-engine.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ bug-reports: "https://github.com/hacspec/hax/issues"
depends: [
"ocaml" {>= "4.14.1"}
"dune" {>= "3.0"}
"base" {= "0.16"}
"core" {= "0.16"}
"yojson" {= "2.2"}
"base" {= "v0.16.2"}
"core" {= "v0.16.2"}
"yojson" {= "2.2.0"}
"non_empty_list" {= "0.1"}
"pprint" {= "0.1"}
"ppx_deriving_yojson" {= "3.7"}
"ppx_yojson_conv" {= "0.15"}
"ppx_sexp_conv" {= "0.16"}
"ppx_compare" {= "0.16"}
"ppx_hash" {= "0.16"}
"ppx_deriving" {= "5.2"}
"cmdliner" {= "1.3"}
"angstrom" {= "0.16"}
"re" {= "1.11"}
"ppx_deriving_yojson" {= "3.7.0"}
"ppx_yojson_conv" {= "v0.15.1"}
"ppx_sexp_conv" {= "v0.16.0"}
"ppx_compare" {= "v0.16.0"}
"ppx_hash" {= "v0.16.0"}
"ppx_deriving" {= "5.2.1"}
"cmdliner" {= "1.3.0"}
"angstrom" {= "0.16.0"}
"re" {= "1.11.0"}
"ppx_matches" {= "0.1"}
"ppx_string" {= "0.16"}
"logs" {= "0.7"}
"ppx_string" {= "v0.16.0"}
"logs" {= "0.7.0"}
"ocamlgraph" {= "2.1"}
"js_of_ocaml-compiler"
"js_of_ocaml"
Expand Down
10 changes: 6 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,19 @@
hax-engine-names-extract = pkgs.hello;
}).overrideAttrs (old: {
name = "dune-project";
outputs = ["out"];
outputs = [ "out" ];
buildPhase = ''
dune describe installed-libraries > /tmp/dune-installed-libraries
for package in $(grep -Po '^ {8}[(]\K\w+' dune-project); do
version=$(cat /tmp/dune-installed-libraries | grep -Po "\b$package\b.*version: v?\K[0-9.]+" | head -n1 || true)
version=$(echo "$version" | grep -Po "^\d+.\d+" || true)
version=$(cat /tmp/dune-installed-libraries | grep -Po "\b$package\b.*version: \Kv?[0-9.]+" | head -n1 || true)
version=$(echo "$version" | grep -Po "^v?\d+([.]\d+)*" || true)
if [ -z "${"$"}{version}" ]; then
continue
fi
${pkgs.sd}/bin/sd "(^ {8}[(]$package +)\([^)]+\)" '${"$"}{1}'"(= \"$version\")" dune-project
${pkgs.sd}/bin/sd "(^ {8}[(]$package +)\([^)]+\)" '${
"$"
}{1}'"(= \"$version\")" dune-project
echo "-> $package: $version"
done
'';
Expand Down

0 comments on commit 6501524

Please sign in to comment.