nixpkgs/pkgs/by-name/sm/smbscan/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
1.0 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "smbscan";
version = "unstable-2022-05-26";
format = "other";
src = fetchFromGitHub {
owner = "jeffhacks";
repo = pname;
rev = "1b19d6040cab279b97bf002934bf6f8b34d6a8b4";
hash = "sha256-cL1mnyzIbHB/X4c7sZKVv295LNnjqwR8TZBMe9s/peg=";
};
propagatedBuildInputs = with python3.pkgs; [
impacket
python-slugify
];
installPhase = ''
runHook preInstall
install -vD smbscan.py $out/bin/smbscan
install -vd $out/${python3.sitePackages}/
cp {scan_internals,scan,setup,local_logging,arg_parser}.py $out/${python3.sitePackages}
install -vd $out/${python3.sitePackages}/wordlists/
cp wordlists/pattern* $out/${python3.sitePackages}/wordlists
runHook postInstall
'';
meta = with lib; {
description = "Tool to enumerate file shares";
homepage = "https://github.com/jeffhacks/smbscan";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ fab ];
mainProgram = "smbscan";
};
}