tijdelijk-te-laat/crude/flake.nix
Marty Sluijtman 3e27cb6b22 Some polish
2025-04-22 10:49:27 +02:00

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
];
};
}
);
}