36 lines
912 B
Nix
36 lines
912 B
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
dependencies = with pkgs; [ typst gnumake jq xdg-utils zip ];
|
|
in
|
|
{
|
|
packages.documentation = pkgs.stdenv.mkDerivation {
|
|
pname = "documentation";
|
|
version = "1.2";
|
|
src = ./.;
|
|
buildInputs = dependencies;
|
|
buildPhase = ''
|
|
make documentation.pdf
|
|
'';
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r documentation.pdf $out/ || true
|
|
'';
|
|
};
|
|
|
|
packages.default = self.packages.${system}.documentation;
|
|
|
|
devShell = with pkgs; mkShell {
|
|
buildInputs = dependencies;
|
|
};
|
|
}
|
|
);
|
|
}
|