43 lines
930 B
Nix
43 lines
930 B
Nix
{
|
|
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
|
|
{
|
|
packages.default = pkgs.stdenv.mkDerivation {
|
|
pname = "naxgcc-doc";
|
|
version = "1.0.0";
|
|
|
|
nativeBuildInputs = builtins.attrValues {
|
|
inherit (pkgs) mdbook mdbook-katex mdbook-toc;
|
|
};
|
|
|
|
src = self;
|
|
buildPhase = ''
|
|
mdbook build
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
|
|
cp -r book/* $out
|
|
'';
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
nativeBuildInputs = builtins.attrValues {
|
|
inherit (pkgs) mdbook mdbook-katex mdbook-toc;
|
|
};
|
|
};
|
|
});
|
|
}
|