diff options
| author | NotAShelf <raf@notashelf.dev> | 2024-09-13 17:51:48 +0300 |
|---|---|---|
| committer | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2024-09-15 15:43:28 +0200 |
| commit | 46ce5fd8c081f179a509da423077f8372e63ffc4 (patch) | |
| tree | 4391d2d04531220083f4954ba30f16e8fce6fa4c | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.gz nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.bz2 nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.lz nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.xz nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.zst nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.zip | |
chore: remove redundant flake-utils dependency; add nix-systems
Removes the redundant flake-utils dependency, and replaces
multi-system handling logic with a minimal function (zero deps!) that
supports [nix-systems](https://github.com/nix-systems). This gets rid of
the unnecessary flake-utils dependency.
Also see:
* https://ayats.org/blog/no-flake-utils
| -rw-r--r-- | flake.lock | 22 | ||||
| -rw-r--r-- | flake.nix | 32 |
2 files changed, 19 insertions, 35 deletions
@@ -1,23 +1,5 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1699906975, @@ -35,8 +17,8 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "systems": "systems" } }, "systems": { @@ -2,20 +2,22 @@ description = "Quickstart configurations for the Nvim LSP client"; inputs.nixpkgs.url = "github:NixOS/nixpkgs"; - inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.systems.url = "github:nix-systems/default"; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; in - rec { - devShell = pkgs.mkShell { - buildInputs = [ - pkgs.stylua - pkgs.luaPackages.luacheck - pkgs.luajitPackages.vusted - pkgs.selene - ]; - }; - } - ); + outputs = { self, nixpkgs, systems }: let + supportedSystems = nixpkgs.lib.genAttrs (import systems); + forEachSystem = function: supportedSystems (system: + function nixpkgs.legacyPackages.${system}); + in { + devShells = forEachSystem (pkgs: { + default = pkgs.mkShell { + packages = [ + pkgs.stylua + pkgs.luaPackages.luacheck + pkgs.luajitPackages.vusted + pkgs.selene + ]; + }; + }); + }; } |
