nixpkgs-suyu/pkgs/tools/security/nmap/zenmap.patch
Sergey Mironov ea82f6d0e9 nmap: help zenmap to find it's templates in nix-store
Zenamp wrapper confuses python so it thinks that zenmap is launched as a script
and not as an executable. This leads to incorrect /share path and missing
templates. ./zenmap.patch cures that (a bit hacky as usual).
2013-06-06 12:09:19 +04:00

15 lines
719 B
Diff

diff -ruN nmap-5.50.orig/zenmap/zenmapCore/Paths.py nmap-5.50/zenmap/zenmapCore/Paths.py
--- nmap-5.50.orig/zenmap/zenmapCore/Paths.py 2013-06-06 05:52:10.723087428 +0000
+++ nmap-5.50/zenmap/zenmapCore/Paths.py 2013-06-06 07:07:25.481261761 +0000
@@ -115,7 +115,10 @@
else:
# Normal script execution. Look in the current directory to allow
# running from the distribution.
- return os.path.abspath(os.path.dirname(fs_dec(sys.argv[0])))
+ #
+ # Grrwlf: No,no,dear. That's not a script, thats Nixos wrapper. Go add
+ # those '..' to substract /bin part.
+ return os.path.abspath(os.path.join(os.path.dirname(fs_dec(sys.argv[0])), ".."))
prefix = get_prefix()