Some polish
This commit is contained in:
parent
2e47030987
commit
3e27cb6b22
4 changed files with 39 additions and 7 deletions
1
crude/.gitignore
vendored
1
crude/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
result
|
||||
.direnv
|
||||
.pdf
|
||||
|
|
|
@ -16,13 +16,41 @@
|
|||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
|
||||
packages = {
|
||||
default = throw "put derivation information here";
|
||||
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; [
|
||||
(throw "put packages here")
|
||||
tinymist
|
||||
typst
|
||||
fira
|
||||
orbitron
|
||||
];
|
||||
};
|
||||
|
||||
|
|
3
crude/src/main.typ
Normal file
3
crude/src/main.typ
Normal file
|
@ -0,0 +1,3 @@
|
|||
#import "template.typ": crude
|
||||
|
||||
#show: crude
|
|
@ -11,8 +11,6 @@
|
|||
},
|
||||
sigil: if sys.inputs.keys().contains("sigil") {
|
||||
sys.inputs.sigil
|
||||
} else {
|
||||
"sigil.svg"
|
||||
},
|
||||
font: (
|
||||
text: {
|
||||
|
@ -140,9 +138,11 @@
|
|||
)
|
||||
|
||||
|
||||
if sigil != none {
|
||||
figure(
|
||||
image(sigil, width: 100%),
|
||||
)
|
||||
}
|
||||
|
||||
align(center)[
|
||||
#set text(font: font.decoration, 36pt, weight: "black")
|
Loading…
Add table
Add a link
Reference in a new issue