nixpkgs/pkgs/tools/security/knockknock/default.nix

34 lines
933 B
Nix
Raw Normal View History

2016-10-17 16:27:06 +02:00
{ stdenv, fetchFromGitHub, python2Packages, hping }:
2016-10-17 16:27:06 +02:00
python2Packages.buildPythonApplication rec {
rev = "bf14bbff";
name = "knockknock-r${rev}";
src = fetchFromGitHub {
inherit rev;
owner = "moxie0";
repo = "knockknock";
sha256 = "1chpfs3w2vkjrgay69pbdr116z1jldv53fi768a1i05fdqhy1px4";
};
2016-10-17 16:27:06 +02:00
propagatedBuildInputs = [ python2Packages.pycrypto ];
# No tests
doCheck = false;
patchPhase = ''
2015-11-11 13:42:33 +01:00
sed -i '/build\//d' setup.py
substituteInPlace setup.py --replace "/etc" "$out/etc"
substituteInPlace knockknock.py --replace 'existsInPath("hping3")' '"${hping}/bin/hping3"'
'';
meta = with stdenv.lib; {
description = "Simple, secure port knocking daemon and client written in Python";
homepage = "http://www.thoughtcrime.org/software/knockknock/";
license = licenses.gpl3;
maintainers = with maintainers; [ copumpkin ];
platforms = platforms.linux;
};
}