Skip to content

Commit 760f6a6

Browse files
authored
chore: update flakes (#1193)
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent c6cc715 commit 760f6a6

File tree

2 files changed

+2
-201
lines changed

2 files changed

+2
-201
lines changed

flake.lock

Lines changed: 1 addition & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,9 @@
22
inputs = {
33
flake-utils.url = "github:numtide/flake-utils";
44
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
5-
opam-nix = {
6-
url = "github:tweag/opam-nix";
7-
inputs.opam-repository.follows = "opam-repository";
8-
};
9-
opam-repository = {
10-
url = "github:ocaml/opam-repository";
11-
flake = false;
12-
};
135
};
146

15-
outputs = { self, flake-utils, opam-nix, opam-repository, nixpkgs, ... }@inputs:
7+
outputs = { self, flake-utils, nixpkgs, ... }@inputs:
168
let
179
package = "ocaml-lsp-server";
1810
overlay = final: prev: {
@@ -49,7 +41,6 @@
4941
inherit (pkgs.ocamlPackages) buildDunePackage;
5042
fast = rec {
5143

52-
# these packages do not use opam2nix
5344
jsonrpc = buildDunePackage {
5445
pname = "jsonrpc";
5546
version = "n/a";
@@ -107,44 +98,9 @@
10798
doCheck = false;
10899
};
109100
};
110-
on = opam-nix.lib.${system};
111-
localPackages = {
112-
jsonrpc = "*";
113-
lsp = "*";
114-
ocaml-lsp-server = "*";
115-
};
116-
devPackages = {
117-
menhir = "*";
118-
ppx_yojson_conv = "*";
119-
cinaps = "*";
120-
ppx_expect = "*";
121-
ocamlfind = "1.9.2";
122-
};
123-
packagesFromNames = set:
124-
(builtins.map (s: builtins.getAttr s scope)
125-
(builtins.attrNames set));
126-
allPackages = localPackages // devPackages;
127-
scope =
128-
(
129-
let
130-
scope =
131-
on.buildOpamProject
132-
{
133-
repos = [ opam-repository ];
134-
inherit pkgs;
135-
resolveArgs = { with-test = true; };
136-
}
137-
package
138-
./.
139-
(allPackages);
140-
in
141-
scope.overrideScope' overlay
142-
);
143-
opam2nixPackages = nixpkgs.lib.filterAttrs (name: value: builtins.hasAttr name localPackages) scope;
144101
in
145102
{
146103
packages =
147-
opam2nixPackages //
148104
rec {
149105
# we have a package without opam2nix for easy consumption for nix users
150106
default = pkgs.ocamlPackages.buildDunePackage {
@@ -190,17 +146,6 @@
190146
};
191147

192148
devShells = {
193-
opam2nix = pkgs.mkShell {
194-
buildInputs = (with pkgs;
195-
[
196-
# dev tools
197-
ocamlformat_0_24_1
198-
yarn
199-
dune-release
200-
]) ++ packagesFromNames devPackages;
201-
inputsFrom = packagesFromNames opam2nixPackages;
202-
};
203-
204149
default = pkgs.mkShell {
205150
buildInputs = (with pkgs;
206151
[

0 commit comments

Comments
 (0)