Skip to content

Commit 46d3bf8

Browse files
stylix: add generated all-maintainers file
Co-authored-by: Matt Sturgeon <[email protected]>
1 parent f6c5aaa commit 46d3bf8

File tree

6 files changed

+270
-5
lines changed

6 files changed

+270
-5
lines changed

.github/workflows/update-flake.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ jobs:
6060
--flake ./flake/dev \
6161
--option commit-lock-file-summary "flake: update dev inputs"
6262
63+
# The nixpkgs maintainers may have changed, so keep all-maintainers
64+
# in sync
65+
nix run .#all-maintainers
66+
67+
git add stylix/generated/all-maintainers.nix
68+
git commit -m "stylix: update all-maintainers list" ||
69+
echo "all-maintainers has no changes"
70+
6371
- name: create pull request
6472
env:
6573
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

flake/dev/all-maintainers.nix

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{ lib, ... }:
2+
{
3+
perSystem =
4+
{ pkgs, config, ... }:
5+
{
6+
apps.all-maintainers = {
7+
program = pkgs.writeShellApplication {
8+
name = "update-all-maintainers";
9+
runtimeInputs = [ pkgs.gitMinimal ];
10+
text = ''
11+
root="$(git rev-parse --show-toplevel)"
12+
cp --force \
13+
${config.packages.all-maintainers} \
14+
"$root/stylix/generated/all-maintainers.nix"
15+
'';
16+
};
17+
meta.description = "update all-maintainers.nix";
18+
};
19+
20+
packages.all-maintainers =
21+
pkgs.runCommand "all-maintainers"
22+
{
23+
passAsFile = [ "maintainers" ];
24+
maintainers = ''
25+
# DO NOT EDIT THIS GENERATED FILE.
26+
#
27+
# This file lists Stylix module maintainers for GitHub review
28+
# requests, per NixOS RFC 39.
29+
#
30+
# To generate this file, run:
31+
#
32+
# nix run .#all-maintainers
33+
${lib.pipe ../../stylix/meta.nix [
34+
(p: pkgs.callPackage p { })
35+
builtins.attrValues
36+
(builtins.concatMap (target: target.maintainers or [ ]))
37+
(map (maintainer: lib.nameValuePair maintainer.github maintainer))
38+
builtins.listToAttrs
39+
(lib.generators.toPretty { })
40+
]}
41+
'';
42+
inherit (config.treefmt) projectRootFile;
43+
nativeBuildInputs = [ config.formatter ];
44+
}
45+
''
46+
touch "$projectRootFile"
47+
cp "$maintainersPath" result.nix
48+
treefmt --no-cache result.nix
49+
install -m 644 -T result.nix "$out"
50+
'';
51+
};
52+
}

