From 33d80408e0e3829c5683dba3c26bcb7770d74f5d Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Fri, 26 Aug 2016 23:14:39 -0700 Subject: [PATCH] Add a nix-shell environment suitable for building This enables easy execution of scripts/*.py by Nix users. Signed-off-by: Benjamin Saunders --- scripts/README.md | 5 +++++ scripts/contrib/shell.nix | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 scripts/contrib/shell.nix diff --git a/scripts/README.md b/scripts/README.md index d0496bb3..5178d5b7 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -6,6 +6,10 @@ Requirements: - Jinja2 (for templating) - 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: 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://\?url=api-docs.json [1] http://swagger.io/ +[2] https://nixos.org/nix/ diff --git a/scripts/contrib/shell.nix b/scripts/contrib/shell.nix new file mode 100644 index 00000000..7bdcdffa --- /dev/null +++ b/scripts/contrib/shell.nix @@ -0,0 +1,6 @@ +with import {}; + +(python.buildEnv.override { + extraLibs = with pythonPackages; + [ docutils pyyaml jinja2 pygments ]; +}).env