Skip to content

Commit 1ff3dfd

Browse files
committed
Update docs
Signed-off-by: Rolf Schröder <rolf.schr@gmail.com>
1 parent 39430e7 commit 1ff3dfd

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,15 @@ You can install VulnerableCode with `Nix <https://nixos.org/download.html>`__ (`
139139

140140
::
141141

142+
cd etc/nix
142143
nix --print-build-logs flake check # build & run tests
143144

144145
There are several options to use the Nix version
145146

146147
::
147148

148149
# Enter an interactive environment with all dependencies setup.
150+
cd etc/nix
149151
nix develop
150152
> ./manage.py ... # invoke the local checkout
151153
> vulnerablecode-manage.py ... # invoke manage.py as installed in the nix store
@@ -159,16 +161,15 @@ There are several options to use the Nix version
159161
**Keeping the Nix setup in sync**
160162

161163
The Nix installation uses `poetry2nix <https://github.com/nix-community/poetry2nix>`__ to handle Python dependencies because some dependencies are currently not available as Nix packages.
162-
The file ``./poetry-conversion.patch`` allows to convert VulnerableCode into a `Poetry <https://python-poetry.org/>`__ project.
163-
This is done on the fly during the Nix installation.
164-
The patch file itself is created by ``./make-poetry-conversion-patch.sh``.
165-
It needs to be recreated whenever ``./requirements.txt`` changes (this is not done automatically).
166-
The ``expectedRequirementstxtMd5sum`` in ``flake.nix`` also needs to be updated in that case.
164+
The are some ``*.generated`` files in ``etc/nix`` that are created/updated using ``etc/nix/generate-poetry-files.sh``.
165+
These files need to be recreated whenever ``./requirements.txt`` changes.
166+
The ``expectedRequirementstxtMd5sum`` in ``etc/nix/flake.nix`` also needs to be updated in that case.
167+
The Nix installation uses the files to convert VulnerableCode into a `Poetry <https://python-poetry.org/>`__ project on the fly.
167168

168169
::
169170

170171
# Update poetry-conversion.patch.
171-
nix-shell -p poetry --run ./make-poetry-conversion-patch.sh
172+
etc/nix/generate-poetry-files.sh
172173
# Get new hash. See flake.nix.
173174
md5sum requirements.txt
174175

0 commit comments

Comments
 (0)