diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 385d8c5..65e7c68 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,6 +12,8 @@ permissions: jobs: flake-check: runs-on: ubuntu-latest + env: + nixpkgs: "https://flakehub.com/f/NixOS/nixpkgs/0.2505.810656" steps: - uses: actions/checkout@v4 - uses: DeterminateSystems/determinate-nix-action@main @@ -19,10 +21,10 @@ jobs: - name: Check Nix formatting run: | - nix shell "https://flakehub.com/f/NixOS/nixpkgs/0.2411.715026#nixfmt-rfc-style" --command \ + nix shell "${{ env.nixpkgs }}#nixfmt-rfc-style" --command \ sh -c "git ls-files '*.nix' | xargs nixfmt --check" - name: Check links in README run: | - nix shell "https://flakehub.com/f/NixOS/nixpkgs/0.2411.715026#lychee" --command \ + nix shell "${{ env.nixpkgs }}#lychee" --command \ lychee README.md diff --git a/flake.nix b/flake.nix index 4b8e690..29380fe 100644 --- a/flake.nix +++ b/flake.nix @@ -335,6 +335,30 @@ }) output ); }; + + htmlDocsSchema = { + version = 1; + doc = '' + The `htmlDocs` flake output defines packages providing static HTML output. + ''; + inventory = + output: + self.lib.mkChildren ( + # This requires a special function because this output is structured + # htmlDocs.${package}.${system} rather than the usual ${output}.${system}.${package} + builtins.mapAttrs (packageName: systemsForPackage: { + forSystems = builtins.attrNames systemsForPackage; + + children = builtins.mapAttrs (systemType: drv: { + forSystems = [ systemType ]; + derivation = drv; + evalChecks.isDerivation = checkDerivation drv; + isFlakeCheck = false; + what = "HTML documentation"; + }) systemsForPackage; + }) output + ); + }; in { @@ -359,8 +383,7 @@ shortDescription = package.meta.description or ""; derivation = package; evalChecks.isDerivation = checkDerivation package; - inherit what; - isFlakeCheck = isFlakeCheck; + inherit isFlakeCheck what; }) packagesForSystem; }) output ); @@ -381,6 +404,7 @@ schemas.nixosModules = nixosModulesSchema; schemas.homeConfigurations = homeConfigurationsSchema; schemas.homeModules = homeModulesSchema; + schemas.htmlDocs = htmlDocsSchema; schemas.darwinConfigurations = darwinConfigurationsSchema; schemas.darwinModules = darwinModulesSchema; schemas.dockerImages = dockerImagesSchema;