From 65f8ec981abe4374f24a0210067a4a3cb8fd1cf4 Mon Sep 17 00:00:00 2001 From: sudoforge <no-reply@sudoforge.com> Date: Fri, 9 May 2025 14:43:14 -0700 Subject: [PATCH] test: use pkgs.runCommand for the pinact check drv (#1407) This change refactors the derivation defined in //nix/checks:pinact.nix, rewriting it with pkgs.runCommand so that `nix flake check` actually executes it. Change-Id: Ic941133bcbedd8505580db71abbaaaf8326fb874 --- .github/workflows/trunk.yml | 2 +- nix/checks/pinact.nix | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index 99d52c1e..7e5243ac 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -51,7 +51,7 @@ jobs: contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 diff --git a/nix/checks/pinact.nix b/nix/checks/pinact.nix index c032bc9f..109bd14f 100644 --- a/nix/checks/pinact.nix +++ b/nix/checks/pinact.nix @@ -1,7 +1,12 @@ { pkgs, src }: -pkgs.writeShellApplication { - name = "pinact"; - runtimeInputs = with pkgs; [ pinact ]; - text = "pinact run --check --verify"; -} +pkgs.runCommand "pinact" + { + inherit src; + nativeBuildInputs = with pkgs; [ pinact ]; + } + '' + cd "$src" + pinact run --check --verify + touch "$out" + '' -- GitLab