mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 23:41:42 +03:00
chore(flake-parts): use perSystem in packages...
don't hard-core x86_64-linux
This commit is contained in:
parent
2bf52af96a
commit
6d4076f118
@ -1,11 +1,16 @@
|
|||||||
# evaluate packages from `/**/modules/drvs` and export them via `flake.packages`
|
# evaluate packages from `/**/modules/drvs` and export them via `flake.packages`
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
lib,
|
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
|
}: {
|
||||||
|
perSystem = {
|
||||||
|
system,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
}: let
|
}: let
|
||||||
system = "x86_64-linux";
|
|
||||||
# A module imported into every package setting up the eval cache
|
# A module imported into every package setting up the eval cache
|
||||||
setup = {config, ...}: {
|
setup = {config, ...}: {
|
||||||
lock.lockFileRel = "/v1/nix/modules/drvs/${config.name}/lock-${system}.json";
|
lock.lockFileRel = "/v1/nix/modules/drvs/${config.name}/lock-${system}.json";
|
||||||
@ -34,9 +39,8 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
evaled.config.public;
|
evaled.config.public;
|
||||||
|
|
||||||
packages = lib.mapAttrs (_: drvModule: makeDrv drvModule) self.modules.drvs;
|
|
||||||
in {
|
in {
|
||||||
# map all modules in ../drvs to a package output in the flake.
|
# map all modules in ../drvs to a package output in the flake.
|
||||||
flake.packages.${system} = packages;
|
packages = lib.mapAttrs (_: drvModule: makeDrv drvModule) self.modules.drvs;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user