Skip to content

Commit

Permalink
Merge f807a8a into 10961b9
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg committed May 11, 2024
2 parents 10961b9 + f807a8a commit 9249186
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
outputs = { self, flake-utils, nixpkgs, ... }@inputs:
let
package = "ocaml-lsp-server";
basePackage = {
duneVersion = "3";
version = "n/a";
src = ./.;
};
overlay = final: prev: {
${package} = prev.${package}.overrideAttrs (_: {
# Do not add share/nix-support, so that dependencies from
Expand Down Expand Up @@ -36,11 +41,8 @@
};
lspPackage = pkgs:
with pkgs.ocamlPackages;
buildDunePackage {
buildDunePackage (basePackage // {
pname = package;
version = "n/a";
src = ./.;
duneVersion = "3";
buildInputs = [
ocamlc-loc
astring
Expand Down Expand Up @@ -73,7 +75,7 @@
meta = {
mainProgram = "ocamllsp";
};
};
});
in
{
overlays.default = (final: prev: {
Expand All @@ -91,20 +93,14 @@
inherit (pkgs.ocamlPackages) buildDunePackage;
fast = rec {

jsonrpc = buildDunePackage {
jsonrpc = buildDunePackage (basePackage // {
pname = "jsonrpc";
version = "n/a";
src = ./.;
duneVersion = "3";
propagatedBuildInputs = with pkgs.ocamlPackages; [ ];
doCheck = false;
};
});

lsp = buildDunePackage {
lsp = buildDunePackage (basePackage // {
pname = "lsp";
version = "n/a";
src = ./.;
duneVersion = "3";
propagatedBuildInputs = with pkgs.ocamlPackages; [
jsonrpc
yojson
Expand All @@ -114,13 +110,10 @@
];
checkInputs = with pkgs.ocamlPackages; [ cinaps ppx_expect ];
doCheck = false;
};
});

ocaml-lsp = buildDunePackage {
ocaml-lsp = buildDunePackage (basePackage // {
pname = "ocaml-lsp";
version = "n/a";
src = ./.;
duneVersion = "3";
checkInputs = with pkgs.ocamlPackages; [ ppx_expect ];
propagatedBuildInputs = with pkgs.ocamlPackages; [
ocamlc-loc
Expand All @@ -147,7 +140,7 @@
merlin-lib
];
doCheck = false;
};
});
};
in
{
Expand Down

0 comments on commit 9249186

Please sign in to comment.