2024-04-07 09:40:55 +00:00
|
|
|
{
|
|
|
|
description = "A very basic flake";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
|
|
|
|
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2024-04-08 10:58:00 +00:00
|
|
|
packages.default = pkgs.stdenv.mkDerivation {
|
|
|
|
pname = "naxgcc-doc";
|
|
|
|
version = "1.0.0";
|
|
|
|
|
|
|
|
nativeBuildInputs = builtins.attrValues {
|
2024-10-16 12:44:38 +00:00
|
|
|
inherit (pkgs) mdbook mdbook-katex mdbook-toc mdbook-admonish;
|
2024-04-08 10:58:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
src = self;
|
|
|
|
buildPhase = ''
|
|
|
|
mdbook build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
|
|
|
|
cp -r book/* $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-07 09:40:55 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = builtins.attrValues {
|
2024-10-14 19:55:14 +00:00
|
|
|
inherit (pkgs) mdbook mdbook-katex mdbook-toc mdbook-admonish;
|
2024-04-07 09:40:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|