Archived
1
0
forked from rarias/bscpkgs

2 Commits

Author SHA1 Message Date
6491ba90ad Add hydraJobs with tests and packages 2025-09-26 12:57:17 +02:00
967cfba8ec Expose our packages in flake packages output 2025-09-26 12:56:37 +02:00
2 changed files with 19 additions and 5 deletions

View File

@@ -16,8 +16,24 @@
# full nixpkgs with our overlay applied
legacyPackages.${system} = pkgs;
# packages added by our overlay
packages.${system} =
let
inherit (builtins) attrNames removeAttrs;
inherit (nixpkgs.lib) flip filterAttrs getAttrs pipe isDerivation;
in
# extract the names of the packages from the overlay, then get the
# actual packages from the full package set with the overlay applied
pipe (self.overlays.default null { inherit (nixpkgs) lib; }) [
attrNames
(flip getAttrs pkgs)
(flip removeAttrs [ "bsc" ])
(filterAttrs (_: isDerivation))
];
hydraJobs = {
inherit (self.legacyPackages.${system}.bsc-ci) test pkgs;
inherit (self.legacyPackages.x86_64-linux.bsc-ci) test;
packages = self.packages.${system};
};
# propagate nixpkgs lib, so we can do bscpkgs.lib

View File

@@ -88,9 +88,7 @@ in bscPkgs // {
};
};
pkgs = filterAttrs (_: isDerivation) bscPkgs;
pkgsList = final.runCommand "ci-pkgs" { }
pkgs = final.runCommand "ci-pkgs" { }
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
tests = final.runCommand "ci-tests" { }
@@ -98,7 +96,7 @@ in bscPkgs // {
all = final.runCommand "ci-all" { }
''
deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}"
deps="${toString [ final.bsc-ci.pkgs final.bsc-ci.tests ]}"
cat $deps
printf '%s\n' $deps > $out
'';