2024-10-01 05:59:38 +02:00
|
|
|
let
|
2025-05-31 19:09:58 +02:00
|
|
|
pinned = (builtins.fromJSON (builtins.readFile ./pinned.json)).pins;
|
2024-10-01 05:59:38 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
system ? builtins.currentSystem,
|
|
|
|
|
|
|
|
nixpkgs ? null,
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
nixpkgs' =
|
|
|
|
if nixpkgs == null then
|
|
|
|
fetchTarball {
|
2025-05-31 19:09:58 +02:00
|
|
|
inherit (pinned.nixpkgs) url;
|
|
|
|
sha256 = pinned.nixpkgs.hash;
|
2024-10-01 05:59:38 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
nixpkgs;
|
|
|
|
|
|
|
|
pkgs = import nixpkgs' {
|
|
|
|
inherit system;
|
|
|
|
config = { };
|
|
|
|
overlays = [ ];
|
|
|
|
};
|
2025-02-12 19:58:29 +01:00
|
|
|
|
|
|
|
fmt =
|
|
|
|
let
|
|
|
|
treefmtNixSrc = fetchTarball {
|
2025-05-31 19:09:58 +02:00
|
|
|
inherit (pinned.treefmt-nix) url;
|
|
|
|
sha256 = pinned.treefmt-nix.hash;
|
2025-02-12 19:58:29 +01:00
|
|
|
};
|
|
|
|
treefmtEval = (import treefmtNixSrc).evalModule pkgs {
|
|
|
|
# Important: The auto-rebase script uses `git filter-branch --tree-filter`,
|
|
|
|
# which creates trees within the Git repository under `.git-rewrite/t`,
|
|
|
|
# notably without having a `.git` themselves.
|
|
|
|
# So if this projectRootFile were the default `.git/config`,
|
|
|
|
# having the auto-rebase script use treefmt on such a tree would make it
|
|
|
|
# format all files in the _parent_ Git tree as well.
|
|
|
|
projectRootFile = ".git-blame-ignore-revs";
|
|
|
|
|
|
|
|
# Be a bit more verbose by default, so we can see progress happening
|
|
|
|
settings.verbose = 1;
|
|
|
|
|
|
|
|
# By default it's info, which is too noisy since we have many unmatched files
|
|
|
|
settings.on-unmatched = "debug";
|
|
|
|
|
2025-05-11 11:04:30 +02:00
|
|
|
programs.actionlint.enable = true;
|
|
|
|
|
2025-05-09 21:54:12 +02:00
|
|
|
programs.keep-sorted.enable = true;
|
|
|
|
|
2025-02-12 19:58:29 +01:00
|
|
|
# This uses nixfmt-rfc-style underneath,
|
|
|
|
# the default formatter for Nix code.
|
|
|
|
# See https://github.com/NixOS/nixfmt
|
|
|
|
programs.nixfmt.enable = true;
|
2025-05-09 20:56:58 +02:00
|
|
|
|
|
|
|
settings.formatter.editorconfig-checker = {
|
|
|
|
command = "${pkgs.lib.getExe pkgs.editorconfig-checker}";
|
|
|
|
options = [ "-disable-indent-size" ];
|
|
|
|
includes = [ "*" ];
|
|
|
|
priority = 1;
|
|
|
|
};
|
2025-02-12 19:58:29 +01:00
|
|
|
};
|
2025-02-12 20:01:58 +01:00
|
|
|
fs = pkgs.lib.fileset;
|
|
|
|
nixFilesSrc = fs.toSource {
|
|
|
|
root = ../.;
|
2025-05-13 08:24:25 +02:00
|
|
|
fileset = fs.difference ../. (fs.maybeMissing ../.git);
|
2025-02-12 20:01:58 +01:00
|
|
|
};
|
2025-02-12 19:58:29 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
shell = treefmtEval.config.build.devShell;
|
2025-02-12 20:00:04 +01:00
|
|
|
pkg = treefmtEval.config.build.wrapper;
|
2025-02-12 20:01:58 +01:00
|
|
|
check = treefmtEval.config.build.check nixFilesSrc;
|
2025-02-12 19:58:29 +01:00
|
|
|
};
|
|
|
|
|
2024-10-01 05:59:38 +02:00
|
|
|
in
|
|
|
|
{
|
2025-02-12 19:58:29 +01:00
|
|
|
inherit pkgs fmt;
|
2024-10-04 01:49:44 +02:00
|
|
|
requestReviews = pkgs.callPackage ./request-reviews { };
|
2024-10-04 01:50:36 +02:00
|
|
|
codeownersValidator = pkgs.callPackage ./codeowners-validator { };
|
2024-11-14 23:14:20 +01:00
|
|
|
eval = pkgs.callPackage ./eval { };
|
2025-05-05 19:26:47 +02:00
|
|
|
|
|
|
|
# CI jobs
|
|
|
|
lib-tests = import ../lib/tests/release.nix { inherit pkgs; };
|
2025-05-05 21:28:41 +02:00
|
|
|
manual-nixos = (import ../nixos/release.nix { }).manual.${system} or null;
|
2025-05-29 16:32:19 +02:00
|
|
|
manual-nixpkgs = (import ../doc { });
|
|
|
|
manual-nixpkgs-tests = (import ../doc { }).tests;
|
2025-05-24 15:01:44 +02:00
|
|
|
nixpkgs-vet = pkgs.callPackage ./nixpkgs-vet.nix { };
|
2025-05-10 21:55:05 +02:00
|
|
|
parse = pkgs.lib.recurseIntoAttrs {
|
|
|
|
latest = pkgs.callPackage ./parse.nix { nix = pkgs.nixVersions.latest; };
|
2025-05-10 21:56:40 +02:00
|
|
|
lix = pkgs.callPackage ./parse.nix { nix = pkgs.lix; };
|
|
|
|
minimum = pkgs.callPackage ./parse.nix { nix = pkgs.nixVersions.minimum; };
|
2025-05-10 21:55:05 +02:00
|
|
|
};
|
2025-05-06 21:39:59 +02:00
|
|
|
shell = import ../shell.nix { inherit nixpkgs system; };
|
2024-10-01 05:59:38 +02:00
|
|
|
}
|