flake: add remaining drvs to ci.buildbot

Closes: https://github.com/nix-community/stylix/issues/2056
(cherry picked from commit 7420f203ca)
This commit is contained in:
0xda157 2025-12-03 13:46:54 -08:00 committed by NAHO
parent c97b7b37b2
commit 21da33cdd4
3 changed files with 39 additions and 32 deletions

View file

@ -39,6 +39,8 @@
'';
in
{
ci.buildbot = { inherit (config) devShells; };
devShells = {
default = pkgs.mkShell {
# Install git-hooks when activating the shell

View file

@ -5,6 +5,8 @@
perSystem =
{ config, ... }:
{
ci.buildbot = { inherit (config.checks) pre-commit; };
pre-commit = {
check.enable = true;

View file

@ -1,41 +1,44 @@
{ inputs, ... }:
{
perSystem =
{ lib, pkgs, ... }:
{
checks = lib.mkMerge (
map
(
input:
let
name = "${input}-and-dev-${input}-version-consistency";
in
{
${name} =
let
dev = inputs."dev-${input}".narHash;
public = inputs.${input}.narHash;
in
pkgs.runCommand name { } ''
if [ "${public}" != "${dev}" ]; then
printf \
'inconsistent ${input} (%s) and dev-${input} (%s) versions\n' \
"${public}" \
"${dev}" \
>&2
lib,
pkgs,
system,
...
}:
let
checks = lib.genAttrs' [ "flake-parts" "nixpkgs" "systems" ] (
input:
let
name = "${input}-and-dev-${input}-version-consistency";
in
lib.nameValuePair name (
let
dev = inputs."dev-${input}".narHash;
public = inputs.${input}.narHash;
in
pkgs.runCommand name { } ''
if [ "${public}" != "${dev}" ]; then
printf \
'inconsistent ${input} (%s) and dev-${input} (%s) versions\n' \
"${public}" \
"${dev}" \
>&2
exit 1
fi
exit 1
fi
mkdir "$out"
'';
}
)
[
"flake-parts"
"nixpkgs"
"systems"
]
mkdir "$out"
''
)
);
in
{
inherit checks;
ci.buildbot = lib.mkIf (system == "x86_64-linux") {
public-and-dev-version-consistency = pkgs.linkFarm "public-and-dev-version-consistency" checks;
};
};
}