Skip to content

Commit 7f70d9e

Browse files
authored
Prepare for releasing (#59)
1 parent af70a42 commit 7f70d9e

File tree

5 files changed

+44
-37
lines changed

5 files changed

+44
-37
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Unreleased
2+
--------------
3+
4+
- Initial public release

lambda-runtime.opam

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ build: [
99
["dune" "build" "-p" name "-j" jobs]
1010
]
1111
depends: [
12-
"ocaml" {>= "4.06"}
13-
"dune" {build}
12+
"ocaml" {>= "4.08"}
13+
"dune" {>= "1.7"}
1414
"result"
1515
"yojson" {>= "1.6.0" & < "2.0.0"}
1616
"ppx_deriving_yojson"
@@ -20,8 +20,5 @@ depends: [
2020
"lwt"
2121
"alcotest" {with-test}
2222
]
23-
pin-depends: [
24-
[ "ssl.dev" "git+https://github.com/savonet/ocaml-ssl.git" ]
25-
]
2623
synopsis:
27-
"An OCaml custom runtime for AWS Lambda"
24+
"A custom runtime for AWS Lambda written in OCaml"

nix/sources.nix

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
{ ocamlVersion ? "4_11" }:
1+
{ ocamlVersion ? "4_12" }:
22

33
let
44
overlays =
55
builtins.fetchTarball
6-
https://github.com/anmonteiro/nix-overlays/archive/0473dd3.tar.gz;
6+
https://github.com/anmonteiro/nix-overlays/archive/c5a0868ab.tar.gz;
77

88
in
99

10-
import "${overlays}/sources.nix" {
11-
overlays = [
12-
(import overlays)
13-
(self: super: {
14-
ocamlPackages = super.ocaml-ng."ocamlPackages_${ocamlVersion}".overrideScope'
15-
(super.callPackage "${overlays}/ocaml" {});
16-
})
17-
];
18-
}
10+
import "${overlays}/sources.nix" {
11+
overlays = [
12+
(import overlays)
13+
(self: super: {
14+
ocamlPackages = super.ocaml-ng."ocamlPackages_${ocamlVersion}".overrideScope'
15+
(super.callPackage "${overlays}/ocaml" { });
16+
})
17+
];
18+
}

shell.nix

+22-16
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1+
{ release-mode ? false }:
12

23
let
3-
pkgs = import ./nix/sources.nix {};
4+
pkgs = import ./nix/sources.nix { };
45
inherit (pkgs) stdenv lib;
56
lambdaPkgs = pkgs.recurseIntoAttrs (import ./nix { inherit pkgs; });
67
lambdaDrvs = lib.filterAttrs (_: value: lib.isDerivation value) lambdaPkgs;
78

89
in
9-
(pkgs.mkShell {
10-
inputsFrom = lib.attrValues lambdaDrvs;
11-
buildInputs = with pkgs.ocamlPackages; [ merlin pkgs.ocamlformat ];
12-
}).overrideAttrs (o : {
13-
propagatedBuildInputs = lib.filter
14-
(drv:
15-
# we wanna filter our own packages so we don't build them when entering
16-
# the shell. They always have `pname`
17-
!(lib.hasAttr "pname" drv) ||
18-
drv.pname == null ||
19-
!(lib.any (name: name == drv.pname) (lib.attrNames lambdaDrvs)))
20-
o.propagatedBuildInputs;
21-
})
22-
23-
10+
(pkgs.mkShell {
11+
inputsFrom = lib.attrValues lambdaDrvs;
12+
buildInputs = (if release-mode then
13+
(with pkgs; [
14+
cacert
15+
curl
16+
ocamlPackages.dune-release
17+
git
18+
opam
19+
]) else [ ]) ++ (with pkgs.ocamlPackages; [ merlin pkgs.ocamlformat ]);
20+
}).overrideAttrs (o: {
21+
propagatedBuildInputs = lib.filter
22+
(drv:
23+
# we wanna filter our own packages so we don't build them when entering
24+
# the shell. They always have `pname`
25+
!(lib.hasAttr "pname" drv) ||
26+
drv.pname == null ||
27+
!(lib.any (name: name == drv.pname) (lib.attrNames lambdaDrvs)))
28+
o.propagatedBuildInputs;
29+
})

vercel.opam

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ build: [
99
["dune" "build" "-p" name "-j" jobs]
1010
]
1111
depends: [
12-
"ocaml" {>= "4.06"}
13-
"dune" {build}
12+
"ocaml" {>= "4.08"}
13+
"dune" {>= "1.7"}
1414
"result"
1515
"yojson"
1616
"lwt"
@@ -21,10 +21,10 @@ depends: [
2121
"alcotest" {with-test}
2222
]
2323
synopsis:
24-
"An OCaml custom runtime for Vercel.com (Now v2)."
24+
"A custom runtime for Vercel.com (Now v2) written in OCaml."
2525
description:
2626
"""
27-
lambda-runtime is an OCaml custom runtime for AWS Lambda. The `vercel`
27+
lambda-runtime is an OCaml custom runtime for AWS Lambda. The vercel
2828
package provides an adapter and API for lambda-runtime that works with
2929
Vercel's (Now v2) service.
3030
"""

0 commit comments

Comments
 (0)