Skip to content

REGRESSION: Package request: nmap_graphical #287288

@kennystrawnmusic

Description

@kennystrawnmusic

Project description

The nmap_graphical package (which installs zenmap, the official graphical frontend to nmap) was previously removed from nixpkgs due to it still depending on Python 2 back in 2020, however, Python 3 support has since been added as of 2024 and I've managed to get it working properly using overrideAttrs with the following changes to my /etc/nixos/configuration.nix file:

...
environment.systemPackages = with pkgs; [
  ...
  (nmap.overrideAttrs(old: rec {
    nativeBuildInputs = old.nativeBuildInputs ++ [
      gobject-introspection
      (python3.withPackages(pypkgs: [
        pypkgs.pygobject3
      ]))
      wrapGAppsHook
    ];

    buildInputs = old.buildInputs ++ [ gtk3 ];

    configureFlags = lib.remove "--without-zenmap" (lib.flatten old.configureFlags);

    installPhase = ''
      cd zenmap
      python setup.py install --prefix=$out
      sed -i "58a sys.path.append(\"$out/lib/python${python3.sourceVersion.major}.${python3.sourceVersion.minor}/site-packages/\")" $out/bin/zenmap
    '';
  }))
  ...
];

Although this hacky solution does work for getting Zenmap to work properly for those who are looking for a workaround to this issue, it would be helpful for other users who may not know what they're doing to either document this on a wiki page or, better yet, reintroduce the package that was removed while incorporating these overrides into the reintroduction.

Metadata


Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions