Skip to content

Commit af8a249

Browse files
committed
Pin opium at 0.18.0
Pinning to the last CoHttp-based version 0.18.0, because 0.19.0 was a major rewrite to switch away from CoHttp[1], but there seem to be intentions to switch back to CoHttp[2]. We do not need to make this detour. [1]: https://github.com/rgrinberg/opium/blob/0.20.0/CHANGES.md#0190 [2]: rgrinberg/opium#279
1 parent 9b2bf79 commit af8a249

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed

pkgs/default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ let
1818
ocamlPackages = super.ocamlPackages.overrideScope' (self: super: {
1919
semver = self.callPackage ./ocaml-modules/semver {};
2020
obus = self.callPackage ./ocaml-modules/obus {};
21+
opium = self.callPackage ./ocaml-modules/opium {};
22+
opium_kernel = self.callPackage ./ocaml-modules/opium_kernel {};
2123
});
2224

2325
};

pkgs/ocaml-modules/opium/default.nix

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{ buildDunePackage
2+
3+
, ppx_sexp_conv
4+
, ppx_fields_conv
5+
6+
, cmdliner
7+
, cohttp-lwt-unix
8+
, logs
9+
, magic-mime
10+
, opium_kernel
11+
, stringext
12+
13+
, alcotest
14+
}:
15+
16+
buildDunePackage {
17+
pname = "opium";
18+
inherit (opium_kernel) version src meta minimumOCamlVersion;
19+
20+
useDune2 = true;
21+
22+
doCheck = true;
23+
24+
buildInputs = [
25+
ppx_sexp_conv ppx_fields_conv
26+
alcotest
27+
];
28+
29+
propagatedBuildInputs = [
30+
opium_kernel cmdliner cohttp-lwt-unix magic-mime logs stringext
31+
];
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{ lib
2+
, buildDunePackage
3+
, fetchurl
4+
5+
, ppx_fields_conv
6+
, ppx_sexp_conv
7+
8+
, cohttp-lwt
9+
, ezjsonm
10+
, hmap
11+
, sexplib
12+
, fieldslib
13+
}:
14+
15+
buildDunePackage rec {
16+
pname = "opium_kernel";
17+
version = "0.18.0";
18+
19+
useDune2 = true;
20+
21+
minimumOCamlVersion = "4.04.1";
22+
23+
src = fetchurl {
24+
url = "https://github.com/rgrinberg/opium/releases/download/${version}/opium-${version}.tbz";
25+
sha256 = "0a2y9gw55psqhqli3a5ps9mfdab8r46fnbj882r2sp366sfcy37q";
26+
};
27+
28+
doCheck = true;
29+
30+
buildInputs = [
31+
ppx_sexp_conv ppx_fields_conv
32+
];
33+
34+
propagatedBuildInputs = [
35+
hmap cohttp-lwt ezjsonm sexplib fieldslib
36+
];
37+
38+
meta = {
39+
description = "Sinatra like web toolkit for OCaml based on cohttp & lwt";
40+
homepage = "https://github.com/rgrinberg/opium";
41+
license = lib.licenses.mit;
42+
maintainers = [ lib.maintainers.pmahoney ];
43+
};
44+
}

0 commit comments

Comments
 (0)