flake/dev/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
imports = [
3+
./all-maintainers.nix
34
./dev-shell.nix
45
./packages.nix
56
./pre-commit.nix

flake/dev/pre-commit.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
settings.hooks = {
1414
# keep-sorted start block=yes
15+
all-maintainers = {
16+
enable = true;
17+
entry = config.apps.all-maintainers.program;
18+
files = ''flake\.lock|modules\/.*\/meta\.nix|stylix\/generated\/all-maintainers.nix|stylix\/maintainers\.nix'';
19+
};
1520
deadnix = {
1621
enable = true;
1722
settings.noUnderscore = true;

flake/propagated-packages.nix

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,22 @@
1515
perSystem =
1616
{ pkgs, system, ... }:
1717
lib.optionalAttrs (partitionStack == [ ]) {
18-
packages = lib.mkIf pkgs.stdenv.hostPlatform.isLinux (
19-
lib.mapAttrs (
20-
name: _: config.partitions.dev.module.flake.packages.${system}.${name}
21-
) (import ../stylix/testbed/autoload.nix { inherit lib pkgs; })
22-
);
18+
apps = {
19+
inherit (config.partitions.dev.module.flake.apps.${system})
20+
all-maintainers
21+
;
22+
};
23+
packages = lib.mkMerge [
24+
{
25+
inherit (config.partitions.dev.module.flake.packages.${system})
26+
all-maintainers
27+
;
28+
}
29+
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux (
30+
lib.mapAttrs (
31+
name: _: config.partitions.dev.module.flake.packages.${system}.${name}
32+
) (import ../stylix/testbed/autoload.nix { inherit lib pkgs; })
33+
))
34+
];
2335
};
2436
}

stylix/generated/all-maintainers.nix

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# DO NOT EDIT THIS GENERATED FILE.
2+
#
3+
# This file lists Stylix module maintainers for GitHub review
4+
# requests, per NixOS RFC 39.
5+
#
6+
# To generate this file, run:
7+
#
8+
# nix run .#all-maintainers
9+
{
10+
"0x5a4" = {
11+
email = "[email protected]";
12+
github = "0x5a4";
13+
githubId = 54070204;
14+
name = "0x5a4";
15+
};
16+
Flameopathic = {
17+
email = "[email protected]";
18+
github = "Flameopathic";
19+
githubId = 64027365;
20+
name = "Erin Pletches";
21+
};
22+
MrSom3body = {
23+
email = "[email protected]";
24+
github = "MrSom3body";
25+
githubId = 129101708;
26+
matrix = "@mrsom3body:matrix.org";
27+
name = "Karun Sandhu";
28+
};
29+
Noodlez1232 = {
30+
email = "[email protected]";
31+
github = "Noodlez1232";
32+
githubId = 12480453;
33+
matrix = "@noodlez1232:matrix.org";
34+
name = "Nathaniel Barragan";
35+
};
36+
TheMaxMur = {
37+
email = "[email protected]";
38+
github = "TheMaxMur";
39+
githubId = 31189199;
40+
name = "Maxim Muravev";
41+
};
42+
ajgon = {
43+
email = "[email protected]";
44+
github = "ajgon";
45+
githubId = 150545;
46+
name = "Igor Rzegocki";
47+
};
48+
awwpotato = {
49+
email = "[email protected]";
50+
github = "awwpotato";
51+
githubId = 153149335;
52+
matrix = "@awwpotato:envs.net";
53+
name = "awwpotato";
54+
};
55+
brckd = {
56+
email = "[email protected]";
57+
github = "brckd";
58+
githubId = 92804487;
59+
keys = [
60+
{
61+
fingerprint = "58A2 81E6 2FBD 6E4E 664C B603 7B4D 2A02 BB0E C28C";
62+
}
63+
];
64+
name = "bricked";
65+
};
66+
butzist = {
67+
email = "[email protected]";
68+
github = "butzist";
69+
githubId = 2405792;
70+
name = "Adam M. Szalkowski";
71+
};
72+
cluther = {
73+
email = "[email protected]";
74+
github = "cluther";
75+
githubId = 86579;
76+
name = "Chet Luther";
77+
};
78+
danth = {
79+
email = "[email protected]";
80+
github = "danth";
81+
githubId = 28959268;
82+
keys = [
83+
{
84+
fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D";
85+
}
86+
];
87+
matrix = "@danth:danth.me";
88+
name = "Daniel Thwaites";
89+
};
90+
gideonwolfe = {
91+
email = "[email protected]";
92+
github = "gideonwolfe";
93+
githubId = 32942052;
94+
name = "Gideon Wolfe";
95+
};
96+
justdeeevin = {
97+
email = "[email protected]";
98+
github = "justdeeevin";
99+
githubId = 90054389;
100+
name = "Devin Droddy";
101+
};
102+
louis-thevenet = {
103+
github = "louis-thevenet";
104+
githubId = 55986107;
105+
name = "Louis Thevenet";
106+
};
107+
make-42 = {
108+
email = "[email protected]";
109+
github = "make-42";
110+
githubId = 17462236;
111+
keys = [
112+
{
113+
fingerprint = "36BC 916D DD4E B1EE EE82 4BBF DC95 900F 6DA7 9992";
114+
}
115+
];
116+
matrix = "@ontake:matrix.ontake.dev";
117+
name = "Louis Dalibard";
118+
};
119+
mateusauler = {
120+
email = "[email protected]";
121+
github = "mateusauler";
122+
githubId = 24767687;
123+
keys = [
124+
{
125+
fingerprint = "A09D C093 3C37 4BFC 2B5A 269F 80A5 D62F 6EB7 D9F0";
126+
}
127+
];
128+
name = "Mateus Auler";
129+
};
130+
mightyiam = {
131+
email = "[email protected]";
132+
github = "mightyiam";
133+
githubId = 635591;
134+
name = "Shahar \"Dawn\" Or";
135+
};
136+
nukdokplex = {
137+
email = "[email protected]";
138+
github = "nukdokplex";
139+
githubId = 25458915;
140+
keys = [
141+
{
142+
fingerprint = "7CE2 4C42 942D 58EA 99F6 F00A A47E 7374 3EF6 FCC4";
143+
}
144+
];
145+
name = "Viktor Titov";
146+
};
147+
osipog = {
148+
email = "[email protected]";
149+
github = "osipog";
150+
githubId = 87434959;
151+
name = "Osi Bluber";
152+
};
153+
panchoh = {
154+
email = "[email protected]";
155+
github = "panchoh";
156+
githubId = 471059;
157+
keys = [
158+
{
159+
fingerprint = "4430 F502 8B19 FAF4 A40E C4E8 11E0 447D 4ABB A7D0";
160+
}
161+
];
162+
matrix = "@panchoh:matrix.org";
163+
name = "pancho horrillo";
164+
};
165+
repparw = {
166+
email = "[email protected]";
167+
github = "repparw";
168+
githubId = 45952970;
169+
name = "repparw";
170+
};
171+
skoove = {
172+
email = "[email protected]";
173+
github = "skoove";
174+
githubId = 53106860;
175+
name = "Zie Sturges";
176+
};
177+
trueNAHO = {
178+
github = "trueNAHO";
179+
githubId = 90870942;
180+
keys = [
181+
{
182+
fingerprint = "5FC6 088A FB1A 609D 4532 F919 0C1C 177B 3B64 68E0";
183+
}
184+
];
185+
name = "Noah Pierre Biewesch";
186+
};
187+
}

0 commit comments

Comments
 (0)