Merge pull request #408 from nix-community/remove-makeOutputs-example

Remove makeOutputs from examples
This commit is contained in:
DavHau 2022-12-04 01:31:59 +07:00 committed by GitHub
commit 811b2852cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 29 deletions

View File

@ -10,34 +10,19 @@
allPkgs =
l.map
# nixpkgs could be imported manually here with overrides etc.
(system: inp.dream2nix.inputs.nixpkgs.legacyPackages.${system})
["x86_64-linux" "aarch64-linux"];
initD2N = pkgs:
inp.dream2nix.lib.init {
inherit pkgs;
config.projectRoot = ./.;
};
makeOutputs = pkgs: let
outputs = (initD2N pkgs).dream2nix-interface.makeOutputs {
source = inp.src;
settings = [
{
builder = "build-rust-package";
translator = "cargo-lock";
}
];
};
in rec {
packages.${pkgs.system} = outputs.packages;
# checks.${pkgs.system} = {
# inherit (outputs.packages) linemd;
# };
};
allOutputs = l.map makeOutputs allPkgs;
outputs = l.foldl' l.recursiveUpdate {} allOutputs;
in
outputs;
inp.dream2nix.lib.makeFlakeOutputs {
pkgs = allPkgs;
config.projectRoot = ./.;
source = inp.src;
settings = [
{
builder = "build-rust-package";
translator = "cargo-lock";
}
];
};
}

View File

@ -53,8 +53,7 @@
if l.isList pkgsList
then
l.listToAttrs
(pkgs: l.nameValuePair (makePkgsKey pkgs) pkgs)
pkgsList
(map (pkgs: l.nameValuePair (makePkgsKey pkgs) pkgs) pkgsList)
else {"${makePkgsKey pkgsList}" = pkgsList;}
# only systems is specified
else