mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 15:56:50 +01:00
30 lines
891 B
Nix
30 lines
891 B
Nix
{ stdenv, fetchFromGitHub, buildPythonPackage, python, pycrypto, hping }:
|
|
|
|
buildPythonPackage rec {
|
|
rev = "bf14bbff";
|
|
name = "knockknock-r${rev}";
|
|
|
|
src = fetchFromGitHub {
|
|
inherit rev;
|
|
owner = "moxie0";
|
|
repo = "knockknock";
|
|
sha256 = "1chpfs3w2vkjrgay69pbdr116z1jldv53fi768a1i05fdqhy1px4";
|
|
};
|
|
|
|
propagatedBuildInputs = [ pycrypto ];
|
|
|
|
patchPhase = ''
|
|
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 = with platforms; linux;
|
|
};
|
|
}
|
|
|