Skip to content

Commit aee9633

Browse files
authored
chore(nix): Add nix flake for spices (#39)
1 parent fca6652 commit aee9633

File tree

3 files changed

+251
-0
lines changed

3 files changed

+251
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
_build
22
_opam
33
.DS_Store
4+
5+
# nix ignores
6+
.direnv
7+
result
8+
.envrc

flake.lock

Lines changed: 205 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
description = "A little TUI framework for OCaml";
3+
4+
inputs.colors.url = "github:ocaml-tui/colors";
5+
inputs.tty.url = "github:ocaml-tui/tty";
6+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7+
8+
outputs = inputs@{ flake-parts, ... }:
9+
flake-parts.lib.mkFlake { inherit inputs; } {
10+
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
11+
perSystem = { config, self', inputs', pkgs, system, ... }:
12+
let
13+
inherit (pkgs) ocamlPackages mkShell;
14+
inherit (ocamlPackages) buildDunePackage;
15+
version = "0.0.2";
16+
in
17+
{
18+
devShells = {
19+
default = mkShell {
20+
buildInputs = [ ocamlPackages.utop ];
21+
inputsFrom = [ self'.packages.spices ];
22+
};
23+
};
24+
25+
packages = {
26+
spices = buildDunePackage {
27+
inherit version;
28+
pname = "spices";
29+
propagatedBuildInputs = with ocamlPackages; [
30+
inputs'.colors.packages.default
31+
inputs'.tty.packages.default
32+
(mdx.override {
33+
inherit logs;
34+
})
35+
];
36+
src = ./.;
37+
};
38+
};
39+
};
40+
};
41+
}

0 commit comments

Comments
 (0)