Skip to content

Commit 7028979

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

File tree

6 files changed

+264
-5
lines changed

6 files changed

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

0 commit comments

Comments
 (0)