4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{ fetchFromGitHub
|
|
, freerdp
|
|
, nmap
|
|
, openvpn
|
|
, python3Packages
|
|
, lib, stdenv
|
|
, tigervnc
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "crowbar";
|
|
version = "unstable-2020-04-23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "galkan";
|
|
repo = pname;
|
|
rev = "500d633ff5ddfcbc70eb6d0b4d2181e5b8d3c535";
|
|
sha256 = "05m9vywr9976pc7il0ak8nl26mklzxlcqx0p8rlfyx1q766myqzf";
|
|
};
|
|
|
|
propagatedBuildInputs = [ python3Packages.paramiko ];
|
|
|
|
patchPhase = ''
|
|
sed -i 's,/usr/bin/xfreerdp,${freerdp}/bin/xfreerdp,g' lib/main.py
|
|
sed -i 's,/usr/bin/vncviewer,${tigervnc}/bin/vncviewer,g' lib/main.py
|
|
sed -i 's,/usr/sbin/openvpn,${openvpn}/bin/openvpn,g' lib/main.py
|
|
|
|
sed -i 's,/usr/bin/nmap,${nmap}/bin/nmap,g' lib/nmap.py
|
|
'';
|
|
|
|
# Sanity check
|
|
checkPhase = ''
|
|
$out/bin/crowbar --help > /dev/null
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/galkan/crowbar";
|
|
description = "A brute forcing tool that can be used during penetration tests";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ pamplemousse ];
|
|
};
|
|
}
|