···111111 pkg-config
112112 ];
113113114114+ strictDeps = true;
115115+114116 # Some grammar files needed to be copied too from some dependencies. I suppose
115117 # if one define a dependency in such a way that its share directory is found,
116118 # then this copying would be unnecessary. Instead of actually copying these
···135135 '';
136136 license = licenses.mit;
137137 maintainers = with maintainers; [ Profpatsch ];
138138- # Aarch has test failures with how tree-sitter compiles the generated C files
139139- broken = stdenv.isAarch64;
140138 };
141139}
···11-{ lib, stdenv, fetchFromGitLab, python, pkg-config
11+{ lib, stdenv, fetchFromGitLab, python3, pkg-config
22, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_412 }:
3344stdenv.mkDerivation {
···1515 nativeBuildInputs = [ pkg-config xmlto docbook2x docbook_xsl docbook_xml_dtd_412 ];
16161717 buildInputs = [
1818- python
1818+ python3
1919 # Needed for proxy support I believe, which I haven't tested.
2020 # Probably needs to be propagated and some wrapPython magic
2121 # python.pkgs.pysocks
2222 ];
2323+2424+ strictDeps = true;
23252426 postPatch = ''
2527 substituteInPlace Makefile \
-100
pkgs/servers/kippo/default.nix
···11-# This is the installation portion of kippo.
22-# This is somewhat jumbled together. There is no "easy_install" for kippo,
33-# and there isn't a way to regenerate the twistd plugin cache.
44-#
55-# Use the services.kippo options to properly configure if on NixOS.
66-# On other platforms there is a problem with hardcoded paths.
77-# Your best bet is to change kippo source to customise
88-# or manually copy the proper filesystems.
99-# At a minimum the following are required in /var/lib/kippo:
1010-# honeyfs/
1111-# fs.pickle
1212-# data/
1313-# txtcmds/
1414-#
1515-# There is also benefit in preparing /var/log/kippo
1616-# tty/
1717-# dl/
1818-#
1919-# Most of these files need read/write permissions.
2020-#
2121-# Read only files: kippo.tac and kippo.cfg
2222-#
2323-# Execution may look like this:
2424-# twistd -y kippo.tac --syslog --pidfile=kippo.pid
2525-#
2626-# Use this package at your own risk.
2727-2828-{lib, stdenv, fetchurl, pythonPackages }:
2929-3030-let
3131-3232- twisted_13 = pythonPackages.buildPythonPackage rec {
3333- # NOTE: When updating please check if new versions still cause issues
3434- # to packages like carbon (http://stackoverflow.com/questions/19894708/cant-start-carbon-12-04-python-error-importerror-cannot-import-name-daem)
3535- disabled = pythonPackages.isPy3k;
3636-3737- name = "Twisted-13.2.0";
3838- src = fetchurl {
3939- url = "mirror://pypi/T/Twisted/${name}.tar.bz2";
4040- sha256 = "1wrcqv5lvgwk2aq83qb2s2ng2vx14hbjjk2gc30cg6h1iiipal89";
4141- };
4242-4343- propagatedBuildInputs = with pythonPackages; [ zope_interface ];
4444-4545- # Generate Twisted's plug-in cache. Twited users must do it as well. See
4646- # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
4747- # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
4848- # details.
4949- postInstall = "$out/bin/twistd --help > /dev/null";
5050-5151- meta = with lib; {
5252- homepage = "https://twistedmatrix.com/";
5353- description = "Twisted, an event-driven networking engine written in Python";
5454- longDescription = ''
5555- Twisted is an event-driven networking engine written in Python
5656- and licensed under the MIT license.
5757- '';
5858- license = licenses.mit;
5959- };
6060- };
6161-6262-in stdenv.mkDerivation rec {
6363- pname = "kippo";
6464- version = "0.8";
6565- src = fetchurl {
6666- url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/kippo/${pname}-${version}.tar.gz";
6767- sha256 = "0rd2mk36d02qd24z8s4xyy64fy54rzpar4379iq4dcjwg7l7f63d";
6868- };
6969- buildInputs = with pythonPackages; [ pycrypto pyasn1 twisted_13 ];
7070- installPhase = ''
7171- substituteInPlace ./kippo.tac --replace "kippo.cfg" "$out/src/kippo.cfg"
7272- substituteInPlace ./kippo.cfg --replace "log_path = log" "log_path = /var/log/kippo" \
7373- --replace "download_path = dl" "download_path = /var/log/kippo/dl" \
7474- --replace "contents_path = honeyfs" "filesystem_file = /var/lib/kippo/honeyfs" \
7575- --replace "filesystem_file = fs.pickle" "filesystem_file = /var/lib/kippo/fs.pickle" \
7676- --replace "data_path = data" "data_path = /var/lib/kippo/data" \
7777- --replace "txtcmds_path = txtcmds" "txtcmds_path = /var/lib/kippo/txtcmds" \
7878- --replace "public_key = public.key" "public_key = /var/lib/kippo/keys/public.key" \
7979- --replace "private_key = private.key" "private_key = /var/lib/kippo/keys/private.key"
8080- mkdir -p $out/bin
8181- mkdir -p $out/src
8282- mv ./* $out/src
8383- mv $out/src/utils/* $out/bin
8484- '';
8585-8686- passthru.twisted = twisted_13;
8787-8888- meta = with lib; {
8989- homepage = "https://github.com/desaster/kippo";
9090- description = "SSH Honeypot";
9191- longDescription = ''
9292- Default port is 2222. Recommend using something like this for port redirection to default SSH port:
9393- networking.firewall.extraCommands = '''
9494- iptables -t nat -A PREROUTING -i IN_IFACE -p tcp --dport 22 -j REDIRECT --to-port 2222''' '';
9595- license = licenses.bsd3;
9696- platforms = platforms.linux;
9797- maintainers = with maintainers; [ tomberek ];
9898- broken = true; # 2018-09-12, failed on hydra since 2017-12-11
9999- };
100100-}