Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up a nix shell for the playground project #99

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project_name = documentation-site

DUNE = opam exec -- dune
DUNE = dune

.DEFAULT_GOAL := help

Expand Down
86 changes: 76 additions & 10 deletions flake.lock

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

39 changes: 35 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,31 @@
url = "github:nix-ocaml/nix-overlays";
inputs.flake-utils.follows = "flake-utils";
};
melange-flake = {
url = "github:melange-re/melange";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, melange-flake }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
pkgs = nixpkgs.legacyPackages."${system}".appendOverlays [
(self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope' (ocamlself: ocamlsuper: {
cmarkit = ocamlsuper.cmarkit.overrideAttrs (oldattrs: {
src = pkgs.fetchFromGitHub {
owner = "dbuenzli";
repo = "cmarkit";
rev = "f37c8ea86fd0be8dba7a8babcee3682e0e047d91";
hash = "sha256-3CD49b8jUFkytKZ9+2sEUQr4YsZL6zI6myMLNN5NQJ4=";
};
});
});
})
melange-flake.overlays.default
];
python3Packages = pkgs.python3.pkgs.overrideScope (pyself: pysuper: {
mkdocs-print-site-plugin = pyself.buildPythonPackage rec {
pname = "mkdocs-print-site-plugin";
Expand All @@ -33,10 +52,22 @@
{
devShells = {
default = pkgs.mkShell {
buildInputs = with python3Packages; [
nativeBuildInputs = with pkgs.ocamlPackages; [ ocaml findlib dune ];
buildInputs = (with python3Packages; [
mkdocs
mkdocs-print-site-plugin
];
mike
]) ++ (with pkgs.ocamlPackages; [
cmarkit
js_of_ocaml
melange
merlin
ocaml-lsp
ocamlformat-lib
reason
reason-react
]);
dontDetectOcamlConflicts = true;
};
};
});
Expand Down