Last active
July 18, 2023 22:06
-
-
Save geekodour/683be9808893e86091e224c9cc7d9f28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# ''; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
https://stackoverflow.com/questions/24263774/post-install-script-after-installing-a-wheel