File tree Expand file tree Collapse file tree 2 files changed +65
-0
lines changed
packages/by-name/github-matrix-parser Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2025 Edgeless Systems GmbH
2+ # SPDX-License-Identifier: BUSL-1.1
3+
4+ {
5+ lib ,
6+ stdenv ,
7+ fetchFromGitHub ,
8+ nodejs ,
9+ pnpm_9 ,
10+ pnpmConfigHook ,
11+ fetchPnpmDeps ,
12+ makeWrapper ,
13+ } :
14+
15+ stdenv . mkDerivation ( finalAttrs : {
16+ pname = "github-matrix-parser" ;
17+ version = "unstable-2025-12-22" ;
18+
19+ src = fetchFromGitHub {
20+ owner = "katexochen" ;
21+ repo = "github-matrix-parser" ;
22+ rev = "37e5ad1a11714d4e9188bc75b712a458746af7b1" ;
23+ hash = "sha256-csdpCb3og7I5Tm+XZUMS9Gvbsac4l7H+tUcs5/inpPU=" ;
24+ } ;
25+
26+ nativeBuildInputs = [
27+ nodejs
28+ pnpm_9
29+ pnpmConfigHook
30+ makeWrapper
31+ ] ;
32+
33+ pnpmDeps = fetchPnpmDeps {
34+ inherit ( finalAttrs ) pname version src ;
35+ pnpm = pnpm_9 ;
36+ fetcherVersion = 3 ;
37+ hash = "sha256-mQysvhSwfjrVSbUnCNFgW4k25YZmuFtxaKtYqP+17nk=" ;
38+ } ;
39+
40+ dontBuild = true ;
41+
42+ installPhase = ''
43+ runHook preInstall
44+
45+ mkdir -p $out/bin $out/lib
46+ cp -r . $out/lib/github-matrix-parser
47+ makeWrapper ${ nodejs } /bin/node $out/bin/github-matrix-parser \
48+ --add-flags "$out/lib/github-matrix-parser/cli.js"
49+
50+ runHook postInstall
51+ '' ;
52+
53+ meta = {
54+ description = "Parse and lint GitHub actions matrix combinations" ;
55+ homepage = "https://github.com/katexochen/github-matrix-parser" ;
56+ license = lib . licenses . isc ;
57+ mainProgram = "github-matrix-parser" ;
58+ platforms = lib . platforms . all ;
59+ } ;
60+ } )
Original file line number Diff line number Diff line change 7171 command = "${ lib . getExe pkgs . contrastPkgs . scripts . docs-selfref-lint } " ;
7272 includes = [ "docs/docs/*.md" ] ;
7373 } ;
74+ github-matrix-parser = {
75+ command = "${ lib . getExe pkgs . contrastPkgs . github-matrix-parser } " ;
76+ options = [ "--check" ] ;
77+ includes = [ ".github/workflows/*.yml" ] ;
78+ } ;
7479 # Catch debug arguments in nix code that were accidentally left on true.
7580 lint-no-debug = {
7681 command = "${ lib . getExe pkgs . contrastPkgs . scripts . lint-no-debug } " ;
You can’t perform that action at this time.
0 commit comments