commit e350dae709f81da492176de9750b97e72ac2e855 Author: Ethan Reece Date: Sun Sep 22 00:12:18 2024 -0500 Copy template files diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..abf1255 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.eps +*.go +*.log +*.mo +*.pdf +*.png +*.tar.xz +*.tmp +*~ +.#* +\#*\# +,* +.DS_Store +out diff --git a/.guix-channel b/.guix-channel new file mode 100644 index 0000000..9ef7a67 --- /dev/null +++ b/.guix-channel @@ -0,0 +1,3 @@ +(channel + (version 0) + (directory ".guix/modules")) \ No newline at end of file diff --git a/.guix/modules/template-package.scm b/.guix/modules/template-package.scm new file mode 100644 index 0000000..afae328 --- /dev/null +++ b/.guix/modules/template-package.scm @@ -0,0 +1,26 @@ +(add-to-load-path ".") +(define-module (template-package) + #:use-module (guix) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix git-download)) + +(define vcs-file? + ;; Return true if the given file is under version control. + (or (git-predicate (current-source-directory)) + (const #t))) + +(define-public template + (package + (name "template") + (version "0.1-git") + (source (local-file "../.." "template-checkout" + #:recursive? #t + #: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") + (license license:expat))) diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..2a93737 --- /dev/null +++ b/Justfile @@ -0,0 +1,11 @@ +default: + guix time-machine --channels=./channels.scm.lock -- shell --container --emulate-fhs --manifest=./manifest.scm -- echo "Compile step..." + +dev: + guix time-machine --channels=./channels.scm.lock -- shell --manifest=./manifest.scm + +update: + guix time-machine --channels=./channels.scm -- describe --format=channels > ./channels.scm.lock + +run: default + echo "Run step..." diff --git a/README.md b/README.md new file mode 100644 index 0000000..ce2053f --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Guix 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. Install `just` by adding to your Guix Home configuration or running `guix install just`. + +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. diff --git a/channels.scm b/channels.scm new file mode 100644 index 0000000..9e31cd0 --- /dev/null +++ b/channels.scm @@ -0,0 +1,9 @@ +(list (channel + (name 'guix) + (url "https://git.savannah.gnu.org/git/guix.git") + (branch "master") + (introduction + (make-channel-introduction + "9edb3f66fd807b096b48283debdcddccfea34bad" + (openpgp-fingerprint + "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) diff --git a/manifest.scm b/manifest.scm new file mode 100644 index 0000000..c7830b2 --- /dev/null +++ b/manifest.scm @@ -0,0 +1,5 @@ +(add-to-load-path ".guix/modules") +(use-modules (template-package) + (gnu packages fontutils)) + +(packages->manifest (list coreutils))