refactor: move packages to dedicated directory

This commit is contained in:
514fpv 2024-01-15 22:22:30 +08:00
parent 5350355ea8
commit 79bbc86ef7
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
10 changed files with 21 additions and 6 deletions

13
package/default.nix Normal file
View file

@ -0,0 +1,13 @@
{ lib, ... }: {
nixpkgs.overlays = [ (final: prev:
builtins.listToAttrs (map (pkg: {
name = pkg;
value = let
argsPath = ./${pkg}/args.nix;
in final.callPackage ./${pkg}
(if (builtins.pathExists argsPath) then
(import argsPath final)
else { });
}) (builtins.attrNames (builtins.readDir ./.)))
) ];
}