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 { };
|
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 // {
|
in bscPkgs // {
|
||||||
# Prevent accidental usage of bsc attribute
|
# Prevent accidental usage of bsc attribute
|
||||||
bsc = throw "the bsc attribute is deprecated, packages are now in the root";
|
bsc = throw "the bsc attribute is deprecated, packages are now in the root";
|
||||||
@ -88,23 +109,9 @@ in bscPkgs // {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
inherit tests;
|
||||||
|
inherit pkgs pkgsList;
|
||||||
pkgsList = final.runCommand "ci-pkgs" { }
|
inherit cross crossList;
|
||||||
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
|
inherit all;
|
||||||
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user