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

chore(nix): fmt #1258

Merged
merged 1 commit into from
May 12, 2024
Merged
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
66 changes: 30 additions & 36 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
# the scope don't leak into dependent derivations
doNixSupport = false;
});
dune-release = prev.dune-release.overrideAttrs (_: {
doCheck = false;
});
dune-release =
prev.dune-release.overrideAttrs (_: { doCheck = false; });
ocamlPackages = prev.ocamlPackages.overrideScope' (oself: osuper:
let
fixPreBuild = o: {
Expand All @@ -29,12 +28,13 @@
rm -r vendor/csexp vendor/pp
'';
};
in
{
in {
dyn = osuper.dyn.overrideAttrs fixPreBuild;
dune-private-libs = osuper.dune-private-libs.overrideAttrs fixPreBuild;
dune-private-libs =
osuper.dune-private-libs.overrideAttrs fixPreBuild;
dune-glob = osuper.dune-glob.overrideAttrs fixPreBuild;
dune-action-plugin = osuper.dune-action-plugin.overrideAttrs fixPreBuild;
dune-action-plugin =
osuper.dune-action-plugin.overrideAttrs fixPreBuild;
dune-rpc = osuper.dune-rpc.overrideAttrs fixPreBuild;
stdune = osuper.stdune.overrideAttrs fixPreBuild;
});
Expand Down Expand Up @@ -71,24 +71,23 @@
dune build ${package}.install --release ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
runHook postBuild
'';
meta = {
mainProgram = "ocamllsp";
};
meta = { mainProgram = "ocamllsp"; };
});
in
{
in {
overlays.default = (final: prev: {
ocamlPackages = prev.ocamlPackages.overrideScope (oself: osuper:
with oself;

{
ocaml-lsp = lspPackage final;
}
);
});
});
} // (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { overlays = [ overlay ]; inherit system; };
pkgs = import nixpkgs {
overlays = [ overlay ];
inherit system;
};
inherit (pkgs.ocamlPackages) buildDunePackage;
fast = rec {

Expand Down Expand Up @@ -139,35 +138,30 @@
doCheck = false;
});
};
in
{
packages =
rec {
# we have a package without opam2nix for easy consumption for nix users
default = lspPackage pkgs;
in {
packages = rec {
# we have a package without opam2nix for easy consumption for nix users
default = lspPackage pkgs;

ocaml-lsp = fast.ocaml-lsp;
};
ocaml-lsp = fast.ocaml-lsp;
};

devShells = {
default = pkgs.mkShell {
buildInputs = (with pkgs;
[
# dev tools
ocamlformat_0_26_1
yarn
buildInputs = (with pkgs; [
# dev tools
ocamlformat_0_26_1
yarn

ocamlPackages.ppx_expect
ocamlPackages.utop
ocamlPackages.cinaps
ocamlPackages.ppx_yojson_conv
]);
ocamlPackages.ppx_expect
ocamlPackages.utop
ocamlPackages.cinaps
ocamlPackages.ppx_yojson_conv
]);
inputsFrom = [ fast.ocaml-lsp fast.jsonrpc fast.lsp ];
};

release = pkgs.mkShell {
buildInputs = [ pkgs.dune-release ];
};
release = pkgs.mkShell { buildInputs = [ pkgs.dune-release ]; };
};
}));
}
Loading