feat(packages)!: add support for dream2nix
Also convert `sdcv` to use `dream2nix`
This commit is contained in:
parent
4f891220c1
commit
4e3733178e
4 changed files with 206 additions and 84 deletions
|
@ -118,9 +118,33 @@ in
|
|||
pkgs.callPackage systems {
|
||||
inherit (pkgs) lib hostPlatform targetPlatform;
|
||||
}))
|
||||
(lib.mapAttrs
|
||||
(name: { package, systems }:
|
||||
pkgs.callPackage package { }))
|
||||
(lib.mapAttrs
|
||||
(name: { package, systems }:
|
||||
let
|
||||
isDream2Nix = lib.pipe package
|
||||
[
|
||||
builtins.functionArgs
|
||||
builtins.attrNames
|
||||
(builtins.elem "dream2nix")
|
||||
];
|
||||
in
|
||||
if isDream2Nix
|
||||
then inputs.dream2nix.lib.evalModules {
|
||||
packageSets.nixpkgs = pkgs;
|
||||
modules = [
|
||||
package
|
||||
{
|
||||
paths.projectRoot = "${self.outPath}";
|
||||
paths.projectRootFile = "flake.nix";
|
||||
paths.package = "${self.outPath}";
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
# NOTE: for overlayed `maintainers`
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
}
|
||||
else pkgs.callPackage package { }))
|
||||
];
|
||||
in {
|
||||
inherit packages;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue