From bca921c5c0ca3c23072c03d1b9613138848f2483 Mon Sep 17 00:00:00 2001 From: oxalica Date: Thu, 4 Aug 2022 15:53:05 +0800 Subject: [PATCH] Package as flake --- .gitignore | 1 + README.md | 25 +++++++++++--- flake.lock | 67 +++++++++++++++++++++++++++++++++++++ flake.nix | 48 ++++++++++++++++++++++++++ shell.nix => neovim-env.nix | 6 +--- 5 files changed, 137 insertions(+), 10 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix rename shell.nix => neovim-env.nix (98%) diff --git a/.gitignore b/.gitignore index 64019c3..6ca8faf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /.envrc +/result* diff --git a/README.md b/README.md index aae982f..ca90aeb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -nil: Language server of Nix Expression Language +nil: Language server for Nix Expression Language 🚧 *This project is under development, but be happy to try it out!* @@ -19,8 +19,23 @@ Super fast incremental analysis! Scans `all-packages.nix` in less then 0.1s and ## Installation -1. Have the latest stable version of Rust installed. -2. `cargo install --git https://github.com/oxalica/nil.git` +**TODO: Beginner friendly instructions.** + +This repo is packaged via [Nix flakes][nix-flakes], the language server binary package is +available through the default flake output `github:oxalica/nil#` with the path `bin/nil`. + +Flake output structure: +``` +β”œβ”€β”€β”€devShells +β”‚ └───(...) +└───packages + β”œβ”€β”€β”€x86_64-linux + β”‚ β”œβ”€β”€β”€default: package 'nil-unstable-2022-08-04' + β”‚ └───nil: package 'nil-unstable-2022-08-04' + └───(...) +``` + +[nix-flakes]: https://nixos.wiki/wiki/Flakes ### For neovim `nvim-lspconfig` user @@ -30,8 +45,8 @@ Add the following vimscript to your configuration. lua <