You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
10 months ago
|
{
|
||
|
_bootstrapImportDependency ?
|
||
|
source:
|
||
|
if source ? outPath then _bootstrapImportDependency (import source)
|
||
|
else
|
||
|
let
|
||
|
evil = builtins.tryEval (source {});
|
||
|
in
|
||
|
if evil.success then evil.result else source,
|
||
|
sources ? (import ./npins), nixpkgs-lib ? _bootstrapImportDependency sources.nixpkgs-lib, lib ? nixpkgs-lib.lib }:
|
||
|
{
|
||
|
lib = rec {
|
||
|
importDependency = _bootstrapImportDependency;
|
||
|
melt = defaultNixFile: flakeInputs:
|
||
|
let
|
||
|
outputFun = import defaultNixFile;
|
||
|
dependencies = builtins.mapAttrs (n: s: importDependency s) sources;
|
||
|
outputs =
|
||
|
if builtins.isFunction outputFun then outputFun dependencies else outputFun;
|
||
|
in
|
||
|
outputs;
|
||
|
};
|
||
|
|
||
|
# This works because static.
|
||
|
# checks.x86_64-linux.test = derivation {
|
||
|
# name = "test-derivation";
|
||
|
# builder = ":";
|
||
|
# system = "x86_64-linux";
|
||
|
# };
|
||
|
|
||
|
checks = lib.genAttrs [ "x86_64-linux" ] (system: {
|
||
|
test = derivation {
|
||
|
name = "test-derivation";
|
||
|
builder = ":";
|
||
|
inherit system;
|
||
|
};
|
||
|
});
|
||
|
}
|