1
0
Fork 0

Add typst

main
Ethan Reece 2024-09-22 00:45:31 -05:00
parent 862bb132fa
commit 676c38f73d
Signed by: me
GPG Key ID: 198E9EB433DB1B28
6 changed files with 26 additions and 11 deletions

View File

@ -1,5 +1,6 @@
(add-to-load-path ".")
(define-module (template-package)
#:use-module (saayix packages typst)
#:use-module (guix)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
@ -19,8 +20,8 @@
#:select? vcs-file?))
(build-system gnu-build-system)
(native-inputs
`())
(synopsis "Guix template for projects")
(description "Guix template for projects")
(home-page "https://git.sudoer777.dev/me/guix-template")
`(typst))
(synopsis "Guix template for Typst projects")
(description "Guix template for Typst projects")
(home-page "https://git.sudoer777.dev/me/guix-typst-template")
(license license:expat)))

View File

@ -1,5 +1,8 @@
default:
guix time-machine --channels=./channels.scm.lock -- shell --container --emulate-fhs --manifest=./manifest.scm -- echo "Compile step..."
guix time-machine --channels=./channels.scm.lock -- shell --container --emulate-fhs --manifest=./manifest.scm -- typst compile ./src/document.typ ./out/document.pdf --font-path=/usr/share/fonts
fonts:
guix time-machine --channels=./channels.scm.lock -- shell --container --emulate-fhs --manifest=./manifest.scm -- typst fonts --font-path=/usr/share/fonts
dev:
guix time-machine --channels=./channels.scm.lock -- shell --manifest=./manifest.scm
@ -8,4 +11,4 @@ update:
guix time-machine --channels=./channels.scm -- describe --format=channels > ./channels.scm.lock
run: default
echo "Run step..."
xdg-open ./out/document.pdf

View File

@ -1,4 +1,4 @@
# Guix project template
# Guix Typst project template
1. Modify `./guix/modules/template-package.scm` (defines the project), `./channels.scm` (for project dependencies), and `./manifest.scm` (for development environment) to your requirements.
@ -6,4 +6,4 @@
1. Run `just update` to update the dependencies.
1. Run `just` to compile the program. Run `just run` to compile then run the program. Run `just dev` to open a shell environment with the program's dependencies.
1. Run `just` to generate the document. Run `just run` to generate then open the document. Run `just dev` to open a shell environment with the document's dependencies. Run `just fonts` to show the available fonts.

View File

@ -6,4 +6,13 @@
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
(channel
(name 'saayix)
(url "https://codeberg.org/look/saayix")
(branch "main")
(introduction
(make-channel-introduction
"12540f593092e9a177eb8a974a57bb4892327752"
(openpgp-fingerprint
"3FFA 7335 973E 0A49 47FC 0A8C 38D5 96BE 07D3 34AB")))))

View File

@ -1,5 +1,6 @@
(add-to-load-path ".guix/modules")
(use-modules (template-package)
(saayix packages typst)
(gnu packages fontutils))
(packages->manifest (list coreutils))
(packages->manifest (list typst coreutils))

1
src/document.typ 100644
View File

@ -0,0 +1 @@
This document is located in `src/document.typ`.