Skip to content

Commit

Permalink
dune: enable generate_opam_files option
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Dec 6, 2024
1 parent 519c576 commit aa1b46e
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 67 deletions.
68 changes: 67 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
(lang dune 2.7)

(name tcpip)
(formatting disabled)

(license ISC)
(authors
"Anil Madhavapeddy"
"Balraj Singh"
"David Scott"
"Gabor Pali"
"Hannes Mehnert"
"Haris Rotsos"
"Kia"
"Luke Dunstan"
"Magnus Skjegstad"
"Mindy Preston"
"Nicolas Ojeda Bar"
"Pablo Polvorin"
"Richard Mortier"
"Thomas Gazagnaire"
"Thomas Leonard"
"Tim Cuthbertson"
"Vincent Bernardoff"
"lnmx"
"pqwy")
(maintainers "[email protected]")
(source (github mirage/mirage-tcpip))

(generate_opam_files)

(package
(name tcpip)
(synopsis "OCaml TCP/IP networking stack, used in MirageOS")
(description "`mirage-tcpip` provides a networking stack for the [Mirage operating system](https://mirage.io). It provides implementations for the following module types (which correspond with the similarly-named protocols): IP (via the IPv4 and IPv6 modules), ICMP, UDP, TCP")
(tags ("org:mirage"))
(depends
(ocaml (>= 4.08.0))
(arp (>= 3.0.0))
(cmdliner (>= 1.1.0))
(cstruct (>= 6.0.0))
cstruct-lwt
duration
(ethernet (>= 3.0.0))
(fmt (>= 0.8.7))
(ipaddr (>= 5.6.0))
ipaddr-cstruct
(logs (>= 0.6.0))
(lru (>= 0.3.0))
(lwt (>= 4.0.0))
lwt-dllist
(macaddr (>= 4.0.0))
macaddr-cstruct
metrics
(mirage-clock (>= 3.0.0))
(mirage-crypto-rng-mirage (>= 1.0.0))
(mirage-flow (>= 4.0.0))
(mirage-net (>= 3.0.0))
(mirage-time (>= 2.0.0))
(randomconv (>= 0.2.0))
(bisect_ppx (and :dev (> 2.5.0)))
(alcotest (and :with-test (>= 1.5.0)))
(mirage-clock-unix (and :with-test (>= 3.0.0)))
(mirage-crypto-rng (and :with-test (>= 1.0.0)))
(mirage-vnetif (and :with-test (>= 0.6.2)))
(pcap-format :with-test))
(conflicts
ocaml-freestanding
(mirage-xen (< 6.0.0))
(result (< 1.5))))
4 changes: 2 additions & 2 deletions src/stack-direct/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
(public_name tcpip.stack-direct)
(instrumentation
(backend bisect_ppx))
(libraries logs ipaddr lwt fmt mirage-time mirage-crypto-rng-mirage mirage-net
ethernet arp.mirage tcpip.icmpv4 tcpip.udp tcpip.tcp))
(libraries logs ipaddr lwt fmt mirage-time mirage-crypto-rng-mirage
mirage-net ethernet arp.mirage tcpip.icmpv4 tcpip.udp tcpip.tcp))
5 changes: 3 additions & 2 deletions src/stack-unix/dune
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
(wrapped false)
(instrumentation
(backend bisect_ppx))
(libraries lwt.unix ipaddr.unix cstruct-lwt fmt tcpip tcp_socket_options logs))
(libraries lwt.unix ipaddr.unix cstruct-lwt fmt tcpip tcp_socket_options
logs))

(library
(name tcpip_stack_socket)
Expand All @@ -47,4 +48,4 @@
(instrumentation
(backend bisect_ppx))
(libraries lwt.unix cstruct-lwt ipaddr.unix logs tcpip.ipv4 tcpip.ipv6
tcpip.tcpv4v6-socket tcpip.udpv4v6-socket))
tcpip.tcpv4v6-socket tcpip.udpv4v6-socket))
6 changes: 3 additions & 3 deletions src/tcp/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
(public_name tcpip.tcp)
(instrumentation
(backend bisect_ppx))
(libraries logs ipaddr cstruct lwt-dllist tcpip.checksum
tcpip duration randomconv fmt mirage-time mirage-clock
mirage-crypto-rng-mirage mirage-flow metrics))
(libraries logs ipaddr cstruct lwt-dllist tcpip.checksum tcpip duration
randomconv fmt mirage-time mirage-clock mirage-crypto-rng-mirage
mirage-flow metrics))
122 changes: 69 additions & 53 deletions tcpip.opam
Original file line number Diff line number Diff line change
@@ -1,68 +1,84 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "[email protected]"
homepage: "https://github.com/mirage/mirage-tcpip"
dev-repo: "git+https://github.com/mirage/mirage-tcpip.git"
bug-reports: "https://github.com/mirage/mirage-tcpip/issues"
doc: "https://mirage.github.io/mirage-tcpip/"
synopsis: "OCaml TCP/IP networking stack, used in MirageOS"
description:
"`mirage-tcpip` provides a networking stack for the [Mirage operating system](https://mirage.io). It provides implementations for the following module types (which correspond with the similarly-named protocols): IP (via the IPv4 and IPv6 modules), ICMP, UDP, TCP"
maintainer: ["[email protected]"]
authors: [
"Anil Madhavapeddy" "Balraj Singh" "Richard Mortier" "Nicolas Ojeda Bar"
"Thomas Gazagnaire" "Vincent Bernardoff" "Magnus Skjegstad" "Mindy Preston"
"Thomas Leonard" "David Scott" "Gabor Pali" "Hannes Mehnert" "Haris Rotsos"
"Kia" "Luke Dunstan" "Pablo Polvorin" "Tim Cuthbertson" "lnmx" "pqwy" ]
"Anil Madhavapeddy"
"Balraj Singh"
"David Scott"
"Gabor Pali"
"Hannes Mehnert"
"Haris Rotsos"
"Kia"
"Luke Dunstan"
"Magnus Skjegstad"
"Mindy Preston"
"Nicolas Ojeda Bar"
"Pablo Polvorin"
"Richard Mortier"
"Thomas Gazagnaire"
"Thomas Leonard"
"Tim Cuthbertson"
"Vincent Bernardoff"
"lnmx"
"pqwy"
]
license: "ISC"
tags: ["org:mirage"]

