Compare commits

...

2 Commits

Author SHA1 Message Date
Collin J. Doering 5c2f33456e
README.org: Write build and clean sections in development guide 2021-12-07 21:17:32 -05:00
Collin J. Doering 46d25cd912
Remove top-level manifest.scm as package in guix.scm is sufficient
* manifest.scm: Removed in favor of guix.scm and the blog-rekahsoft-ca package definition within it

* guix.scm: Add environment variable PS1 that was formally set by manifest.scm

* README.org (Start Development Environment): Update guix commands used now that there is no top-level manifest.scm
2021-12-07 21:17:29 -05:00
3 changed files with 19 additions and 46 deletions

View File

@ -62,12 +62,11 @@ The development environment is defined by the following files:
- [[./channels.scm][channels.scm]] :: Specifically defines a set of available software, their versions and their build recipe.
- [[./guix.scm][guix.scm]] :: Defines the package for this site, ~blog-rekahsoft-ca~.
- [[./manifest.scm][manifest.scm]] :: Defines packages required for development of this site.
To start a development environment, run the following:
#+begin_src sh
guix time-machine -C channels.scm -- shell -CN -E '^LANG$' -E '^TERM$' -E '^PS1$' -Df guix.scm -m manifest.scm
guix time-machine -C channels.scm -- shell -CN -E '^LANG$' -E '^TERM$' -E '^PS1$' -f guix.scm -Df guix.scm
#+end_src
This uses the [[info:guix#Invoking guix time-machine][guix time-machine]] feature to ensure the development environment is reproducible
@ -76,10 +75,9 @@ shell]] command is used within the time-machine to start a development environme
container (~-C~), which shares the hosts network namespace (~-N~). The environment variable
~LANG~ is passed into the container to ensure locales work as expected; without this, site
building will fail! Additionally, the environment variable ~TERM~ is passed into the
container to ensure the development shell behaves correctly. Finally, ~-Df guix.scm~
indicates that development dependencies of the ~blog-rekahsoft-ca~ package should be included
in the environment and ~-m manifest.scm~ ensures that extra tools for development are
included as well.
container to ensure the development shell behaves correctly. Finally, ~-f guix.scm~ loads the
~blog-rekahsoft-ca~ package, and ~-Df guix.scm~ indicates that development dependencies of
the ~blog-rekahsoft-ca~ package should be included in the environment.
*** Deployment Development Environment
@ -105,17 +103,29 @@ To start a deployment development environment, run the following:
*** Composing Site Development and Deployment Environments
#+begin_src sh
guix time-machine -C channels.scm -- shell -CN -E '^LANG$' -E '^TERM$' -E '^PS1$' -E '^AWS.*$' -Df guix.scm -m manifest.scm -m infra/manifest.scm
guix time-machine -C channels.scm -- shell -CN -E '^LANG$' -E '^TERM$' -E '^PS1$' -E '^AWS.*$' -f guix.scm -Df guix.scm -m infra/manifest.scm
#+end_src
** Build Site
This website is built from a collection of markdown files and templates that are processed by
pandoc and are stitched together using Hakyll. To build the html/css/jss and all other assets
required to deploy and distribute the site, the hakyll derived site-builder,
~blog-rekahsoft-ca~ must be invoked. Under usual conditions it is not invoked directly, but
instead via the ~site~ wrapper script. For example, this is how within a development
environment the site can be built.
#+begin_src sh
site build
#+end_src
** Clean Site
[[*Build Site][Building the site]] has the side effect of writing a couple files/directories to disk as a
result of the build process. In some cases, its useful to start of with a clean slate and
remove any files that were generated for the site. To so so, the ~clean~ sub-command can be
used:
#+begin_src sh
site clean
#+end_src

View File

@ -27,6 +27,8 @@
(rekahsoft-gnu packages haskell-web)
(git))
(setenv "PS1" "\\W [env]\\$ ")
(define %srcdir
(dirname (current-filename)))

View File

@ -1,39 +0,0 @@
;; (C) Copyright Collin J. Doering 2021
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; File: manifest.scm
;; Author: Collin J. Doering <collin.doering@rekahsoft.ca>
;; Date: Nov 21, 2021
(use-modules
(gnu packages)
(guix packages)
(guix profiles)
(guix transformations))
(load "guix.scm")
(setenv "PS1" "\\W [env]\\$ ")
(define dev-transform
(options->transformation
`((with-source . ,(string-append "blog-rekahsoft-ca=" (getcwd))))))
(concatenate-manifests
(list
(packages->manifest
`(,(dev-transform %blog-rekahsoft-ca)))
(specifications->manifest
`("coreutils"))))