Remove generated committed code, update
This commit is contained in:
parent
50bf4fe6c5
commit
3ac9c63a01
9 changed files with 37 additions and 1359 deletions
|
@ -4,3 +4,4 @@ version: 'master'
|
|||
nav:
|
||||
- modules/ROOT/nav.adoc
|
||||
- modules/reference/nav.adoc
|
||||
nix: true
|
||||
|
|
|
@ -1,20 +1,31 @@
|
|||
{
|
||||
perSystem = { config, pkgs, ... }:
|
||||
let
|
||||
doc-options = import ./options.nix { };
|
||||
perSystem = { config, pkgs, lib, ... }: {
|
||||
packages.generated-option-doc-arion =
|
||||
# TODO: use the render pipeline in flake-parts,
|
||||
# which has support for things like {options}`foo`.
|
||||
let
|
||||
eval = lib.evalModules {
|
||||
modules = import ../src/nix/modules.nix;
|
||||
};
|
||||
in
|
||||
(pkgs.nixosOptionsDoc
|
||||
{
|
||||
options = eval.options;
|
||||
}).optionsCommonMark;
|
||||
|
||||
in
|
||||
{
|
||||
packages.doc-options = pkgs.callPackage ./options.nix { };
|
||||
|
||||
checks.doc-options = pkgs.runCommand "doc-options-check" { } ''
|
||||
if diff --color -u ${./modules/ROOT/partials/NixOSOptions.adoc} ${config.packages.doc-options}; then
|
||||
touch $out
|
||||
else
|
||||
echo 1>&2 "The doc options have changed and need to be added."
|
||||
echo 1>&2 "Please run ./update-options in the root of your arion clone."
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
packages.generated-antora-files =
|
||||
pkgs.runCommand "generated-antora-files"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.pandoc ];
|
||||
doc_arion = config.packages.generated-option-doc-arion;
|
||||
}
|
||||
# TODO: use the render pipeline in flake-parts,
|
||||
# which has support for things like {options}`foo`.
|
||||
''
|
||||
mkdir -p $out/modules/ROOT/partials
|
||||
pandoc --from=markdown --to=asciidoc \
|
||||
< $doc_arion \
|
||||
> $out/modules/ROOT/partials/arion-options.adoc
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
// To update option descriptions
|
||||
// - use git grep or github search
|
||||
// - or browse through src/nix/modules
|
||||
|
||||
include::partial$NixOSOptions.adoc[]
|
||||
include::partial$arion-options.adoc[]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -37,16 +37,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669980218,
|
||||
"narHash": "sha256-HBK1tIqarj7ZsSwQEKGlyvbAIFnglytG7FxuS4K3nY8=",
|
||||
"lastModified": 1673450908,
|
||||
"narHash": "sha256-b8em+kwrNtnB7gR8SyVf6WuTyQ+6tHS6dzt9D9wgKF0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "da7988fe440ef5b8779d4f76340ad7dc79ff3b33",
|
||||
"rev": "6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "haskell-updates",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
description = "Arion - use Docker Compose via Nix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/haskell-updates";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
haskell-flake.url = "github:srid/haskell-flake";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ lib }:
|
||||
let
|
||||
|
||||
link = url: text:
|
||||
''link:${url}[${text}]'';
|
||||
link = url: text: ''[${text}](${url})'';
|
||||
|
||||
dockerComposeRef = fragment:
|
||||
''See ${link "https://docs.docker.com/compose/compose-file/#${fragment}" "Docker Compose#${fragment}"}'';
|
||||
|
|
|
@ -3,7 +3,7 @@ let
|
|||
inherit (lib) types mkOption;
|
||||
|
||||
link = url: text:
|
||||
''link:${url}[${text}]'';
|
||||
''[${text}](${url})'';
|
||||
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p jq
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
cd "$(dirname ${BASH_SOURCE[0]})"
|
||||
|
||||
doc_options="$(nix build .#doc-options --json | jq -r .[].outputs.out)"
|
||||
cat "$doc_options" >docs/modules/ROOT/partials/NixOSOptions.adoc
|
Loading…
Reference in a new issue