Skip to content

Commit 83ce0ca

Browse files
committed
proper fix for overlay and packages
1 parent 609811e commit 83ce0ca

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

flake.nix

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@
9494
let
9595
pkgs = import nixpkgs { system = "x86_64-linux"; };
9696
lib = pkgs.lib;
97+
98+
plugins =
99+
let
100+
pluginDirs = lib.remove "" (
101+
lib.mapAttrsToList (name: kind: if kind == "directory" then name else "") (
102+
builtins.readDir "${self}/plugins/"
103+
)
104+
);
105+
in
106+
lib.genAttrs pluginDirs (name: mkPlugin pkgs name "${self}/plugins/${name}");
97107
in
98108
rec {
99109
cli = mkCli pkgs;
@@ -104,6 +114,11 @@
104114
name = "msgscript-all-plugins";
105115
paths = lib.attrValues plugins;
106116
};
117+
};
118+
packages.aarch64-linux =
119+
let
120+
pkgs = import nixpkgs { system = "aarch64-linux"; };
121+
lib = pkgs.lib;
107122

108123
plugins =
109124
let
@@ -114,11 +129,6 @@
114129
);
115130
in
116131
lib.genAttrs pluginDirs (name: mkPlugin pkgs name "${self}/plugins/${name}");
117-
};
118-
packages.aarch64-linux =
119-
let
120-
pkgs = import nixpkgs { system = "aarch64-linux"; };
121-
lib = pkgs.lib;
122132
in
123133
rec {
124134
cli = mkCli "x86_64-linux";
@@ -129,16 +139,6 @@
129139
name = "msgscript-all-plugins";
130140
paths = lib.attrValues plugins;
131141
};
132-
133-
plugins =
134-
let
135-
pluginDirs = lib.remove "" (
136-
lib.mapAttrsToList (name: kind: if kind == "directory" then name else "") (
137-
builtins.readDir "${self}/plugins/"
138-
)
139-
);
140-
in
141-
lib.genAttrs pluginDirs (name: mkPlugin pkgs name "${self}/plugins/${name}");
142142
};
143143

144144
devShells.x86_64-linux.default =
@@ -171,7 +171,7 @@
171171
];
172172
};
173173

174-
overlays = final: prev: {
174+
overlays.default = final: prev: {
175175
msgscript-cli = self.packages.${final.system}.cli;
176176
msgscript-server = self.packages.${final.system}.server;
177177
};

0 commit comments

Comments
 (0)