Skip to content

Instantly share code, notes, and snippets.

@geekodour
Last active July 18, 2023 22:06
Show Gist options
  • Save geekodour/683be9808893e86091e224c9cc7d9f28 to your computer and use it in GitHub Desktop.
Save geekodour/683be9808893e86091e224c9cc7d9f28 to your computer and use it in GitHub Desktop.
let
pkgs = import <nixpkgs> {};
pyPackages = pkgs.python310Packages;
fhs = pkgs.buildFHSUserEnv {
name = "normalfsshell";
runScript = "bash";
};
in
pkgs.mkShell {
name = "py";
venvDir = "./.venv";
nativeBuildInputs = [ fhs ];
buildInputs = with pyPackages; [ pip venvShellHook ];
postShellHook = ''
# allow pip to install wheels
unset SOURCE_DATE_EPOCH
normalfsshell
'';
}
let
pkgs = import <nixpkgs> {};
pyPackages = pkgs.python310Packages;
in
pkgs.mkShell {
name = "zuckpy";
venvDir = "./.venv";
buildInputs = with pyPackages; [ pip venvShellHook ];
# 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
'';
# shellHook = ''
# source .venv/bin/activate
# '';
}
let
pkgs = import <nixpkgs> {};
pyPackages = pkgs.python310Packages;
fhs = pkgs.buildFHSUserEnv {
name = "pyshell";
targetPkgs = pkgs: [ pkgs.glibc ];
runScript = "bash";
};
in
pkgs.mkShell {
name = "zuckpy";
venvDir = "./.venv";
nativeBuildInputs = [ fhs ];
# packages = [ fhs ];
buildInputs = with pyPackages; [ pip venvShellHook ] ++ [ ];
# 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
pyshell
'';
}
# (pkgs.buildFHSUserEnv {
# name = "pyshell";
# targetPkgs = pkgs: [ pkgs.glibc pyPackages.pip pyPackages.venvShellHook ];
# runScript = "bash";
# # targetPkgs = pkgs: [ pkgs.glibc ];
# }).env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment