NaxGCC-Doc/flake.nix

44 lines
930 B
Nix
Raw Normal View History

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
{
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
'';
};
2024-04-07 09:40:55 +00:00
devShells.default = pkgs.mkShell {
nativeBuildInputs = builtins.attrValues {
2024-04-09 12:02:24 +00:00
inherit (pkgs) mdbook mdbook-katex mdbook-toc;
2024-04-07 09:40:55 +00:00
};
};
});
}