From 7420f203cac43514d6c9611b13c61fc169e7e37a Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Wed, 3 Dec 2025 13:46:54 -0800 Subject: [PATCH 1/2] flake: add remaining drvs to ci.buildbot Closes: https://github.com/nix-community/stylix/issues/2056 --- flake/dev/dev-shell.nix | 2 + flake/dev/pre-commit.nix | 2 + .../public-and-dev-version-consistency.nix | 67 ++++++++++--------- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/flake/dev/dev-shell.nix b/flake/dev/dev-shell.nix index 53ff15f1..df6c4244 100644 --- a/flake/dev/dev-shell.nix +++ b/flake/dev/dev-shell.nix @@ -39,6 +39,8 @@ ''; in { + ci.buildbot = { inherit (config) devShells; }; + devShells = { default = pkgs.mkShell { # Install git-hooks when activating the shell diff --git a/flake/dev/pre-commit.nix b/flake/dev/pre-commit.nix index a2d21568..8717ef4c 100644 --- a/flake/dev/pre-commit.nix +++ b/flake/dev/pre-commit.nix @@ -5,6 +5,8 @@ perSystem = { config, ... }: { + ci.buildbot = { inherit (config.checks) pre-commit; }; + pre-commit = { check.enable = true; diff --git a/flake/dev/public-and-dev-version-consistency.nix b/flake/dev/public-and-dev-version-consistency.nix index 6cad4644..8ae2d1fe 100644 --- a/flake/dev/public-and-dev-version-consistency.nix +++ b/flake/dev/public-and-dev-version-consistency.nix @@ -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; + }; }; } From 69f1522ca616b04897a54dc53533018a8934d9e1 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Sat, 6 Dec 2025 16:40:34 -0800 Subject: [PATCH 2/2] ci: don't run checks on github actions --- .github/workflows/check.yml | 60 ------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index b444280a..00000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -name: Check - -on: - push: - branches: - - master - - release-** - pull_request: - -permissions: - contents: read - -defaults: - run: - shell: bash - -jobs: - check: - name: ${{ matrix.name }} - runs-on: ${{ matrix.runs-on }} - - # https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#choosing-github-hosted-runners - strategy: - matrix: - include: - - name: aarch64-linux - runs-on: ubuntu-24.04-arm - - name: aarch64-darwin - runs-on: macos-15 - - name: x86_64-linux - runs-on: ubuntu-24.04 - - name: x86_64-darwin - runs-on: macos-15-intel - - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - # TODO: Lock this Action to a release tag once commit [1] ("fix: relocate - # TMPDIR to /mnt to improve Nix installer compatibility") is part of a - # release, resolving [2] ("does not work with cachix install nix action"). - # - # [1]: https://github.com/wimpysworld/nothing-but-nix/pull/25 - # [2]: https://github.com/wimpysworld/nothing-but-nix/issues/24 - - uses: wimpysworld/nothing-but-nix@10c936d9e46521bf923f75458e0cbd4fa309300d # yamllint disable-line rule:line-length - if: runner.os == 'Linux' - with: - hatchet-protocol: rampage - - - uses: cachix/install-nix-action@v31 - - - uses: cachix/cachix-action@v16 - with: - name: nix-community - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - continue-on-error: true - - - run: nix develop --command stylix-check --no-nom