Fix several problems with the nix setup. - #546
Conversation
| postPatch = '' | ||
| # Make sure the pycodestyle binary in $PATH is used. | ||
| substituteInPlace vulnerabilities/tests/test_basics.py \ | ||
| --replace 'join(bin_dir, "pycodestyle")' '"pycodestyle"' |
There was a problem hiding this comment.
pycodestyle is not used anymore.
| name = "vulnerablecode-${version}"; | ||
| src = vulnerablecode-src; | ||
| dontConfigure = true; # do not use ./configure | ||
| dontBuild = true; # do not use Makefile |
There was a problem hiding this comment.
configure doesn't exist anymore, Makefile was added.
| buildPhase = '' | ||
| source ${libSh} | ||
| initPostgres $(pwd) | ||
| export SECRET_KEY=REALLY_SECRET |
There was a problem hiding this comment.
ce64bce removed the DJANGO_DEV=1 setting, I would guess without testing it: Setting neither DJANGO_DEV=1 nor the SECRET_KEY results in an error.
There was a problem hiding this comment.
Yes, DJANGO_DEV is not present now. Please use make envfile. A basic make based run is at https://github.com/nexB/vulnerablecode/blob/main/.github/workflows/main.yml
There was a problem hiding this comment.
@Hritik14 Thanks, if I understand you correctly, you suggest to run make dev envfile (https://github.com/nexB/vulnerablecode/blob/main/.github/workflows/main.yml#L24). The dev target makes no sense since the Nix setup doesn't run pip -r requirements on purpose. As for the envfile target, it creates the file but uses the non-deterministic urandom source, which is not feasible in Nix. I'm not convinced it is better to use make than to simply set the env var as I proposed here.
|
@rolfschr is this good to merge ? |
|
Yes, I think so. |
|
@rolfschr Could you rebase please ? |
Signed-off-by: Rolf Schröder <rolf.schr@gmail.com>
Signed-off-by: Rolf Schröder <rolf.schr@gmail.com>
4fa55ef to
10c7a45
Compare
|
): now tests fail |
Signed-off-by: Rolf Schröder <rolf.schr@gmail.com>
This PR fixes several issues with the Nix setup. Note that the GitHub actions still doesn't run. I don't know what exactly the problem is but have reported it upstream (DavHau/mach-nix#318).
Signed-off-by: Rolf Schröder rolf.schr@gmail.com