Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/9glenda/ocaml-flake
`flake-parts` module for ocaml
https://github.com/9glenda/ocaml-flake
flake-parts nix nix-flake ocaml
Last synced: 5 days ago
JSON representation
`flake-parts` module for ocaml
- Host: GitHub
- URL: https://github.com/9glenda/ocaml-flake
- Owner: 9glenda
- License: gpl-3.0
- Created: 2023-10-27T20:26:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-10T17:32:18.000Z (5 months ago)
- Last Synced: 2024-12-14T01:02:27.296Z (about 1 month ago)
- Topics: flake-parts, nix, nix-flake, ocaml
- Language: Nix
- Homepage: https://9glenda.github.io/ocaml-flake/
- Size: 120 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ocaml-flake
[![FlakeHub](https://img.shields.io/endpoint?url=https://flakehub.com/f/9glenda/ocaml-flake/badge)](https://flakehub.com/flake/9glenda/ocaml-flake)
> \[!IMPORTANT\]
>
> This project is work in progress and the api may change.Simple [flake parts](https://github.com/hercules-ci/flake-parts) module for ocaml inspired by [haskell-flake](https://github.com/srid/haskell-flake) using [opam nix](https://github.com/tweag/opam-nix).
## Getting Started
```nix
{
description = "Ocaml project using `ocaml-flake` and `flake-parts`";inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
ocaml-flake.url = "github:9glenda/ocaml-flake";
};outputs = inputs @ {
flake-parts,
ocaml-flake,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
ocaml-flake.flakeModule
];
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = _: {
ocaml = {
duneProjects = {
default = {
name = "my_package";
src = ./.;
};
};
};
};
};
}
```## Thanks to
- [haskell-flake](https://github.com/srid/haskell-flake): One of the biggest inspirations for starting this project and designing the interface was the haskell flake. It is a great `flake-parts` module for haskell and my reccomendation for everyone starting a new haskell project.
- [flake parts](https://github.com/hercules-ci/flake-parts): Obviously this project would not been possible without `flake-parts`. It's a growing ecosystem around designing clean and maintainable flakes.
- [opam-nix](https://github.com/tweag/opam-nix): opam-nix is used to build the package internally.