Skip to content

Commit

Permalink
tidy: nixpkgs rather than dev opam scope for lsp/utop
Browse files Browse the repository at this point in the history
  • Loading branch information
actionshrimp committed Oct 23, 2024
1 parent 2b3c3c6 commit 0748ebe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
22 changes: 3 additions & 19 deletions flake.lock

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

16 changes: 5 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";

flake-utils.url = "github:numtide/flake-utils";

opam-nix = {
url = "github:tweag/opam-nix";
inputs.opam-repository.follows = "opam-repository";
Expand All @@ -19,7 +19,7 @@
pkgs = nixpkgs.legacyPackages.${system};
fs = pkgs.lib.fileset;
on = opam-nix.lib.${system};
ocaml-version = "5.1.0";
ocaml-version = "5.1.1";
ocaml-base-compiler = ocaml-version;

# List of opam files you which to be read by opam-nix
Expand Down Expand Up @@ -61,13 +61,6 @@
fileset = fs.unions opamFiles;
}) { inherit ocaml-base-compiler; });

# build any dev deps on the correct ocaml version, without conflicting with project deps.
devOpamScope = (on.queryToScope { repos = [ opam-repository ]; } {
inherit ocaml-base-compiler;
ocaml-lsp-server = "*";
utop = "*";
});

gcloud-cli = pkgs.stdenv.mkDerivation {
pname = "gcloud-cli";
version = "1.0.0";
Expand Down Expand Up @@ -98,9 +91,10 @@
packages.gcloud-cli = gcloud-cli;

packages.default = pkgs.mkShell {
dontDetectOcamlConflicts = true;
buildInputs = (map (p: opamScope.${p}) opamFilePackageNames) ++ [
devOpamScope.utop
devOpamScope.ocaml-lsp-server
pkgs.ocaml-ng.ocamlPackages_5_1.utop
pkgs.ocaml-ng.ocamlPackages_5_1.ocaml-lsp
pkgs.ocamlformat_0_22_4
];
};
Expand Down

0 comments on commit 0748ebe

Please sign in to comment.