Skip to content

Commit 46ce5fd

Browse files
NotAShelfteto
authored andcommitted
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
1 parent 0d027de commit 46ce5fd

File tree

2 files changed

+19
-35
lines changed

2 files changed

+19
-35
lines changed

flake.lock

Lines changed: 2 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
description = "Quickstart configurations for the Nvim LSP client";
33

44
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
5-
inputs.flake-utils.url = "github:numtide/flake-utils";
5+
inputs.systems.url = "github:nix-systems/default";
66

7-
outputs = { self, nixpkgs, flake-utils }:
8-
flake-utils.lib.eachDefaultSystem (system:
9-
let pkgs = nixpkgs.legacyPackages.${system}; in
10-
rec {
11-
devShell = pkgs.mkShell {
12-
buildInputs = [
13-
pkgs.stylua
14-
pkgs.luaPackages.luacheck
15-
pkgs.luajitPackages.vusted
16-
pkgs.selene
17-
];
18-
};
19-
}
20-
);
7+
outputs = { self, nixpkgs, systems }: let
8+
supportedSystems = nixpkgs.lib.genAttrs (import systems);
9+
forEachSystem = function: supportedSystems (system:
10+
function nixpkgs.legacyPackages.${system});
11+
in {
12+
devShells = forEachSystem (pkgs: {
13+
default = pkgs.mkShell {
14+
packages = [
15+
pkgs.stylua
16+
pkgs.luaPackages.luacheck
17+
pkgs.luajitPackages.vusted
18+
pkgs.selene
19+
];
20+
};
21+
});
22+
};
2123
}

0 commit comments

Comments
 (0)