mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
docs/flake.nix: add flake outputs for docs
We have stuff that's referenced in CI but not available as flake outputs to build. Adding default.nix outputs to flake.nix so flake users can reference them easier.
This commit is contained in:
6
docs/flake.lock
generated
6
docs/flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1706683685,
|
||||
"narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=",
|
||||
"lastModified": 1743938762,
|
||||
"narHash": "sha256-UgFYn8sGv9B8PoFpUfCa43CjMZBl1x/ShQhRDHBFQdI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d",
|
||||
"rev": "74a40410369a1c35ee09b8a1abee6f4acbedc059",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
# Note, this should be "the standard library" + HM extensions.
|
||||
lib = import ../modules/lib/stdlib-extended.nix nixpkgs.lib;
|
||||
|
||||
forAllSystems = lib.genAttrs supportedSystems;
|
||||
|
||||
@@ -39,6 +40,8 @@
|
||||
echo "Generated ./static/style.css"
|
||||
'';
|
||||
};
|
||||
|
||||
releaseInfo = lib.importJSON ../release.json;
|
||||
in {
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
@@ -50,5 +53,20 @@
|
||||
packages = [ fpkgs.p-build ];
|
||||
};
|
||||
});
|
||||
|
||||
# Expose the docs outputs
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
docs = import ./default.nix {
|
||||
inherit pkgs lib;
|
||||
release = releaseInfo.release;
|
||||
isReleaseBranch = releaseInfo.isReleaseBranch;
|
||||
};
|
||||
in {
|
||||
inherit (docs) manPages jsonModuleMaintainers;
|
||||
inherit (docs.manual) html htmlOpenTool;
|
||||
inherit (docs.options) json;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user