Skip to content

Commit

Permalink
nix/devshell.nix: append "." to PYTHONPATH
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Klink <[email protected]>
  • Loading branch information
flokli committed Nov 15, 2023
1 parent 254e294 commit 6111605
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nix/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
python # that python with all sbomnix [dev-]dependencies
vulnix
]);

# Add the repo root to PYTHONPATH, so invoking entrypoints (and them being
# able to find the python packages in the repo) becomes possible.
# `pytest.ini` already sets this for invoking `pytest`
# (cascading down to the processes it spawns), but this is for the developer
# invoking entrypoints from inside the devshell.
shellHook = ''
export PYTHONPATH="$PYTHONPATH:$(pwd)"
'';
};
};
}

0 comments on commit 6111605

Please sign in to comment.