generated from me/guix-template
Add typst
parent
862bb132fa
commit
676c38f73d
|
@ -1,5 +1,6 @@
|
||||||
(add-to-load-path ".")
|
(add-to-load-path ".")
|
||||||
(define-module (template-package)
|
(define-module (template-package)
|
||||||
|
#:use-module (saayix packages typst)
|
||||||
#:use-module (guix)
|
#:use-module (guix)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
@ -19,8 +20,8 @@
|
||||||
#:select? vcs-file?))
|
#:select? vcs-file?))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`())
|
`(typst))
|
||||||
(synopsis "Guix template for projects")
|
(synopsis "Guix template for Typst projects")
|
||||||
(description "Guix template for projects")
|
(description "Guix template for Typst projects")
|
||||||
(home-page "https://git.sudoer777.dev/me/guix-template")
|
(home-page "https://git.sudoer777.dev/me/guix-typst-template")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
7
Justfile
7
Justfile
|
@ -1,5 +1,8 @@
|
||||||
default:
|
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:
|
dev:
|
||||||
guix time-machine --channels=./channels.scm.lock -- shell --manifest=./manifest.scm
|
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
|
guix time-machine --channels=./channels.scm -- describe --format=channels > ./channels.scm.lock
|
||||||
|
|
||||||
run: default
|
run: default
|
||||||
echo "Run step..."
|
xdg-open ./out/document.pdf
|
||||||
|
|
|
@ -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.
|
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 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.
|
||||||
|
|
11
channels.scm
11
channels.scm
|
@ -6,4 +6,13 @@
|
||||||
(make-channel-introduction
|
(make-channel-introduction
|
||||||
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
||||||
(openpgp-fingerprint
|
(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")))))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(add-to-load-path ".guix/modules")
|
(add-to-load-path ".guix/modules")
|
||||||
(use-modules (template-package)
|
(use-modules (template-package)
|
||||||
|
(saayix packages typst)
|
||||||
(gnu packages fontutils))
|
(gnu packages fontutils))
|
||||||
|
|
||||||
(packages->manifest (list coreutils))
|
(packages->manifest (list typst coreutils))
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
This document is located in `src/document.typ`.
|
Loading…
Reference in New Issue