Skip to content

Commit 109914d

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

File tree

5 files changed

+255
-5
lines changed

5 files changed

+255
-5
lines changed

.github/workflows/update-flake.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ jobs:
6060
--flake ./flake/dev \
6161
--option commit-lock-file-summary "flake: update dev inputs"
6262
63+
nix run .#all-maintainers
64+
git add stylix/generated/all-maintainers.nix
65+
git commit -m "stylix: update all-maintainers list"
66+
6367
- name: create pull request
6468
env:
6569
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

flake/dev/all-maintainers.nix

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
lib.attrsToList
32+
(map ({ value, ... }: value.maintainers or [ ]))
33+
builtins.concatLists
34+
(map (value: {
35+
name = value.github;
36+
inherit value;
37+
}))
38+
builtins.listToAttrs
39+
(lib.generators.toPretty { })
40+
];
41+
inherit (config.treefmt) projectRootFile;
42+
nativeBuildInputs = [ config.formatter ];
43+
}
44+
''
45+
touch "$projectRootFile"
46+
47+
{
48+
echo "# THIS FILE IS GENERATED, DO NOT EDIT"
49+
# TODO: print the rest of the header
50+
cat "$maintainersPath"
51+
} >result.nix
52+
53+
treefmt --no-cache result.nix
54+
55+
install -m 644 -T result.nix "$out"
56+
'';
57+
58+
checks.all-maintainers-up-to-date = pkgs.testers.testEqualContents {
59+
assertion = "all-maintainers.nix is up to date";
60+
expected = config.packages.all-maintainers;
61+
actual = ../../stylix/generated/all-maintainers.nix;
62+
};
63+
};
64+
}

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
./nixpkgs-and-dev-nixpkgs-version-consistency.nix
56
./packages.nix

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: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# THIS FILE IS GENERATED, 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+
butzist = {
49+
email = "[email protected]";
50+
github = "butzist";
51+
githubId = 2405792;
52+
name = "Adam M. Szalkowski";
53+
};
54+
cluther = {
55+
email = "[email protected]";
56+
github = "cluther";
57+
githubId = 86579;
58+
name = "Chet Luther";
59+
};
60+
danth = {
61+
email = "[email protected]";
62+
github = "danth";
63+
githubId = 28959268;
64+
keys = [
65+
{
66+
fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D";
67+
}
68+
];
69+
matrix = "@danth:danth.me";
70+
name = "Daniel Thwaites";
71+
};
72+
gideonwolfe = {
73+
email = "[email protected]";
74+
github = "gideonwolfe";
75+
githubId = 32942052;
76+
name = "Gideon Wolfe";
77+
};
78+
justdeeevin = {
79+
email = "[email protected]";
80+
github = "justdeeevin";
81+
githubId = 90054389;
82+
name = "Devin Droddy";
83+
};
84+
louis-thevenet = {
85+
github = "louis-thevenet";
86+
githubId = 55986107;
87+
name = "Louis Thevenet";
88+
};
89+
make-42 = {
90+
email = "[email protected]";
91+
github = "make-42";
92+
githubId = 17462236;
93+
keys = [
94+
{
95+
fingerprint = "36BC 916D DD4E B1EE EE82 4BBF DC95 900F 6DA7 9992";
96+
}
97+
];
98+
matrix = "@ontake:matrix.ontake.dev";
99+
name = "Louis Dalibard";
100+
};
101+
mateusauler = {
102+
email = "[email protected]";
103+
github = "mateusauler";
104+
githubId = 24767687;
105+
keys = [
106+
{
107+
fingerprint = "A09D C093 3C37 4BFC 2B5A 269F 80A5 D62F 6EB7 D9F0";
108+
}
109+
];
110+
name = "Mateus Auler";
111+
};
112+
mightyiam = {
113+
email = "[email protected]";
114+
github = "mightyiam";
115+
githubId = 635591;
116+
name = "Shahar \"Dawn\" Or";
117+
};
118+
nukdokplex = {
119+
email = "[email protected]";
120+
github = "nukdokplex";
121+
githubId = 25458915;
122+
keys = [
123+
{
124+
fingerprint = "7CE2 4C42 942D 58EA 99F6 F00A A47E 7374 3EF6 FCC4";
125+
}
126+
];
127+
name = "Viktor Titov";
128+
};
129+
osipog = {
130+
email = "[email protected]";
131+
github = "osipog";
132+
githubId = 87434959;
133+
name = "Osi Bluber";
134+
};
135+
panchoh = {
136+
email = "[email protected]";
137+
github = "panchoh";
138+
githubId = 471059;
139+
keys = [
140+
{
141+
fingerprint = "4430 F502 8B19 FAF4 A40E C4E8 11E0 447D 4ABB A7D0";
142+
}
143+
];
144+
matrix = "@panchoh:matrix.org";
145+
name = "pancho horrillo";
146+
};
147+
repparw = {
148+
email = "[email protected]";
149+
github = "repparw";
150+
githubId = 45952970;
151+
name = "repparw";
152+
};
153+
skoove = {
154+
email = "[email protected]";
155+
github = "skoove";
156+
githubId = 53106860;
157+
name = "Zie Sturges";
158+
};
159+
trueNAHO = {
160+
github = "trueNAHO";
161+
githubId = 90870942;
162+
keys = [
163+
{
164+
fingerprint = "5FC6 088A FB1A 609D 4532 F919 0C1C 177B 3B64 68E0";
165+
}
166+
];
167+
name = "Noah Pierre Biewesch";
168+
};
169+
}

0 commit comments

Comments
 (0)