You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running various example scripts from the impacket package at the command line, we are faced with the following error, this example is running the psexec.py script:
[nix-shell:~]$ psexec.pyTraceback (most recent call last): File "/nix/store/clcl35gymxwz3iywwh5fnkzd3mcnlcml-python3.11-impacket-0.11.0/bin/.psexec.py-wrapped", line 34, in <module> from impacket import version, smb File "/nix/store/clcl35gymxwz3iywwh5fnkzd3mcnlcml-python3.11-impacket-0.11.0/lib/python3.11/site-packages/impacket/version.py", line 10, in <module> import pkg_resourcesModuleNotFoundError: No module named 'pkg_resources'
When running psexec.py or other available scripts without arguments it should show us the help message.
Additional context
Some places of the impacket codebase uses the pkg_resources module of setuptools. As far as I understood, pkg_resources is used at runtime and in #281309 the setuptools dependence was moved to nativeBuildInputs leaving pkg_resources not acessible at runtime anymore. I have confirmed locally that adding setuptools back to propagatedBuildInputs fixes the error but I am not sure if this is the best approach.
Screenshots
No setuptools in the environment
Adding setuptools to the environment resolves the issue
Describe the bug
When running various example scripts from the
impacket
package at the command line, we are faced with the following error, this example is running thepsexec.py
script:Steps To Reproduce
Steps to reproduce the behavior:
impacket
package:nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz -p python3Packages.impacket
psexec.py
)Expected behavior
When running
psexec.py
or other available scripts without arguments it should show us the help message.Additional context
Some places of the
impacket
codebase uses thepkg_resources
module ofsetuptools
. As far as I understood,pkg_resources
is used at runtime and in #281309 thesetuptools
dependence was moved tonativeBuildInputs
leavingpkg_resources
not acessible at runtime anymore. I have confirmed locally that addingsetuptools
back topropagatedBuildInputs
fixes the error but I am not sure if this is the best approach.Screenshots
No
setuptools
in the environmentAdding
setuptools
to the environment resolves the issueNotify maintainers
@fabaff
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: