mirror of
https://github.com/nix-packages/nixapks.git
synced 2025-11-08 19:46:11 +01:00
add documentation
This commit is contained in:
parent
00ac652a44
commit
67c169884d
4 changed files with 52 additions and 1 deletions
33
.github/workflows/docs.yml
vendored
Normal file
33
.github/workflows/docs.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Build Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Nix
|
||||
uses: cachix/install-nix-action@v31
|
||||
|
||||
- name: Build documentation with Nix
|
||||
# Use bash because some Nix examples assume bash; the runner provides it.
|
||||
run: |
|
||||
# Build the documentation package from the flake. Adjust system if needed.
|
||||
nix build .#packages.x86_64-linux.documentation --no-link
|
||||
|
||||
- name: Upload built docs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: site
|
||||
path: result
|
||||
5
docs/book.toml
Normal file
5
docs/book.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[book]
|
||||
title = "nixapks"
|
||||
authors = ["osbm"]
|
||||
description = "A collection of Nix derivations for Android APKs"
|
||||
|
||||
1
docs/src/README.md
Normal file
1
docs/src/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Hello
|
||||
14
flake.nix
14
flake.nix
|
|
@ -30,8 +30,20 @@
|
|||
};
|
||||
};
|
||||
myLib = pkgs.callPackage ./lib { inherit inputs; };
|
||||
base = myLib.byNameOverlay ./apks;
|
||||
documentation = pkgs.stdenv.mkDerivation {
|
||||
pname = "nixapks-docs";
|
||||
version = "0.0.1";
|
||||
src = ./docs;
|
||||
buildInputs = with pkgs; [ mdbook ];
|
||||
buildPhase = ''
|
||||
mdbook build --dest-dir $out
|
||||
'';
|
||||
};
|
||||
in
|
||||
myLib.byNameOverlay ./apks
|
||||
# Merge the generated documentation package into the packages set so
|
||||
# you can build it via `nix build .#packages.<system>.documentation`.
|
||||
base // { documentation = documentation; }
|
||||
);
|
||||
|
||||
devShells = forAllSystems (system:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue