Skip to content

Commit c003b7b

Browse files
committed
stylix: add generated all-maintainers file
1 parent 1d7a781 commit c003b7b

File tree

5 files changed

+519
-5
lines changed

5 files changed

+519
-5
lines changed

flake/dev/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
imports = [
33
./dev-shell.nix
4+
./generate-all-maintainers.nix
45
./nixpkgs-and-dev-nixpkgs-version-consistency.nix
56
./packages.nix
67
./pre-commit.nix
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{ lib, ... }:
2+
{
3+
perSystem =
4+
{ pkgs, ... }:
5+
{
6+
packages.generate-all-maintainers =
7+
let
8+
meta = pkgs.callPackage ../../stylix/meta.nix { };
9+
all_maintainers = lib.pipe meta [
10+
lib.attrsToList
11+
(map ({ value, ... }: value.maintainers or [ ]))
12+
builtins.concatLists
13+
builtins.toJSON
14+
];
15+
in
16+
pkgs.runCommand "generate-all-maintainers" { inherit all_maintainers; } ''
17+
echo "// THIS FILE IS GENERATED, DO NOT EDIT" > $out
18+
echo "$all_maintainers" >> $out
19+
'';
20+
};
21+
}

flake/dev/treefmt.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"*.css"
1919
"*.js"
2020
"*.json"
21+
"*.jsonc"
2122
];
2223
excludes = [
2324
# Contains custom syntax that biome can't handle

flake/propagated-packages.nix

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@
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+
packages = lib.mkMerge [
19+
{
20+
inherit (config.partitions.dev.module.flake.packages.${system})
21+
generate-all-maintainers
22+
;
23+
}
24+
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux (
25+
lib.mapAttrs (
26+
name: _: config.partitions.dev.module.flake.packages.${system}.${name}
27+
) (import ../stylix/testbed/autoload.nix { inherit lib pkgs; })
28+
))
29+
];
2330
};
2431
}

0 commit comments

Comments
 (0)