Skip to content

Commit e0e5826

Browse files
committed
stop using flake-utils
1 parent 465ae74 commit e0e5826

File tree

2 files changed

+61
-51
lines changed

2 files changed

+61
-51
lines changed

flake.lock

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

flake.nix

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,63 @@
11
{
22
inputs = {
3-
utils.url = "github:numtide/flake-utils";
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Or your preferred channel
4+
# flake-utils is no longer an input
45
};
5-
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
6-
let
7-
pkgs = nixpkgs.legacyPackages.${system};
8-
in
9-
{
10-
devShell = pkgs.mkShell {
6+
7+
outputs = inputs @ { self, nixpkgs, ... }: let
8+
9+
forAllSystems = function:
10+
nixpkgs.lib.genAttrs [
11+
"x86_64-linux"
12+
"aarch64-linux"
13+
# Add other systems like "x86_64-darwin", "aarch64-darwin" if you need them
14+
] (system:
15+
function (import nixpkgs {
16+
inherit system;
17+
# overlays = [ ... ]; # You can add overlays here if needed
18+
# config = { ... }; # Or pkgs configuration
19+
}));
20+
21+
in rec { # 'rec' allows self-reference if needed, e.g., devShells = devShell;
22+
23+
# This will create devShell.x86_64-linux, devShell.aarch64-linux, etc.
24+
# `nix develop` on a supported system (e.g., x86_64-linux) will pick up
25+
# devShell.x86_64-linux automatically.
26+
devShell = forAllSystems (pkgs: # pkgs for the current system is passed by forAllSystems
27+
pkgs.mkShell {
28+
name = "my-dev-environment"; # Optional: give your shell a name
1129
buildInputs = with pkgs; [
1230
efm-langserver
1331
nil
14-
nodePackages_latest.nodejs
32+
nodePackages_latest.nodejs # Consider pinning like nodejs_20 or nodejs_latest
1533
nodePackages_latest.typescript-language-server
1634
nodePackages_latest.prettier
1735
vscode-langservers-extracted
1836
nodePackages_latest.bash-language-server
1937
];
20-
};
21-
}
22-
);
38+
# You can add shell hooks or environment variables here too
39+
# shellHook = ''
40+
# echo "Welcome to the development shell!"
41+
# export MY_VAR="hello"
42+
# '';
43+
}
44+
);
45+
46+
# Optional: flake-utils often provides `devShells` as well,
47+
# which is identical to `devShell` in this setup.
48+
# This can be useful for clarity or if some tools expect `devShells.<system>`.
49+
devShells = devShell;
50+
51+
# If you had other outputs like packages or apps, they would go here:
52+
# packages = forAllSystems (pkgs: {
53+
# default = pkgs.hello; # Example
54+
# });
55+
#
56+
# apps = forAllSystems (pkgs: {
57+
# default = {
58+
# type = "app";
59+
# program = "${self.packages.${pkgs.system}.default}/bin/hello";
60+
# };
61+
# });
62+
};
2363
}

0 commit comments

Comments
 (0)