Add a nix-shell environment suitable for building
This enables easy execution of scripts/*.py by Nix users. Signed-off-by: Benjamin Saunders <ben.e.saunders@gmail.com>
This commit is contained in:
parent
2fa7aac3be
commit
33d80408e0
2 changed files with 11 additions and 0 deletions
|
@ -6,6 +6,10 @@ Requirements:
|
||||||
- Jinja2 (for templating)
|
- Jinja2 (for templating)
|
||||||
- PyYAML (for reading YAML files)
|
- PyYAML (for reading YAML files)
|
||||||
|
|
||||||
|
Nix[2] users can enter an environment with the appropriate tools and
|
||||||
|
dependencies available by invoking `nix-shell contrib/shell.nix` in this
|
||||||
|
directory.
|
||||||
|
|
||||||
To generate the complete specification along with supporting documentation, run:
|
To generate the complete specification along with supporting documentation, run:
|
||||||
python gendoc.py
|
python gendoc.py
|
||||||
|
|
||||||
|
@ -38,3 +42,4 @@ To make use of the generated file, there are a number of options:
|
||||||
* View the UI via your browser at http://\<hostname>?url=api-docs.json
|
* View the UI via your browser at http://\<hostname>?url=api-docs.json
|
||||||
|
|
||||||
[1] http://swagger.io/
|
[1] http://swagger.io/
|
||||||
|
[2] https://nixos.org/nix/
|
||||||
|
|
6
scripts/contrib/shell.nix
Normal file
6
scripts/contrib/shell.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
(python.buildEnv.override {
|
||||||
|
extraLibs = with pythonPackages;
|
||||||
|
[ docutils pyyaml jinja2 pygments ];
|
||||||
|
}).env
|
Loading…
Add table
Add a link
Reference in a new issue