-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathflake.nix
29 lines (29 loc) · 943 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
description = "Build an opam project with multiple packages";
inputs.opam-nix.url = "github:tweag/opam-nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs";
outputs =
{
self,
nixpkgs,
opam-nix,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: {
legacyPackages =
let
src = nixpkgs.legacyPackages.${system}.fetchFromGitHub {
owner = "ocaml";
repo = "ocaml-lsp";
rev = "c961c46fc4705b18d336ac990b9c3b39354b9d7b";
sha256 = "U7g2ilKfd8EES1EDgy46LKkG/z1jwpd5LIkkqhe13iI=";
fetchSubmodules = true;
};
inherit (opam-nix.lib.${system}) buildOpamProject';
scope = buildOpamProject' { } src { ocaml-base-compiler = "*"; };
in
scope;
defaultPackage = self.legacyPackages.${system}.ocaml-lsp-server;
});
}