build: [
["dune" "subst"] {dev}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
conflicts: [
"mirage-xen" {< "6.0.0"}
"ocaml-freestanding"
"result" {< "1.5"}
]
homepage: "https://github.com/mirage/mirage-tcpip"
bug-reports: "https://github.com/mirage/mirage-tcpip/issues"
depends: [
"dune" {>= "2.7.0"}
"bisect_ppx" {dev & >= "2.5.0"}
"dune" {>= "2.7"}
"ocaml" {>= "4.08.0"}
"arp" {>= "3.0.0"}
"cmdliner" {>= "1.1.0"}
"cstruct" {>= "6.0.0"}
"cstruct-lwt"
"mirage-net" {>= "3.0.0"}
"mirage-clock" {>= "3.0.0"}
"mirage-crypto-rng-mirage" {>= "1.0.0"}
"mirage-time" {>= "2.0.0"}
"ipaddr" {>= "5.6.0"}
"macaddr" {>="4.0.0"}
"macaddr-cstruct"
"duration"
"ethernet" {>= "3.0.0"}
"fmt" {>= "0.8.7"}
"ipaddr" {>= "5.6.0"}
"ipaddr-cstruct"
"logs" {>= "0.6.0"}
"lru" {>= "0.3.0"}
"lwt" {>= "4.0.0"}
"lwt-dllist"
"logs" {>= "0.6.0"}
"duration"
"randomconv" {>= "0.2.0"}
"ethernet" {>= "3.0.0"}
"arp" {>= "3.0.0"}
"macaddr" {>= "4.0.0"}
"macaddr-cstruct"
"metrics"
"mirage-clock" {>= "3.0.0"}
"mirage-crypto-rng-mirage" {>= "1.0.0"}
"mirage-flow" {>= "4.0.0"}
"mirage-vnetif" {with-test & >= "0.6.2"}
"alcotest" {with-test & >="1.5.0"}
"pcap-format" {with-test}
"mirage-net" {>= "3.0.0"}
"mirage-time" {>= "2.0.0"}
"randomconv" {>= "0.2.0"}
"bisect_ppx" {dev & > "2.5.0"}
"alcotest" {with-test & >= "1.5.0"}
"mirage-clock-unix" {with-test & >= "3.0.0"}
"mirage-crypto-rng" {with-test & >= "1.0.0"}
"ipaddr-cstruct"
"macaddr-cstruct"
"lru" {>= "0.3.0"}
"metrics"
"cmdliner" {>= "1.1.0"}
"mirage-vnetif" {with-test & >= "0.6.2"}
"pcap-format" {with-test}
"odoc" {with-doc}
]
synopsis: "OCaml TCP/IP networking stack, used in MirageOS"
description: """
`mirage-tcpip` provides a networking stack for the [Mirage operating
system](https://mirage.io). It provides implementations for the following module types
(which correspond with the similarly-named protocols):

* IP (via the IPv4 and IPv6 modules)
* ICMP
* UDP
* TCP
"""
conflicts: [
"ocaml-freestanding"
"mirage-xen" {< "6.0.0"}
"result" {< "1.5"}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/mirage/mirage-tcpip.git"
12 changes: 6 additions & 6 deletions test/dune
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(test
(name test)
(libraries alcotest mirage-crypto-rng mirage-crypto-rng.unix lwt.unix logs logs.fmt
mirage-flow mirage-vnetif mirage-clock-unix pcap-format duration
mirage-crypto-rng-mirage arp arp.mirage ethernet tcpip.ipv4 tcpip.tcp tcpip.udp
tcpip.stack-direct tcpip.icmpv4 tcpip.udpv4v6-socket tcpip.tcpv4v6-socket
tcpip.icmpv4-socket tcpip.stack-socket tcpip.ipv6 ipaddr-cstruct
macaddr-cstruct tcpip)
(libraries alcotest mirage-crypto-rng mirage-crypto-rng.unix lwt.unix logs
logs.fmt mirage-flow mirage-vnetif mirage-clock-unix pcap-format duration
mirage-crypto-rng-mirage arp arp.mirage ethernet tcpip.ipv4 tcpip.tcp
tcpip.udp tcpip.stack-direct tcpip.icmpv4 tcpip.udpv4v6-socket
tcpip.tcpv4v6-socket tcpip.icmpv4-socket tcpip.stack-socket tcpip.ipv6
ipaddr-cstruct macaddr-cstruct tcpip)
(action
(run %{test} -q -e --color=always)))

0 comments on commit aa1b46e

Please sign in to comment.