Skip to content

Commit

Permalink
expose 'doc-modules' package that generates module documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
emiflake committed May 29, 2023
1 parent c0a78db commit bcc10f5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
17 changes: 16 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,23 @@
inputs.pre-commit-hooks.flakeModule
];
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
perSystem = { config, self', inputs', pkgs, lib, system, ... }:
perSystem = { options, config, self', inputs', pkgs, lib, system, ... }:
let
pkgs = import inputs.nixpkgs { inherit system; };
utils = import ./nix/utils.nix { inherit pkgs lib; };
doc-modules = (inputs.flake-parts.lib.evalFlakeModule
{
inherit inputs;
}
{
imports = [
./nix/onchain.nix
./nix/run.nix
./nix/offchain.nix
# FIXME: This module doesn't seem to work yet.
# ./nix/ci-config.nix
];
});
in
{
pre-commit = {
Expand All @@ -62,13 +75,15 @@
shellHook = config.pre-commit.installationScript;
};
formatter = pkgs.nixpkgs-fmt;
packages.options-doc = (pkgs.nixosOptionsDoc { inherit (doc-modules) options; }).optionsCommonMark;

# This check is for `liqwid-nix` itself.
checks.nixFormat =
utils.shellCheck "nixFormat" ./. { nativeBuildInputs = [ pkgs.nixpkgs-fmt ]; } ''
find -name '*.nix' -not -path './dist*/*' -not -path './haddock/*' | xargs nixpkgs-fmt
'';
};

herculesCI = {
ciSystems = [ "x86_64-linux" ];
onPush.default.outputs = self.checks.x86_64-linux;
Expand Down
10 changes: 2 additions & 8 deletions nix/offchain.nix
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,8 @@ in
default = false;
};

nodejsPackage = lib.mkOption {
description = ''
The nodejs package to use.
Added in: 2.1.1.
'';
type = types.package;
default = pkgs.nodejs-14_x;
nodejsPackage = lib.mkPackageOption pkgs "nodejs" {
default = [ "nodejs-14_x" ];
};
};
};
Expand Down

0 comments on commit bcc10f5

Please sign in to comment.