59 lines
1.3 KiB
Nix
59 lines
1.3 KiB
Nix
{
|
|
description = "Extremely basic flake";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
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.stdenvNoCC.mkDerivation {
|
|
pname = "test";
|
|
version = "0.1";
|
|
src = ./src;
|
|
nativeBuildInputs = with pkgs; [
|
|
tinymist
|
|
typst
|
|
fira
|
|
orbitron
|
|
];
|
|
|
|
buildPhase = ''
|
|
typst compile main.typ \
|
|
--font-path="${pkgs.orbitron}/share/fonts:${pkgs.fira}/share/fonts" \
|
|
--input nixPath=$out \
|
|
--input author=Bob \
|
|
--input title=fiets \
|
|
"''${pname}.pdf"
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp *.pdf $out/
|
|
'';
|
|
};
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
tinymist
|
|
typst
|
|
fira
|
|
orbitron
|
|
];
|
|
};
|
|
|
|
}
|
|
);
|
|
}
|