Add a flake with OCaml 4.14.1

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2025-01-24 16:51:51 -08:00
parent e855a12916
commit 58e435c475
3 changed files with 112 additions and 0 deletions

30
flake.nix Normal file
View file

@ -0,0 +1,30 @@
{
description = "flake for OCaml dev";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
nixpkgs-ocaml.url = "github:NixOS/nixpkgs/dd5621df6dcb90122b50da5ec31c411a0de3e538"; # OCaml 4.14.1
systems.url = "github:nix-systems/default";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
};
outputs =
{ nixpkgs, nixpkgs-ocaml, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
ocaml-pkgs = nixpkgs-ocaml.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
ocaml-pkgs.ocaml
];
};
}
);
}