From b62617260061bf6b86281fec32a616af3fe2cf25 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Sun, 13 Dec 2020 00:48:57 -0500 Subject: [PATCH] add weevely --- pkgs/weevely/default.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pkgs/weevely/default.nix diff --git a/pkgs/weevely/default.nix b/pkgs/weevely/default.nix new file mode 100644 index 0000000..2078c11 --- /dev/null +++ b/pkgs/weevely/default.nix @@ -0,0 +1,31 @@ +{ stdenv, python3, fetchFromGitHub, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "weevely"; + version = "4.0.1"; + + src = fetchFromGitHub { + owner = "epinna"; + repo = "weevely3"; + rev = "v${version}"; + sha256 = "0sgjf7ihgipb33k73d84dcx7snv2fvbzyd0f4468k1w5w6zqm9xj"; + }; + + pythonWithPkgs = python3.withPackages (ps: with ps; [ + Mako + prettytable + pyopenssl + pysocks + python-dateutil + pyyaml + ]); + + buildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin $out/share/man/man1 + ln -s ${src}/weevely.1 $out/share/man/man1/ + makeWrapper ${pythonWithPkgs}/bin/python $out/bin/weevely \ + --add-flags ${src}/weevely.py + ''; +}