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 |
readelf -d
libtree -p
patchelf --print-needed
readelf -l (for dynmaic interepreter)
https://discourse.nixos.org/t/runtime-alternative-to-patchelf-set-interpreter/3539/14
# pkgs.autoPatchelfHook
# pkgs.autoreconfHook
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath /nix/store/dg8mpqqykmw9c7l0bgzzb5znkymlbfjw-glibc-2.37-8/lib <path_to_exec>