summary refs log tree commit diff
path: root/doc/languages-frameworks/crystal.section.md
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2019-12-16 16:04:58 +0100
committerSimon Bruder <simon@sbruder.de>2021-10-30 16:30:33 +0200
commitc6064b7c4a3aa497be99feed4eb5922e1a32c86d (patch)
treee6710ff5066f41e6e8dc3161155d81973acfc207 /doc/languages-frameworks/crystal.section.md
parentffcff898a6b7e7875f506ed2f5127a9e57997c13 (diff)
downloadnixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.tar
nixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.tar.gz
nixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.tar.bz2
nixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.tar.lz
nixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.tar.xz
nixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.tar.zst
nixpkgs-c6064b7c4a3aa497be99feed4eb5922e1a32c86d.zip
doc/crystal: Update to mention shard.lock file generation
Diffstat (limited to 'doc/languages-frameworks/crystal.section.md')
-rw-r--r--doc/languages-frameworks/crystal.section.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/languages-frameworks/crystal.section.md b/doc/languages-frameworks/crystal.section.md
index cbe31f9f0b2..cbabba24f0c 100644
--- a/doc/languages-frameworks/crystal.section.md
+++ b/doc/languages-frameworks/crystal.section.md
@@ -4,12 +4,12 @@
 
 This section uses [Mint](https://github.com/mint-lang/mint) as an example for how to build a Crystal package.
 
-If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory, then run `crystal2nix` in it
-
+If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory. Executable projects should usually commit the `shard.lock` file, but sometimes that's not the case, which means you need to generate it yourself. With an existing `shard.lock` file, `crystal2nix` can be run.
 ```bash
 $ git clone https://github.com/mint-lang/mint
 $ cd mint
 $ git checkout 0.5.0
+$ if [ ! -f shard.lock ]; then nix-shell -p shards --run "shards lock"; fi
 $ nix-shell -p crystal2nix --run crystal2nix
 ```