Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake/packages: exclude docs from packages on darwin #904

Merged
merged 3 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions flake-modules/checks.nix

This file was deleted.

2 changes: 1 addition & 1 deletion flake-modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{inputs, ...}: {
imports = [
./checks.nix
./dev.nix
./lib.nix
./legacy-packages.nix
./modules.nix
./overlays.nix
./packages.nix
./templates.nix
./tests.nix
./wrappers.nix
];

Expand Down
7 changes: 6 additions & 1 deletion flake-modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
...
}: {
packages = let
docs = {
# Do not check if documentation builds fine on darwin as it fails:
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
docs = pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
docs = pkgsUnfree.callPackage (import ../docs) {
inherit modules;
};
Expand All @@ -20,5 +22,8 @@
in
docs
// man-docs;

# Test that all packages build fine when running `nix flake check`.
checks = config.packages;
};
}
32 changes: 32 additions & 0 deletions flake-modules/tests.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
perSystem = {
pkgs,
config,
makeNixvimWithModuleUnfree,
makeNixvimWithModule,
...
}: {
checks = {
tests = import ../tests {
inherit pkgs;
inherit (pkgs) lib;
makeNixvim = configuration:
makeNixvimWithModuleUnfree {
module = {
config = configuration;
};
};
};

extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};

lib-tests = import ../tests/lib-tests.nix {
inherit pkgs;
inherit (pkgs) lib;
};
};
};
}