Skip to content

Commit b3b5e8a

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

File tree

6 files changed

+268
-5
lines changed

6 files changed

+268
-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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
git
11+
coreutils
12+
];
13+
text = ''
14+
root="$(git rev-parse --show-toplevel)"
15+
install -m 644 -T \
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+
let
25+
meta = pkgs.callPackage ../../stylix/meta.nix { };
26+
in
27+
pkgs.runCommand "all-maintainers"
28+
{
29+
passAsFile = [ "maintainers" ];
30+
maintainers = lib.pipe meta [
31+
builtins.attrValues
32+
(builtins.concatMap (value: value.maintainers or [ ]))
33+
(map (value: {
34+
name = value.github;
35+
inherit value;
36+
}))
37+
builtins.listToAttrs
38+
(lib.generators.toPretty { })
39+
];
40+
inherit (config.treefmt) projectRootFile;
41+
nativeBuildInputs = [ config.formatter ];
42+
}
43+
''
44+
touch "$projectRootFile"
45+
46+
{
47+
echo '# THIS FILE IS GENERATED with \`nix run .#all-maintainers\`'
48+
echo '# DO NOT EDIT'
49+
cat "$maintainersPath"
50+
} >result.nix
51+
52+
treefmt --no-cache result.nix
53+
54+
install -m 644 -T result.nix "$out"
55+
'';
56+
};
57+
}

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

0 commit comments

Comments
 (0)