File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7878 inherit version ;
7979 name = "vulnerablecode-${ version } " ;
8080 src = vulnerablecode-src ;
81- dontConfigure = true ; # do not use ./configure
81+ dontBuild = true ; # do not use Makefile
8282 propagatedBuildInputs = [ pythonEnv postgresql gitMinimal ] ;
8383
8484 postPatch = ''
85- # Make sure the pycodestyle binary in $PATH is used .
86- substituteInPlace vulnerabilities/tests/test_basics .py \
87- --replace 'join(bin_dir, "pycodestyle") ' '"pycodestyle "'
85+ # Do not use absolute path .
86+ substituteInPlace vulnerablecode/settings .py \
87+ --replace 'STATIC_ROOT = "/var/vulnerablecode/static" ' 'STATIC_ROOT = "./static "'
8888 '' ;
8989
9090 installPhase = ''
138138 buildPhase = ''
139139 source ${ libSh }
140140 initPostgres $(pwd)
141+ export SECRET_KEY=REALLY_SECRET
142+ ${ vulnerablecode } /manage.py collectstatic
141143 ${ vulnerablecode } /manage.py migrate
142144 '' ;
143145
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1010DEFAULT_INSTALL_DIR=$VULNERABLECODE_INSTALL_DIR # in the Nix store, see flake.nix
1111INSTALL_DIR=${INSTALL_DIR:- $DEFAULT_INSTALL_DIR }
1212ARGS=$( if [ $# -eq 0 ]; then echo " --all" ; else echo " $@ " ; fi)
13+ export SECRET_KEY=REALLY_SECRET
1314TEMPDIR=$( mktemp -d -p " $THIS_DIR " )
1415export TEMPDIR
1516
@@ -25,4 +26,5 @@ trap cleanup EXIT
2526initPostgres " $TEMPDIR "
2627
2728" $INSTALL_DIR /manage.py" migrate
29+ " $INSTALL_DIR /manage.py" collectstatic
2830" $INSTALL_DIR /manage.py" import $ARGS
You can’t perform that action at this time.
0 commit comments