-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
94 lines (87 loc) · 2.56 KB
/
flake.nix
File metadata and controls
94 lines (87 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
description = "Discord API wrapper for OCaml";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
ocaml-overlay.url = "github:nix-ocaml/nix-overlays";
ocaml-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
config,
self',
inputs',
system,
...
}: let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [inputs.ocaml-overlay.overlays.default];
};
inherit (pkgs) ocamlPackages mkShell;
inherit (ocamlPackages) buildDunePackage;
version = "0.0.1";
in {
devShells = {
default = mkShell {
inputsFrom = [
self'.packages.default
];
buildInputs = with ocamlPackages; [
dune_3
ocaml
utop
ocamlformat
];
packages = builtins.attrValues {
inherit (pkgs) clang_17 clang-tools_17 pkg-config;
inherit (ocamlPackages) ocaml-lsp ocamlformat-rpc-lib;
};
};
};
packages = {
default = buildDunePackage {
inherit version;
pname = "okitten";
propagatedBuildInputs = with ocamlPackages; [
pkgs.cloudflared
dream
lwt_ppx
ppx_deriving_yojson
digestif
iso8601
self'.packages.dotenv
];
src = ./.;
};
dotenv = buildDunePackage {
version = "0.0.3";
pname = "dotenv";
src = builtins.fetchGit {
url = "https://github.com/thatportugueseguy/ocaml-dotenv";
rev = "972f7e61e7783f0a3185eeca34d9bf4d1acd43c4";
};
propagatedBuildInputs = with ocamlPackages; [
base
stdio
uutf
self'.packages.pcre
];
};
pcre = buildDunePackage {
version = "7.5.0";
pname = "pcre";
src = builtins.fetchGit {
url = "https://github.com/mmottl/pcre-ocaml";
rev = "cd2a7ba634348015fc304a9d7efdec0239285d14";
};
propagatedBuildInputs = with ocamlPackages; [
pkgs.pcre
dune-configurator
];
};
};
};
};
}