Skip to content

Commit

Permalink
Merge pull request #70 from mattjbray/dave/add-flake
Browse files Browse the repository at this point in the history
Add simple flake for opam/ocamlformat
  • Loading branch information
actionshrimp authored Mar 21, 2024
2 parents e2b8cb8 + 3fe5efc commit d15a4a9
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
76 changes: 76 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";

#ocamlformat 0.22.4 is a bit old, so is only in older versions of nixpkgs
nixpkgs2305.url = "nixpkgs/nixos-23.05";

flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, nixpkgs2305, flake-utils }@attrs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs2305 = nixpkgs2305.legacyPackages.${system};
in
{
# for use by nix fmt
formatter = pkgs.nixpkgs-fmt;

devShells.default =
pkgs.mkShell {
buildInputs =
(if pkgs.stdenv.isDarwin then
(with pkgs.darwin.apple_sdk.frameworks; [ CoreServices Foundation ])

else
[ pkgs.inotify-tools ]) ++ [
pkgs.opam
pkgs2305.ocamlformat_0_20_1
#pkgs.pkg-config
]
;
};

});
}

0 comments on commit d15a4a9

Please sign in to comment.