Skip to content

Commit

Permalink
Update shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
jjdishere committed Jun 9, 2024
1 parent dd04baf commit 5a31a07
Showing 1 changed file with 32 additions and 38 deletions.
70 changes: 32 additions & 38 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
{ pkgs, ... }:
let
pythonPackages = pkgs.python39Packages;
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-small dvisvgm
amsmath hyperref comment;
});
in pkgs.mkShell {
name = "python-venv";
venvDir = "./.venv";

packages = with pkgs; [ tex graphviz pdf2svg elan gnumake ];

buildInputs = [
# A Python interpreter including the 'venv' module is required to bootstrap
# the environment.
pythonPackages.python

# This executes some shell code to initialize a venv in $venvDir before
# dropping into the shell
pythonPackages.venvShellHook

];

# Run this command, only after creating the virtual environment
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
pip install -r requirements.txt
'';

# Now we can execute any commands within the virtual environment.
# This is optional and can be left out to run pip manually.
postShellHook = ''
# allow pip to install wheels
unset SOURCE_DATE_EPOCH
'';
}
{ pkgs, ... }:
let pythonPackages = pkgs.python39Packages;
in pkgs.mkShell {
name = "python-venv";
venvDir = "./.venv";

packages = with pkgs; [ texliveFull graphviz pdf2svg elan gnumake ];

buildInputs = [
# A Python interpreter including the 'venv' module is required to bootstrap
# the environment.
pythonPackages.python

# This executes some shell code to initialize a venv in $venvDir before
# dropping into the shell
pythonPackages.venvShellHook

];

# Run this command, only after creating the virtual environment
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
pip install -r requirements.txt
'';

# Now we can execute any commands within the virtual environment.
# This is optional and can be left out to run pip manually.
postShellHook = ''
# allow pip to install wheels
unset SOURCE_DATE_EPOCH
'';
}

0 comments on commit 5a31a07

Please sign in to comment.