Closed bodokat closed 10 months ago
@ShinKage @michaelmesser Do you use nix? If yes, it would be nice to check this PR. If not, we can merge as it is.
Ok, fortunately the second point is easy to address; for example:
diff --git a/flake.nix b/flake.nix
index 207f608..366fb48 100644
--- a/flake.nix
+++ b/flake.nix
@@ -33,6 +33,11 @@
echo "export idrisVersion : ((Nat,Nat,Nat), String); idrisVersion = $VERSION" >> src/IdrisPaths.idr
echo 'export yprefix : String; yprefix="~/.idris2"' >> src/IdrisPaths.idr
'';
+ # Perhaps counter-intuitively, we don't want to use the buildPhase provided by
+ # `buildIdris` becuase it will do a default build which will build Idris2, not
+ # the Idris2 API package. Fortunately, we can simply skip that buildPhase because
+ # `idris2 --install idris2-api` will build it as-needed in order to install it.
+ dontBuild = true;
};
I did realize as I was switching back and forth between things that this PR predates the split of LSP-lib off into its own package. Definitely apologize this sat for so long. I hope that throwing the new package into the mix is no harder than the others built by this flake currently.
I don't mind merging this PR, but I don't use nix. Are there any other nix users who can comment on these changes? If not, we can just merge this before the new year :)
@andorp i’d rather not merge this as is. I had a few requests above including one that fixes this derivation for use on Darwin machines. My most recent realization was that this also won’t work due to the introduction of the LSP-lib which isn’t yet accounted for in the changes here.
Ok, just let me know when you think this is done.
I've opened a new PR that adds a flake here.
I made the fixes I proposed in this PR's comments, upstreamed the API package as suggested in a comment of the flake for this PR, and I built the relatively new LSP-lib dependency into the new flake.
This PR was the inspiration for https://github.com/idris-community/idris2-lsp/pull/210 but it has now been superseded by that PR.
Allows idris2-lsp to be installed using nix (see README)