28 lines
621 B
Nix
28 lines
621 B
Nix
{
|
|
lib,
|
|
hasSystem,
|
|
system,
|
|
flakeInputs,
|
|
...
|
|
}:
|
|
with flakeInputs.root.lib.${system};
|
|
lib.optionalAttrs hasSystem {
|
|
# compile a typst project with custom packages
|
|
config.checks.localDep = compileTypst {
|
|
rootDir = ./main;
|
|
# a local unpackaged helper library; name is provided in this function
|
|
overridePackages.local = [
|
|
(mkTypstPackage {
|
|
name = "dep";
|
|
version = "1.0.0";
|
|
root = ./dep;
|
|
})
|
|
];
|
|
# a local package; name is derived from the package manifest
|
|
overridePackages.repo = [
|
|
(mkTypstPackage {
|
|
root = ./package;
|
|
})
|
|
];
|
|
};
|
|
}
|