* tutorial: Propagate previous geocode changes
Propagate the changes made in a previous code snippet to this code
snippet. Primarily fixing the poorly referenced ``${geocode``.
* tutorial: Fix requestParams for path.nix
Adjust the functionality to reference geocode correctly and
also to make sure of the correct escaping formats.
Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
The current code has a number of issues.
1. realising the code results in:
``
markers=$(geocode 'New York') size=640x640 scale=2 zoom=7 ...
^-------------------^ SC2046 (warning): Quote this to prevent
word splitting.
``
2.
``
$(geocode ${lib.escapeShellArg marker.location})"
``
Assumes that geocode has been added to the PATH so replace with
``
${config.scripts.geocode}/bin/geocode
``
as per previous examples.
3.
``
in "markers=${ lib.concatStringsSep "\\|" attributes}";
in builtins.map paramForMarker config.map.markers;
``
The ordering of this actually creates multiple ``[markers =]``
parameters and does not use the concatenation string to join the
attributes together (in effect there is only 1 attribute per call) to
map, and 1 new ``marker`` created.
Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
* tutorials: fix passing paramaters to geocode
When running the package as-is the following error occurs
``geocode: line 7: $1: unbound``
This is caused because ``scripts.geocode`` does not pass the parameters
down to the wrapped script ``geocode``.
Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
* Draft module system introduction tutorial
* add intro/conclusion, rework prose, follow styleguide, clean diffs
* Review pass
* Apply suggestions from code review
* fix whitespace
* add some more motivation the each section
* make scripts downloadable
* address review comments
* make script actually work
...hopefully. can't test it without Google API key
* add file watching
yes, this looks scary, and yes, it works.
* update diff and wording
* more notes on potential pitfalls
* be explicit which `map` we mean
* split nullable from default values
* also wrap the geocode script
* work through the tutorial to the end
* add tutorial overview
* `lib` is always passed
* add separate section for `evalModules` and fix link
* make option strucutre more self-explanatory
* explain command line invocations
* add note on incomplete reference documentation
* add more highlight to the `config` distinction
* fix parameter passing to the `./map` script
* fix typo
* fix wording
* link to summer of nix
* add missing word
* link to Google Maps API docs
* more explicit requirement
* use correct module system terminology
* Update source/tutorials/module-system/module-system.md
* Apply suggestions from code review
* whitespace
* module-system.md: replace comments with captions
* add missing lang for code-block
* Update module system title
* change most headers to be about module features (#797)
* change most headers to be about module features
Some headers could not be made about module features, and that's a
strong signal that those sections should be removed.
* Apply suggestions from code review
* module-system.md: Fix header casing
Co-authored-by: Alexander Groleau <source@proof.construction>
Co-authored-by: asymmetric <lorenzo@mailbox.org>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>