mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 15:33:20 +03:00
30 lines
858 B
Nix
30 lines
858 B
Nix
{ self, lib, inputs, ... }: {
|
|
perSystem = { config, self', inputs', pkgs, system, ... }: let
|
|
|
|
evalCacheSetup = {config,...}: {
|
|
eval-cache.cacheFileRel = "/nix/modules/drvs/${config.pname}/cache-${system}.json";
|
|
eval-cache.repoRoot = self;
|
|
eval-cache.enable = true;
|
|
};
|
|
|
|
makeDrv = module: let
|
|
evaled = lib.evalModules {
|
|
modules = [
|
|
inputs.drv-parts.modules.drv-parts.docs
|
|
module
|
|
evalCacheSetup
|
|
];
|
|
specialArgs.dependencySets = {
|
|
nixpkgs = inputs'.nixpkgsPython.legacyPackages;
|
|
nixpkgsStable = inputs'.nixpkgsStable.legacyPackages;
|
|
};
|
|
specialArgs.drv-parts = inputs.drv-parts;
|
|
};
|
|
in
|
|
evaled // evaled.config.final.package;
|
|
|
|
in {
|
|
packages = lib.mapAttrs (_: drvModule: makeDrv drvModule) self.modules.drvs;
|
|
};
|
|
}
|