forked from rarias/bscpkgs
Rework bsc-ci
This commit is contained in:
parent
85d50f346c
commit
b3df6bb1be
43
overlay.nix
43
overlay.nix
@ -49,6 +49,27 @@ let
|
||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||
};
|
||||
|
||||
|
||||
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
||||
|
||||
crossTargets = [ "riscv64" ];
|
||||
cross = prev.lib.genAttrs crossTargets (target:
|
||||
final.pkgsCross.${target}.bsc-ci.pkgs
|
||||
);
|
||||
|
||||
buildList = name: paths: final.runCommand name ''
|
||||
deps=${toString paths}
|
||||
cat $deps
|
||||
printf '%s\n' $deps > $out
|
||||
'';
|
||||
|
||||
crossList = builtins.mapAttrs (t: v: buildList t (builtins.attrValues v)) final.bsc-ci.cross;
|
||||
|
||||
pkgsList = buildList "ci-pkgs" (builtins.attrValues pkgs);
|
||||
tests = buildList "ci-tests" (collect isDerivation final.bsc-ci.test);
|
||||
|
||||
all = buildList "ci-all" [tests pkgsList];
|
||||
|
||||
in bscPkgs // {
|
||||
# Prevent accidental usage of bsc attribute
|
||||
bsc = throw "the bsc attribute is deprecated, packages are now in the root";
|
||||
@ -88,23 +109,9 @@ in bscPkgs // {
|
||||
};
|
||||
};
|
||||
|
||||
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
||||
|
||||
pkgsList = final.runCommand "ci-pkgs" { }
|
||||
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
|
||||
|
||||
tests = final.runCommand "ci-tests" { }
|
||||
"printf '%s\n' ${toString (collect isDerivation final.bsc-ci.test)} > $out";
|
||||
|
||||
cross = prev.lib.genAttrs [ "riscv64" ] (target:
|
||||
final.pkgsCross.${target}.bsc-ci.pkgs
|
||||
);
|
||||
|
||||
all = final.runCommand "ci-all" { }
|
||||
''
|
||||
deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}"
|
||||
cat $deps
|
||||
printf '%s\n' $deps > $out
|
||||
'';
|
||||
inherit tests;
|
||||
inherit pkgs pkgsList;
|
||||
inherit cross crossList;
|
||||
inherit all;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user