From f0b98bd0114df1e1ebb82ff300f9532d86b3eb18 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 24 May 2017 01:43:50 +0200 Subject: krebs/5pkgs: move simple pkgs to a subdir --- krebs/5pkgs/Reaktor/default.nix | 22 - krebs/5pkgs/Reaktor/plugins.nix | 131 -- krebs/5pkgs/Reaktor/scripts/random-emoji.sh | 6 - krebs/5pkgs/Reaktor/scripts/random-issue.sh | 20 - krebs/5pkgs/Reaktor/scripts/sed-plugin.py | 41 - krebs/5pkgs/Reaktor/scripts/shack-correct.sh | 6 - krebs/5pkgs/apt-cacher-ng/default.nix | 21 - krebs/5pkgs/bepasty-client-cli/default.nix | 23 - krebs/5pkgs/buildbot/default.nix | 82 - krebs/5pkgs/buildbot/worker.nix | 24 - krebs/5pkgs/cac-api/default.nix | 43 - krebs/5pkgs/cac-cert/cac.pem | 88 - krebs/5pkgs/cac-cert/default.nix | 2 - krebs/5pkgs/cac-panel/default.nix | 18 - krebs/5pkgs/collectd-connect-time/default.nix | 15 - krebs/5pkgs/default.nix | 11 +- krebs/5pkgs/dic/default.nix | 36 - krebs/5pkgs/drivedroid-gen-repo/default.nix | 22 - krebs/5pkgs/fortclientsslvpn/default.nix | 92 -- krebs/5pkgs/games-user-env/default.nix | 34 - krebs/5pkgs/get/default.nix | 37 - krebs/5pkgs/git-hooks/default.nix | 107 -- krebs/5pkgs/github-hosts-sync/default.nix | 37 - krebs/5pkgs/go-shortener/default.nix | 57 - krebs/5pkgs/go-shortener/packages.nix | 44 - krebs/5pkgs/goify/default.nix | 18 - krebs/5pkgs/hashPassword/default.nix | 15 - krebs/5pkgs/htgen/default.nix | 28 - krebs/5pkgs/irc-announce/default.nix | 66 - krebs/5pkgs/kpaste/default.nix | 5 - krebs/5pkgs/krebspaste/default.nix | 6 - krebs/5pkgs/krebszones/default.nix | 25 - krebs/5pkgs/logf/default.nix | 114 -- krebs/5pkgs/much/cabal.nix | 28 - krebs/5pkgs/much/default.nix | 3 - krebs/5pkgs/netcup/default.nix | 32 - krebs/5pkgs/newsbot-js/default.nix | 60 - krebs/5pkgs/newsbot-js/packages.nix | 1747 -------------------- krebs/5pkgs/noVNC/default.nix | 21 - krebs/5pkgs/painload/default.nix | 7 - krebs/5pkgs/passwdqc-utils/default.nix | 37 - krebs/5pkgs/populate/default.nix | 36 - krebs/5pkgs/posix-array/default.nix | 30 - krebs/5pkgs/pssh/default.nix | 36 - krebs/5pkgs/push/default.nix | 49 - krebs/5pkgs/realwallpaper/default.nix | 24 - krebs/5pkgs/repo-sync/default.nix | 21 - krebs/5pkgs/retiolum-bootstrap/default.nix | 29 - krebs/5pkgs/rutorrent/default.nix | 15 - krebs/5pkgs/simple/Reaktor/default.nix | 22 + krebs/5pkgs/simple/Reaktor/plugins.nix | 131 ++ krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh | 6 + krebs/5pkgs/simple/Reaktor/scripts/random-issue.sh | 20 + krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py | 41 + .../5pkgs/simple/Reaktor/scripts/shack-correct.sh | 6 + krebs/5pkgs/simple/apt-cacher-ng/default.nix | 21 + krebs/5pkgs/simple/bepasty-client-cli/default.nix | 23 + krebs/5pkgs/simple/buildbot/default.nix | 82 + krebs/5pkgs/simple/buildbot/worker.nix | 24 + krebs/5pkgs/simple/cac-api/default.nix | 43 + krebs/5pkgs/simple/cac-cert/cac.pem | 88 + krebs/5pkgs/simple/cac-cert/default.nix | 2 + krebs/5pkgs/simple/cac-panel/default.nix | 18 + .../5pkgs/simple/collectd-connect-time/default.nix | 15 + krebs/5pkgs/simple/default.nix | 10 + krebs/5pkgs/simple/dic/default.nix | 36 + krebs/5pkgs/simple/drivedroid-gen-repo/default.nix | 22 + krebs/5pkgs/simple/fortclientsslvpn/default.nix | 92 ++ krebs/5pkgs/simple/games-user-env/default.nix | 34 + krebs/5pkgs/simple/get/default.nix | 37 + krebs/5pkgs/simple/git-hooks/default.nix | 107 ++ krebs/5pkgs/simple/github-hosts-sync/default.nix | 37 + krebs/5pkgs/simple/go-shortener/default.nix | 57 + krebs/5pkgs/simple/go-shortener/packages.nix | 44 + krebs/5pkgs/simple/goify/default.nix | 18 + krebs/5pkgs/simple/hashPassword/default.nix | 15 + krebs/5pkgs/simple/htgen/default.nix | 28 + krebs/5pkgs/simple/irc-announce/default.nix | 66 + krebs/5pkgs/simple/kpaste/default.nix | 5 + krebs/5pkgs/simple/krebspaste/default.nix | 6 + krebs/5pkgs/simple/krebszones/default.nix | 25 + krebs/5pkgs/simple/logf/default.nix | 114 ++ krebs/5pkgs/simple/much/cabal.nix | 28 + krebs/5pkgs/simple/much/default.nix | 3 + krebs/5pkgs/simple/netcup/default.nix | 32 + krebs/5pkgs/simple/newsbot-js/default.nix | 60 + krebs/5pkgs/simple/newsbot-js/packages.nix | 1747 ++++++++++++++++++++ krebs/5pkgs/simple/noVNC/default.nix | 21 + krebs/5pkgs/simple/painload/default.nix | 7 + krebs/5pkgs/simple/passwdqc-utils/default.nix | 37 + krebs/5pkgs/simple/populate/default.nix | 36 + krebs/5pkgs/simple/posix-array/default.nix | 30 + krebs/5pkgs/simple/pssh/default.nix | 36 + krebs/5pkgs/simple/push/default.nix | 49 + krebs/5pkgs/simple/realwallpaper/default.nix | 24 + krebs/5pkgs/simple/repo-sync/default.nix | 21 + krebs/5pkgs/simple/retiolum-bootstrap/default.nix | 29 + krebs/5pkgs/simple/rutorrent/default.nix | 15 + krebs/5pkgs/simple/tarantool/default.nix | 21 + krebs/5pkgs/simple/tinc_graphs/default.nix | 26 + krebs/5pkgs/simple/translate-shell/default.nix | 43 + krebs/5pkgs/simple/treq/default.nix | 17 + krebs/5pkgs/simple/untilport/default.nix | 18 + krebs/5pkgs/simple/urlwatch/default.nix | 24 + krebs/5pkgs/simple/weechat/default.nix | 80 + krebs/5pkgs/simple/whatsupnix/default.nix | 15 + krebs/5pkgs/simple/whatsupnix/whatsupnix.bash | 44 + krebs/5pkgs/simple/with-tmpdir/default.nix | 29 + krebs/5pkgs/simple/youtube-tools/default.nix | 21 + krebs/5pkgs/simple/zandronum-bin/default.nix | 83 + krebs/5pkgs/tarantool/default.nix | 21 - krebs/5pkgs/tinc_graphs/default.nix | 26 - krebs/5pkgs/translate-shell/default.nix | 43 - krebs/5pkgs/treq/default.nix | 17 - krebs/5pkgs/untilport/default.nix | 18 - krebs/5pkgs/urlwatch/default.nix | 24 - krebs/5pkgs/weechat/default.nix | 80 - krebs/5pkgs/whatsupnix/default.nix | 15 - krebs/5pkgs/whatsupnix/whatsupnix.bash | 44 - krebs/5pkgs/with-tmpdir/default.nix | 29 - krebs/5pkgs/youtube-tools/default.nix | 21 - krebs/5pkgs/zandronum-bin/default.nix | 83 - 122 files changed, 3895 insertions(+), 3888 deletions(-) delete mode 100644 krebs/5pkgs/Reaktor/default.nix delete mode 100644 krebs/5pkgs/Reaktor/plugins.nix delete mode 100644 krebs/5pkgs/Reaktor/scripts/random-emoji.sh delete mode 100644 krebs/5pkgs/Reaktor/scripts/random-issue.sh delete mode 100644 krebs/5pkgs/Reaktor/scripts/sed-plugin.py delete mode 100644 krebs/5pkgs/Reaktor/scripts/shack-correct.sh delete mode 100644 krebs/5pkgs/apt-cacher-ng/default.nix delete mode 100644 krebs/5pkgs/bepasty-client-cli/default.nix delete mode 100644 krebs/5pkgs/buildbot/default.nix delete mode 100644 krebs/5pkgs/buildbot/worker.nix delete mode 100644 krebs/5pkgs/cac-api/default.nix delete mode 100644 krebs/5pkgs/cac-cert/cac.pem delete mode 100644 krebs/5pkgs/cac-cert/default.nix delete mode 100644 krebs/5pkgs/cac-panel/default.nix delete mode 100644 krebs/5pkgs/collectd-connect-time/default.nix delete mode 100644 krebs/5pkgs/dic/default.nix delete mode 100644 krebs/5pkgs/drivedroid-gen-repo/default.nix delete mode 100644 krebs/5pkgs/fortclientsslvpn/default.nix delete mode 100644 krebs/5pkgs/games-user-env/default.nix delete mode 100644 krebs/5pkgs/get/default.nix delete mode 100644 krebs/5pkgs/git-hooks/default.nix delete mode 100644 krebs/5pkgs/github-hosts-sync/default.nix delete mode 100644 krebs/5pkgs/go-shortener/default.nix delete mode 100644 krebs/5pkgs/go-shortener/packages.nix delete mode 100644 krebs/5pkgs/goify/default.nix delete mode 100644 krebs/5pkgs/hashPassword/default.nix delete mode 100644 krebs/5pkgs/htgen/default.nix delete mode 100644 krebs/5pkgs/irc-announce/default.nix delete mode 100644 krebs/5pkgs/kpaste/default.nix delete mode 100644 krebs/5pkgs/krebspaste/default.nix delete mode 100644 krebs/5pkgs/krebszones/default.nix delete mode 100644 krebs/5pkgs/logf/default.nix delete mode 100644 krebs/5pkgs/much/cabal.nix delete mode 100644 krebs/5pkgs/much/default.nix delete mode 100644 krebs/5pkgs/netcup/default.nix delete mode 100644 krebs/5pkgs/newsbot-js/default.nix delete mode 100644 krebs/5pkgs/newsbot-js/packages.nix delete mode 100644 krebs/5pkgs/noVNC/default.nix delete mode 100644 krebs/5pkgs/painload/default.nix delete mode 100644 krebs/5pkgs/passwdqc-utils/default.nix delete mode 100644 krebs/5pkgs/populate/default.nix delete mode 100644 krebs/5pkgs/posix-array/default.nix delete mode 100644 krebs/5pkgs/pssh/default.nix delete mode 100644 krebs/5pkgs/push/default.nix delete mode 100644 krebs/5pkgs/realwallpaper/default.nix delete mode 100644 krebs/5pkgs/repo-sync/default.nix delete mode 100644 krebs/5pkgs/retiolum-bootstrap/default.nix delete mode 100644 krebs/5pkgs/rutorrent/default.nix create mode 100644 krebs/5pkgs/simple/Reaktor/default.nix create mode 100644 krebs/5pkgs/simple/Reaktor/plugins.nix create mode 100644 krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh create mode 100644 krebs/5pkgs/simple/Reaktor/scripts/random-issue.sh create mode 100644 krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py create mode 100644 krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh create mode 100644 krebs/5pkgs/simple/apt-cacher-ng/default.nix create mode 100644 krebs/5pkgs/simple/bepasty-client-cli/default.nix create mode 100644 krebs/5pkgs/simple/buildbot/default.nix create mode 100644 krebs/5pkgs/simple/buildbot/worker.nix create mode 100644 krebs/5pkgs/simple/cac-api/default.nix create mode 100644 krebs/5pkgs/simple/cac-cert/cac.pem create mode 100644 krebs/5pkgs/simple/cac-cert/default.nix create mode 100644 krebs/5pkgs/simple/cac-panel/default.nix create mode 100644 krebs/5pkgs/simple/collectd-connect-time/default.nix create mode 100644 krebs/5pkgs/simple/default.nix create mode 100644 krebs/5pkgs/simple/dic/default.nix create mode 100644 krebs/5pkgs/simple/drivedroid-gen-repo/default.nix create mode 100644 krebs/5pkgs/simple/fortclientsslvpn/default.nix create mode 100644 krebs/5pkgs/simple/games-user-env/default.nix create mode 100644 krebs/5pkgs/simple/get/default.nix create mode 100644 krebs/5pkgs/simple/git-hooks/default.nix create mode 100644 krebs/5pkgs/simple/github-hosts-sync/default.nix create mode 100644 krebs/5pkgs/simple/go-shortener/default.nix create mode 100644 krebs/5pkgs/simple/go-shortener/packages.nix create mode 100644 krebs/5pkgs/simple/goify/default.nix create mode 100644 krebs/5pkgs/simple/hashPassword/default.nix create mode 100644 krebs/5pkgs/simple/htgen/default.nix create mode 100644 krebs/5pkgs/simple/irc-announce/default.nix create mode 100644 krebs/5pkgs/simple/kpaste/default.nix create mode 100644 krebs/5pkgs/simple/krebspaste/default.nix create mode 100644 krebs/5pkgs/simple/krebszones/default.nix create mode 100644 krebs/5pkgs/simple/logf/default.nix create mode 100644 krebs/5pkgs/simple/much/cabal.nix create mode 100644 krebs/5pkgs/simple/much/default.nix create mode 100644 krebs/5pkgs/simple/netcup/default.nix create mode 100644 krebs/5pkgs/simple/newsbot-js/default.nix create mode 100644 krebs/5pkgs/simple/newsbot-js/packages.nix create mode 100644 krebs/5pkgs/simple/noVNC/default.nix create mode 100644 krebs/5pkgs/simple/painload/default.nix create mode 100644 krebs/5pkgs/simple/passwdqc-utils/default.nix create mode 100644 krebs/5pkgs/simple/populate/default.nix create mode 100644 krebs/5pkgs/simple/posix-array/default.nix create mode 100644 krebs/5pkgs/simple/pssh/default.nix create mode 100644 krebs/5pkgs/simple/push/default.nix create mode 100644 krebs/5pkgs/simple/realwallpaper/default.nix create mode 100644 krebs/5pkgs/simple/repo-sync/default.nix create mode 100644 krebs/5pkgs/simple/retiolum-bootstrap/default.nix create mode 100644 krebs/5pkgs/simple/rutorrent/default.nix create mode 100644 krebs/5pkgs/simple/tarantool/default.nix create mode 100644 krebs/5pkgs/simple/tinc_graphs/default.nix create mode 100644 krebs/5pkgs/simple/translate-shell/default.nix create mode 100644 krebs/5pkgs/simple/treq/default.nix create mode 100644 krebs/5pkgs/simple/untilport/default.nix create mode 100644 krebs/5pkgs/simple/urlwatch/default.nix create mode 100644 krebs/5pkgs/simple/weechat/default.nix create mode 100644 krebs/5pkgs/simple/whatsupnix/default.nix create mode 100644 krebs/5pkgs/simple/whatsupnix/whatsupnix.bash create mode 100644 krebs/5pkgs/simple/with-tmpdir/default.nix create mode 100644 krebs/5pkgs/simple/youtube-tools/default.nix create mode 100644 krebs/5pkgs/simple/zandronum-bin/default.nix delete mode 100644 krebs/5pkgs/tarantool/default.nix delete mode 100644 krebs/5pkgs/tinc_graphs/default.nix delete mode 100644 krebs/5pkgs/translate-shell/default.nix delete mode 100644 krebs/5pkgs/treq/default.nix delete mode 100644 krebs/5pkgs/untilport/default.nix delete mode 100644 krebs/5pkgs/urlwatch/default.nix delete mode 100644 krebs/5pkgs/weechat/default.nix delete mode 100644 krebs/5pkgs/whatsupnix/default.nix delete mode 100644 krebs/5pkgs/whatsupnix/whatsupnix.bash delete mode 100644 krebs/5pkgs/with-tmpdir/default.nix delete mode 100644 krebs/5pkgs/youtube-tools/default.nix delete mode 100644 krebs/5pkgs/zandronum-bin/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix deleted file mode 100644 index fc3710820..000000000 --- a/krebs/5pkgs/Reaktor/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, pkgs,python3Packages,fetchurl, ... }: - -python3Packages.buildPythonPackage rec { - name = "Reaktor-${version}"; - version = "0.5.1"; - - doCheck = false; - - propagatedBuildInputs = with pkgs;[ - python3Packages.docopt - python3Packages.requests2 - ]; - src = fetchurl { - url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; - sha256 = "0dn9r0cyxi1sji2pnybsrc4hhaaq7hmf235nlgkrxqlsdb7y6n6n"; - }; - meta = { - homepage = http://krebsco.de/; - description = "An IRC bot based on asynchat"; - license = lib.licenses.wtfpl; - }; -} diff --git a/krebs/5pkgs/Reaktor/plugins.nix b/krebs/5pkgs/Reaktor/plugins.nix deleted file mode 100644 index e85e41cfe..000000000 --- a/krebs/5pkgs/Reaktor/plugins.nix +++ /dev/null @@ -1,131 +0,0 @@ -{ stdenv, lib, pkgs, makeWrapper }: - -rec { - # Begin API - buildBaseReaktorPlugin = { name - , config # python extra configuration for plugin - , phases ? [] - , ... } @ attrs: - stdenv.mkDerivation (attrs // { - name = "Reaktor-plugin-" + name; - isReaktorPlugin = true; - }); - - buildSimpleReaktorPlugin = name: { script - , path ? [] - , env ? {} - , append_rule ? false # append the rule instead of insert - , pattern ? "" - , ... } @ attrs: - let - path_env = { "PATH" = lib.makeSearchPath "bin" (path ++ [ pkgs.coreutils ]); }; - src_dir = pkgs.substituteAll ( { - inherit name; - dir = "bin"; - isExecutable = true; - src = script; - }); - src_file = "${src_dir}/bin/${name}"; - config = '' - public_commands.${if append_rule then "append(" else "insert(0," }{ - 'capname' : "${name}", - 'pattern' : ${if pattern == "" then - ''indirect_pattern.format("${name}")'' else - ''"${pattern}"'' }, - 'argv' : ["${src_file}"], - 'env' : ${builtins.toJSON (path_env // env)} }) - ''; - config_file = pkgs.writeText "plugin.py" config; - in buildBaseReaktorPlugin (attrs // rec { - inherit name config; - - phases = [ "installPhase" ]; - buildInputs = [ makeWrapper ]; - installPhase = '' - mkdir -p $out/bin $out/etc/Reaktor - ln -s ${src_file} $out/bin - wrapProgram $out/bin/${name} \ - --prefix PATH : ${path_env.PATH} - ln -s ${config_file} $out/etc/Reaktor/plugin.py - ''; - - }); - # End API - - # Begin Plugins - random-emoji = buildSimpleReaktorPlugin "emoji" { - path = with pkgs; [ gnused gnugrep xmlstarlet curl ]; - script = ./scripts/random-emoji.sh; - }; - - sed-plugin = buildSimpleReaktorPlugin "sed-plugin" { - path = [ pkgs.gnused pkgs.python3 ]; - # only support s///gi the plugin needs to see every msg - # TODO: this will eat up the last regex, fix Reaktor to support fallthru - append_rule = true; - pattern = "^(?P.*)$$"; - script = ./scripts/sed-plugin.py; - }; - - shack-correct = buildSimpleReaktorPlugin "shack-correct" { - path = [ pkgs.gnused ]; - pattern = "^(?P.*Shack.*)$$"; - script = ./scripts/shack-correct.sh; - }; - - nixos-version = buildSimpleReaktorPlugin "nixos-version" { - script = pkgs.writeDash "nixos-version" '' - . /etc/os-release - echo "$PRETTY_NAME" - ''; - }; - stockholm-issue = buildSimpleReaktorPlugin "stockholm-issue" { - script = ./scripts/random-issue.sh; - path = with pkgs; [ git gnused haskellPackages.lentil ]; - env = { "origin" = "http://cgit.gum/stockholm"; }; - }; - - titlebot = - let - pypkgs = pkgs.python3Packages; - titlebot_cmds = pypkgs.buildPythonPackage { - name = "titlebot_cmds"; - propagatedBuildInputs = with pypkgs; [ setuptools ]; - src = pkgs.fetchurl { - url = "https://github.com/makefu/reaktor-titlebot/archive/2.1.0.tar.gz"; - sha256 = "0wvf09wmk8b52f9j65qrw81nwrhs9pfhijwrlkzp5l7l2q8cjkp6"; - }; - }; - in buildBaseReaktorPlugin rec { - name = "titlebot"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out - ln -s ${titlebot_cmds}/* $out - ''; - config = '' - def titlebot_cmd(cmd): - from os import environ - return { 'capname': None, - 'env': { 'TITLEDB': - environ['state_dir']+'/suggestions.json' }, - 'pattern': '^\\.' + cmd + '\\s*(?:\\s+(?P.*))?$$', - 'argv': [ '${titlebot_cmds}/bin/' + cmd ] } - for i in ['up','help','list','top','new']: - public_commands.insert(0,titlebot_cmd(i)) - commands.insert(0,titlebot_cmd('clear')) - ''; - }; - - url-title = (buildSimpleReaktorPlugin "url-title" { - pattern = "^.*(?Phttp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$$"; - path = with pkgs; [ curl perl ]; - script = pkgs.writeDash "lambda-pl" '' - if [ "$#" -gt 0 ]; then - curl -SsL --max-time 5 "$1" | - perl -l -0777 -ne 'print $1 if /\s*(.*?)(?: - youtube)?\s*<\/title/si' - fi - ''; - }); - -} diff --git a/krebs/5pkgs/Reaktor/scripts/random-emoji.sh b/krebs/5pkgs/Reaktor/scripts/random-emoji.sh deleted file mode 100644 index 386aa68b9..000000000 --- a/krebs/5pkgs/Reaktor/scripts/random-emoji.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -curl http://emojicons.com/random -s | \ - grep data-text | \ - sed -n 's/.*>\(.*\)<\/textarea>/\1/p' | \ - head -n 1 | \ - xmlstarlet unesc diff --git a/krebs/5pkgs/Reaktor/scripts/random-issue.sh b/krebs/5pkgs/Reaktor/scripts/random-issue.sh deleted file mode 100644 index 5c47c6156..000000000 --- a/krebs/5pkgs/Reaktor/scripts/random-issue.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -set -eu -# requires env: -# $state_dir -# $origin - -# in PATH: git,lentil,coreutils -subdir=`echo "$1" | tr -dc "[:alnum:]"` -name=`echo "$origin" | tr -dc "[:alnum:]"` -track="$state_dir/$name-checkout" -(if test -e "$track" ;then - cd "$track" - git fetch origin master - git reset --hard origin/master -else - git clone "$origin" "$track" -fi) >&2 - -cd "$track" -lentil "${subdir:-.}" -f csv | sed 1d | shuf | head -1 diff --git a/krebs/5pkgs/Reaktor/scripts/sed-plugin.py b/krebs/5pkgs/Reaktor/scripts/sed-plugin.py deleted file mode 100644 index da8e2f726..000000000 --- a/krebs/5pkgs/Reaktor/scripts/sed-plugin.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python3 - -# Usage: -# _from=krebs state_dir=. python sed-plugin.py 'dick butt' -# _from=krebs state_dir=. python sed-plugin.py 's/t/l/g' -# > dick bull -import shelve -from os import environ -from os.path import join -from sys import argv -import re - -d = shelve.open(join(environ['state_dir'], 'sed-plugin.shelve'), writeback=True) -usr = environ['_from'] - - -def is_regex(line): - myre = re.compile(r'^s/(?:\\/|[^/])+/(?:\\/|[^/])*/[ig]?$') - return myre.match(line) - -line = argv[1] - -if is_regex(line): - last = d.get(usr, None) - if last: - from subprocess import Popen, PIPE - p = Popen(['sed', line], stdin=PIPE, stdout=PIPE) - so, se = p.communicate(bytes("{}\n".format(last), "UTF-8")) - if p.returncode: - print("something went wrong when trying to process your regex: {}".format(se.decode())) - ret = so.decode() - print("\x1b[1m{}\x1b[0m meant: {}".format(usr, ret.strip())) - if ret: - d[usr] = ret - - else: - print("no last message") -else: - d[usr] = line - -d.close() diff --git a/krebs/5pkgs/Reaktor/scripts/shack-correct.sh b/krebs/5pkgs/Reaktor/scripts/shack-correct.sh deleted file mode 100644 index 3b4d04f80..000000000 --- a/krebs/5pkgs/Reaktor/scripts/shack-correct.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh -set -eu -printf "Sie meinten wohl \"" -echo -n $@ | sed 's/Shack/shack/g' -echo "\"" -echo "${_from}--" diff --git a/krebs/5pkgs/apt-cacher-ng/default.nix b/krebs/5pkgs/apt-cacher-ng/default.nix deleted file mode 100644 index e3986713b..000000000 --- a/krebs/5pkgs/apt-cacher-ng/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchurl, cmake, doxygen, zlib, openssl, bzip2, pkgconfig, libpthreadstubs }: - -stdenv.mkDerivation rec { - name = "apt-cacher-ng-${version}"; - version = "2"; - - src = fetchurl { - url = "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz"; - sha256 = "0bkc3012vinridl5ch46pwnxjalymx4wf6nxax64nm7bdkcj9azf"; - }; - - NIX_LDFLAGS = "-lpthread"; - buildInputs = [ doxygen cmake zlib openssl bzip2 pkgconfig libpthreadstubs ]; - - meta = { - description = "A caching proxy specialized for linux distribution files"; - homepage = http://www.unix-ag.uni-kl.de/~bloch/acng/; - license = stdenv.lib.licenses.gpl2; - maintainers = [ stdenv.lib.maintainers.makefu ]; - }; -} diff --git a/krebs/5pkgs/bepasty-client-cli/default.nix b/krebs/5pkgs/bepasty-client-cli/default.nix deleted file mode 100644 index c58e637b3..000000000 --- a/krebs/5pkgs/bepasty-client-cli/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, pkgs, pythonPackages, fetchFromGitHub, ... }: - -with pythonPackages; buildPythonPackage rec { - name = "bepasty-client-cli"; - propagatedBuildInputs = [ - python_magic - click - requests2 - ]; - - src = fetchFromGitHub { - owner = "bepasty"; - repo = "bepasty-client-cli"; - rev = "4b7135ba8ba1e17501de08ad7b6aca73c0d949d2"; - sha256 = "1svchyk9zai1vip9ppm12jm7wfjbdr9ijhgcd2n10xh73jrn9cnc"; - }; - - meta = { - homepage = https://github.com/bepasty/bepasty-client-cli; - description = "CLI client for bepasty-server"; - license = lib.licenses.bsd2; - }; -} diff --git a/krebs/5pkgs/buildbot/default.nix b/krebs/5pkgs/buildbot/default.nix deleted file mode 100644 index 37eea5fd9..000000000 --- a/krebs/5pkgs/buildbot/default.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ pkgs, stdenv, pythonPackages, fetchurl, coreutils, plugins ? [] }: - -pythonPackages.buildPythonApplication (rec { - name = "${pname}-${version}"; - pname = "buildbot"; - version = "0.9.4"; - src = fetchurl { - url = "mirror://pypi/b/${pname}/${name}.tar.gz"; - sha256 = "0wklrn4fszac9wi8zw3vbsznwyff6y57cz0i81zvh46skb6n3086"; - }; - doCheck = false; - buildInputs = with pythonPackages; [ - lz4 - txrequests - pyjade - boto3 - moto - txgithub - mock - setuptoolsTrial - isort - pylint - astroid - pyflakes - pyjwt - ]; - - propagatedBuildInputs = with pythonPackages; [ - - # core - twisted - jinja2 - zope_interface - future - sqlalchemy - sqlalchemy_migrate - future - dateutil - txaio - autobahn - - # tls - pyopenssl - service-identity - idna - pkgs.treq - - # docs - sphinx - sphinxcontrib-blockdiag - sphinxcontrib-spelling - pyenchant - docutils - ramlfications - sphinx-jinja - - ] ++ plugins; - - preInstall = '' - # writes out a file that can't be read properly - sed -i.bak -e '69,84d' buildbot/test/unit/test_www_config.py - - # re-hardcode path to tail - sed -i.bak 's|/usr/bin/tail|${coreutils}/bin/tail|' buildbot/scripts/logwatcher.py - ''; - - postFixup = '' - mv -v $out/bin/buildbot $out/bin/.wrapped-buildbot - echo "#!/bin/sh" > $out/bin/buildbot - echo "export PYTHONPATH=$PYTHONPATH" >> $out/bin/buildbot - echo "exec $out/bin/.wrapped-buildbot \"\$@\"" >> $out/bin/buildbot - chmod -c 555 $out/bin/buildbot - ''; - - meta = with stdenv.lib; { - homepage = http://buildbot.net/; - description = "Continuous integration system that automates the build/test cycle"; - maintainers = with maintainers; [ nand0p ryansydnor ]; - platforms = platforms.all; - license = licenses.gpl2; - }; -}) diff --git a/krebs/5pkgs/buildbot/worker.nix b/krebs/5pkgs/buildbot/worker.nix deleted file mode 100644 index 34e526858..000000000 --- a/krebs/5pkgs/buildbot/worker.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ pkgs, stdenv, fetchurl, pythonPackages }: -pythonPackages.buildPythonApplication (rec { - name = "${pname}-${version}"; - pname = "buildbot-worker"; - version = "0.9.4"; - - doCheck = false; - src = fetchurl { - url = "mirror://pypi/b/${pname}/${name}.tar.gz"; - sha256 = "0rdrr8x7sn2nxl51p6h9ad42s3c28lb6sys84zrg0d7fm4zhv7hj"; - }; - - buildInputs = with pythonPackages; [ setuptoolsTrial mock ]; - propagatedBuildInputs = with pythonPackages; [ twisted future pkgs.treq ]; - - meta = with stdenv.lib; { - homepage = http://buildbot.net/; - description = "Buildbot Worker Daemon"; - maintainers = with maintainers; [ nand0p ryansydnor ]; - platforms = platforms.all; - license = licenses.gpl2; - }; -}) - diff --git a/krebs/5pkgs/cac-api/default.nix b/krebs/5pkgs/cac-api/default.nix deleted file mode 100644 index e2bd8c148..000000000 --- a/krebs/5pkgs/cac-api/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ stdenv, fetchgit, bc, cac-cert, coreutils, curl, dash, gnugrep, gnused, inotifyTools, jq, ncurses, openssh, sshpass, ... }: - -stdenv.mkDerivation { - name = "cac-api-1.1.2"; - - src = fetchgit { - url = http://cgit.ni.krebsco.de/cac-api; - rev = "67e93510e7742acae44db30275abbfe671aa9b7b"; - sha256 = "1vxh57j7vrq5sg9j1sam0538kkkhqpgf230vvdz2ifzgkj01z27l"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = '' - mkdir -p $out/bin - { cat <<\EOF - #! ${dash}/bin/dash - export PATH=${stdenv.lib.makeBinPath [ - bc - coreutils - curl - gnugrep - gnused - inotifyTools - jq - ncurses - openssh - sshpass - ]}:"$PATH" - EOF - # [1]: Disable fetching tasks; listtasks is currently broken: - # Unknown column 'iod.apitask.cid' in 'field list' - sed ' - /^\s*tasks \\$/d; # [1] - s|\<_cac_exec curl|<${cac-cert} & --cacert /dev/stdin| - ' cac-api - } > $out/bin/cac-api - chmod +x $out/bin/cac-api - ''; -} diff --git a/krebs/5pkgs/cac-cert/cac.pem b/krebs/5pkgs/cac-cert/cac.pem deleted file mode 100644 index 9d02b6bcf..000000000 --- a/krebs/5pkgs/cac-cert/cac.pem +++ /dev/null @@ -1,88 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFWzCCBEOgAwIBAgIQXWIKGWRZf838+wW1zLdK0DANBgkqhkiG9w0BAQsFADCBkDELMAkGA1UE -BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG -A1UECh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A1sj+ -nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg -tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW -sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp -pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA -zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq -ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 -7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I -LaZRfyHBNVOFBkpdn627G190 ------END CERTIFICATE----- diff --git a/krebs/5pkgs/cac-cert/default.nix b/krebs/5pkgs/cac-cert/default.nix deleted file mode 100644 index d99019dca..000000000 --- a/krebs/5pkgs/cac-cert/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -{ writeText, ... }: -writeText "cac.pem" (builtins.readFile ./cac.pem) diff --git a/krebs/5pkgs/cac-panel/default.nix b/krebs/5pkgs/cac-panel/default.nix deleted file mode 100644 index fd4799535..000000000 --- a/krebs/5pkgs/cac-panel/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, python3Packages, ...}: - -python3Packages.buildPythonPackage rec { - name = "cac-panel-${version}"; - version = "0.4.4"; - - src = pkgs.fetchurl { - url = "https://pypi.python.org/packages/source/c/cac-panel/cac-panel-${version}.tar.gz"; - sha256 = "16bx67fsbgwxciik42jhdnfzxx1xp5b0rimzrif3r7h4fawlnld8"; - }; - - propagatedBuildInputs = with python3Packages; [ - docopt - requests2 - beautifulsoup4 - ]; -} - diff --git a/krebs/5pkgs/collectd-connect-time/default.nix b/krebs/5pkgs/collectd-connect-time/default.nix deleted file mode 100644 index 525388029..000000000 --- a/krebs/5pkgs/collectd-connect-time/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{lib, pkgs, pythonPackages, fetchurl, ... }: - -pythonPackages.buildPythonPackage rec { - name = "collectd-connect-time-${version}"; - version = "0.3.0"; - src = fetchurl { - url = "https://pypi.python.org/packages/source/c/collectd-connect-time/collectd-connect-time-${version}.tar.gz"; - sha256 = "0vvrf9py9bwc8hk3scxwg4x2j8jlp2qva0mv4q8d9m4b4mk99c95"; - }; - meta = { - homepage = https://pypi.python.org/pypi/collectd-connect-time/; - description = "TCP Connection time plugin for collectd"; - license = lib.licenses.wtfpl; - }; -} diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 81481e14b..5af541258 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -12,10 +12,8 @@ with import ; then trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override else override; in {} + // import ./simple pkgs oldpkgs // import ./writers.nix pkgs oldpkgs - // mapAttrs (_: flip callPackage {}) - (filterAttrs (_: dir: pathExists (dir + "/default.nix")) - (subdirsOf ./.)) // { empty = pkgs.runCommand "empty-1.0.0" {} "mkdir $out"; @@ -33,13 +31,12 @@ with import ; (builtins.readDir ./haskell-overrides)); }; - ReaktorPlugins = callPackage ./Reaktor/plugins.nix {}; + ReaktorPlugins = callPackage ./simple/Reaktor/plugins.nix {}; - buildbot = callPackage ./buildbot {}; - buildbot-full = callPackage ./buildbot { + buildbot-full = callPackage ./simple/buildbot { plugins = with pkgs.buildbot-plugins; [ www console-view waterfall-view ]; }; - buildbot-worker = callPackage ./buildbot/worker.nix {}; + buildbot-worker = callPackage ./simple/buildbot/worker.nix {}; # https://github.com/proot-me/PRoot/issues/106 proot = pkgs.writeDashBin "proot" '' diff --git a/krebs/5pkgs/dic/default.nix b/krebs/5pkgs/dic/default.nix deleted file mode 100644 index 963786f0c..000000000 --- a/krebs/5pkgs/dic/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, fetchgit, coreutils, curl, gnused, gnugrep, ... }: - -stdenv.mkDerivation { - name = "dic"; - - src = fetchgit { - url = http://cgit.ni.krebsco.de/dic; - rev = "refs/tags/v1.0.1"; - sha256 = "1686mba1z4m7vq70w26qpl00z1cz286c9bya9ql36g6w2pbcs8d3"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = - let - path = stdenv.lib.makeBinPath [ - coreutils - curl - gnused - gnugrep - ]; - in - '' - mkdir -p $out/bin - - sed \ - 's,^main() {$,&\n PATH=${path}; export PATH,' \ - < ./dic \ - > $out/bin/dic - - chmod +x $out/bin/dic - ''; -} diff --git a/krebs/5pkgs/drivedroid-gen-repo/default.nix b/krebs/5pkgs/drivedroid-gen-repo/default.nix deleted file mode 100644 index de8046c4a..000000000 --- a/krebs/5pkgs/drivedroid-gen-repo/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{stdenv,fetchurl,pkgs,python3Packages, ... }: - -python3Packages.buildPythonPackage rec { - name = "drivedroid-gen-repo-${version}"; - version = "0.4.4"; - - propagatedBuildInputs = with pkgs;[ - python3Packages.docopt - ]; - - src = fetchurl { - url = "https://pypi.python.org/packages/source/d/drivedroid-gen-repo/drivedroid-gen-repo-${version}.tar.gz"; - sha256 = "09p58hzp61r5fp025lak9z52y0aakmaqpi59p9w5xq42dvy2hnvl"; - }; - - meta = { - homepage = http://krebsco.de/; - description = "Generate Drivedroid repos"; - license = stdenv.lib.licenses.wtfpl; - }; -} - diff --git a/krebs/5pkgs/fortclientsslvpn/default.nix b/krebs/5pkgs/fortclientsslvpn/default.nix deleted file mode 100644 index cbcfab05f..000000000 --- a/krebs/5pkgs/fortclientsslvpn/default.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ stdenv, lib, fetchurl, gnome3, glib, libSM, gdk_pixbuf, libX11, libXinerama, iproute, - makeWrapper, libredirect, ppp, coreutils, gawk, pango }: -stdenv.mkDerivation rec { - name = "forticlientsslvpn"; - # forticlient will be copied into /tmp before execution. this is necessary as - # the software demands $base to be writeable - - # TODO: chroot and create the following files instead of copying files manually - # mkdir /etc/ppp ; touch /etc/ppp/options - # ln -s /run/current-system/sw/bin/tail /usr/bin/tail - # ln -s /run/current-system/sw/bin/pppd /usr/sbin/pppd - - src = fetchurl { - # archive.org mirror: - # https://archive.org/download/ForticlientsslvpnLinux4.4.23171.tar/forticlientsslvpn_linux_4.4.2317.tar.gz - url = http://www.zen.co.uk/userfiles/knowledgebase/FortigateSSLVPNClient/forticlientsslvpn_linux_4.4.2317.tar.gz; - sha256 = "19clnf9rgrnwazlpah8zz5kvz6kc8lxawrgmksx25k5ywflmbcrr"; - }; - phases = [ "unpackPhase" "buildPhase" "installPhase" "fixupPhase" ]; - - buildInputs = [ makeWrapper ]; - - binPath = lib.makeBinPath [ - coreutils - gawk - ]; - - - libPath = lib.makeLibraryPath [ - stdenv.cc.cc - ]; - - guiLibPath = lib.makeLibraryPath [ - gnome3.gtk - glib - libSM - gdk_pixbuf - libX11 - libXinerama - pango - ]; - - buildPhase = '' - # TODO: 32bit, use the 32bit folder - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - --set-rpath "$libPath" \ - 64bit/forticlientsslvpn_cli - - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - --set-rpath "$libPath:$guiLibPath" \ - 64bit/forticlientsslvpn - - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - --set-rpath "$libPath" \ - 64bit/helper/subproc - - sed -i 's#\(export PATH=\).*#\1"${binPath}"#' 64bit/helper/waitppp.sh - ''; - - installPhase = '' - mkdir -p "$out/opt/fortinet" - - cp -r 64bit/. "$out/opt/fortinet" - wrapProgram $out/opt/fortinet/forticlientsslvpn \ - --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \ - --set NIX_REDIRECTS /usr/bin/tail=${coreutils}/bin/tail:/usr/sbin/ip=${iproute}/bin/ip:/usr/sbin/pppd=${ppp}/bin/pppd - - mkdir -p "$out/bin/" - - cat > $out/bin/forticlientsslvpn < {} }: - - (pkgs.buildFHSUserEnv { - name = "simple-x11-env"; - targetPkgs = pkgs: with pkgs; [ - coreutils - ]; - multiPkgs = pkgs: with pkgs; [ - alsaLib - zlib - xorg.libXxf86vm - curl - openal - openssl_1_0_2 - xorg.libXext - xorg.libX11 - xorg.libXrandr - xorg.libXcursor - xorg.libXinerama - xorg.libXi - mesa_glu - ]; - runScript = "bash"; - }).env -''; - - -in pkgs.writeDashBin "games-user-env" '' - nix-shell ${env_nix} -'' diff --git a/krebs/5pkgs/get/default.nix b/krebs/5pkgs/get/default.nix deleted file mode 100644 index 83f6b0228..000000000 --- a/krebs/5pkgs/get/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ coreutils, gnugrep, gnused, fetchgit, jq, nix, stdenv, ... }: - -stdenv.mkDerivation { - name = "get-1.4.1"; - - src = fetchgit { - url = http://cgit.ni.krebsco.de/get; - rev = "41c0c35805ec1708729f73d14650d8ebc94a405b"; - sha256 = "0rx1qsbb4py14795yhhqwlvaibj2569fqm7x2671l868xi59h9f9"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = - let - path = stdenv.lib.makeBinPath [ - coreutils - gnugrep - gnused - jq - nix - ]; - in - '' - mkdir -p $out/bin - - sed \ - '1s,.*,&\nPATH=${path},' \ - < ./get \ - > $out/bin/get - - chmod +x $out/bin/get - ''; -} diff --git a/krebs/5pkgs/git-hooks/default.nix b/krebs/5pkgs/git-hooks/default.nix deleted file mode 100644 index 4017b873b..000000000 --- a/krebs/5pkgs/git-hooks/default.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ pkgs, ... }: - -with import ; - -{ - # TODO irc-announce should return a derivation - # but it cannot because krebs.git.repos.*.hooks :: attrsOf str - irc-announce = { nick, channel, server, port ? 6667, verbose ? false, branches ? [] }: '' - #! /bin/sh - set -euf - - export PATH=${makeBinPath (with pkgs; [ - coreutils - git - gnugrep - gnused - ])} - - green() { printf '\x0303,99%s\x0F' "$1"; } - red() { printf '\x0304,99%s\x0F' "$1"; } - orange() { printf '\x0307,99%s\x0F' "$1"; } - pink() { printf '\x0313,99%s\x0F' "$1"; } - gray() { printf '\x0314,99%s\x0F' "$1"; } - - unset message - add_message() { - message="''${message+$message - }$*" - } - - nick=${escapeShellArg nick} - channel=${escapeShellArg channel} - server=${escapeShellArg server} - port=${toString port} - - host=$nick - cgit_endpoint=http://cgit.$host.r - - empty=0000000000000000000000000000000000000000 - - while read oldrev newrev ref; do - - if [ $oldrev = $empty ]; then - receive_mode=create - elif [ $newrev = $empty ]; then - receive_mode=delete - elif [ "$(git merge-base $oldrev $newrev)" = $oldrev ]; then - receive_mode=fast-forward - else - receive_mode=non-fast-forward - fi - - h=$(echo $ref | sed 's:^refs/heads/::') - - ${optionalString (branches != []) '' - if ! (echo "$h" | grep -qE "${concatStringsSep "|" branches}"); then - echo "we are not serving this branch: $h" - exit 0 - fi - ''} - # empty_tree=$(git hash-object -t tree /dev/null) - empty_tree=4b825dc6 - - id=$(echo $newrev | cut -b-7) - id2=$(echo $oldrev | cut -b-7) - if [ $newrev = $empty ]; then id=$empty_tree; fi - if [ $oldrev = $empty ]; then id2=$empty_tree; fi - - case $receive_mode in - create) - link="$cgit_endpoint/$GIT_SSH_REPO/?h=$h" - ;; - delete) - link="$cgit_endpoint/$GIT_SSH_REPO/ ($h)" - ;; - fast-forward|non-fast-forward) - link="$cgit_endpoint/$GIT_SSH_REPO/diff/?h=$h&id=$id&id2=$id2" - ;; - esac - - #$host $GIT_SSH_REPO $ref $link - add_message $(pink push) $link $(gray "($receive_mode)") - - ${optionalString verbose '' - add_message "$( - git log \ - --format="$(orange %h) %s $(gray '(%ar)')" \ - --reverse \ - $id2..$id - - git diff --stat $id2..$id \ - | sed '$!s/\(+*\)\(-*\)$/'$(green '\1')$(red '\2')'/' - )" - ''} - - done - - if test -n "''${message-}"; then - exec ${pkgs.irc-announce}/bin/irc-announce \ - "$server" \ - "$port" \ - "$nick" \ - "$channel" \ - "$message" - fi - ''; -} diff --git a/krebs/5pkgs/github-hosts-sync/default.nix b/krebs/5pkgs/github-hosts-sync/default.nix deleted file mode 100644 index cdfed468c..000000000 --- a/krebs/5pkgs/github-hosts-sync/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ pkgs, stdenv, ... }: - -stdenv.mkDerivation { - name = "github-hosts-sync"; - - src = pkgs.painload; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = - let - ca-bundle = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; - path = stdenv.lib.makeBinPath (with pkgs; [ - coreutils - findutils - git - gnugrep - gnused - nettools - openssh - socat - ]); - in - '' - mkdir -p $out/bin - - sed \ - 's,^main() {$,&\n export PATH=${path} GIT_SSL_CAINFO=${ca-bundle},' \ - < ./retiolum/scripts/github_hosts_sync/hosts-sync \ - > $out/bin/github-hosts-sync - - chmod +x $out/bin/github-hosts-sync - ''; -} diff --git a/krebs/5pkgs/go-shortener/default.nix b/krebs/5pkgs/go-shortener/default.nix deleted file mode 100644 index 996f7072a..000000000 --- a/krebs/5pkgs/go-shortener/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ stdenv, makeWrapper, callPackage, lib, buildEnv, fetchgit, nodePackages, nodejs }: - -with lib; - -let - np = (callPackage ) { - generated = ./packages.nix; - self = np; - }; - - node_env = buildEnv { - name = "node_env"; - paths = [ - np.redis - np."formidable" - ]; - pathsToLink = [ "/lib" ]; - ignoreCollisions = true; - }; - -in np.buildNodePackage { - name = "go-shortener"; - - src = fetchgit { - url = "http://cgit.lassul.us/go/"; - rev = "05d02740e0adbb36cc461323647f0c1e7f493156"; - sha256 = "6015c9a93317375ae8099c7ab982df0aa93a59ec2b48972e253887bb6ca0004f"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - deps = (filter (v: nixType v == "derivation") (attrValues np)); - - buildInputs = [ - nodejs - makeWrapper - ]; - - installPhase = '' - mkdir -p $out/bin - - cp index.js $out/ - cat > $out/go << EOF - ${nodejs}/bin/node $out/index.js - EOF - chmod +x $out/go - - wrapProgram $out/go \ - --prefix NODE_PATH : ${node_env}/lib/node_modules - - ln -s $out/go /$out/bin/go - ''; - -} diff --git a/krebs/5pkgs/go-shortener/packages.nix b/krebs/5pkgs/go-shortener/packages.nix deleted file mode 100644 index 9acfd7658..000000000 --- a/krebs/5pkgs/go-shortener/packages.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ self, fetchurl, fetchgit ? null, lib }: - -{ - by-spec."formidable"."*" = - self.by-version."formidable"."1.0.17"; - by-version."formidable"."1.0.17" = self.buildNodePackage { - name = "formidable-1.0.17"; - version = "1.0.17"; - bin = false; - src = fetchurl { - url = "http://registry.npmjs.org/formidable/-/formidable-1.0.17.tgz"; - name = "formidable-1.0.17.tgz"; - sha1 = "ef5491490f9433b705faa77249c99029ae348559"; - }; - deps = { - }; - optionalDependencies = { - }; - peerDependencies = []; - os = [ ]; - cpu = [ ]; - }; - "formidable" = self.by-version."formidable"."1.0.17"; - by-spec."redis"."*" = - self.by-version."redis"."2.1.0"; - by-version."redis"."2.1.0" = self.buildNodePackage { - name = "redis-2.1.0"; - version = "2.1.0"; - bin = false; - src = fetchurl { - url = "http://registry.npmjs.org/redis/-/redis-2.1.0.tgz"; - name = "redis-2.1.0.tgz"; - sha1 = "38acb208f90750250f9451219b73ff08ae907f94"; - }; - deps = { - }; - optionalDependencies = { - }; - peerDependencies = []; - os = [ ]; - cpu = [ ]; - }; - "redis" = self.by-version."redis"."2.1.0"; -} diff --git a/krebs/5pkgs/goify/default.nix b/krebs/5pkgs/goify/default.nix deleted file mode 100644 index 9c44aaeeb..000000000 --- a/krebs/5pkgs/goify/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: - -pkgs.writeBashBin "goify" '' - set -euf - - GO_HOST=''${GO_HOST:-go} - - while read line; do - echo "$line" | sed 's|https\?://\S*|\n&\n|g' | while read word; do - if echo "$word" | grep -q '^https\?:'; then - ${pkgs.curl}/bin/curl -Ss -F uri="$word" http://"$GO_HOST" \ - | tr -d '\r' - else - echo "$word" - fi - done | grep . | tr '\n' ' '; echo - done -'' diff --git a/krebs/5pkgs/hashPassword/default.nix b/krebs/5pkgs/hashPassword/default.nix deleted file mode 100644 index 3da65ad79..000000000 --- a/krebs/5pkgs/hashPassword/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, pkgs, ... }: - -pkgs.writeDashBin "hashPassword" '' - # usage: hashPassword - set -euf - - export PATH=${lib.makeBinPath (with pkgs; [ - coreutils - mkpasswd - openssl - ])} - - salt=$(openssl rand -base64 16 | tr -d '+=' | head -c 16) - exec mkpasswd -m sha-512 -S "$salt" -'' diff --git a/krebs/5pkgs/htgen/default.nix b/krebs/5pkgs/htgen/default.nix deleted file mode 100644 index 0fca8bdf2..000000000 --- a/krebs/5pkgs/htgen/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ coreutils, dash, fetchgit, gnused, stdenv, ucspi-tcp }: -with import ; -let - version = "1.2.2"; -in stdenv.mkDerivation { - name = "htgen-${version}"; - - src = fetchgit { - url = "http://cgit.krebsco.de/htgen"; - rev = "refs/tags/v${version}"; - sha256 = "0a8vn35vq6pxgk6d3d2cjp0vdxzq9nqf0zgkvnd6668v4cmdf91b"; - }; - - installPhase = '' - mkdir -p $out/bin - { - echo '#! ${dash}/bin/dash' - echo 'export PATH=${makeBinPath [ - coreutils - gnused - ucspi-tcp - ]}''${PATH+":$PATH"}' - sed 's:^Server=htgen$:&/${version}:' htgen - } > $out/bin/htgen - chmod +x $out/bin/htgen - cp -r examples $out - ''; -} diff --git a/krebs/5pkgs/irc-announce/default.nix b/krebs/5pkgs/irc-announce/default.nix deleted file mode 100644 index e1f4919d5..000000000 --- a/krebs/5pkgs/irc-announce/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ pkgs, lib, ... }: - -with lib; - -pkgs.writeDashBin "irc-announce" '' - set -euf - - export PATH=${makeSearchPath "bin" (with pkgs; [ - coreutils - gawk - gnused - netcat - nettools - ])} - - IRC_SERVER=$1 - IRC_PORT=$2 - IRC_NICK=$3$$ - IRC_CHANNEL=$4 - message=$5 - - export IRC_CHANNEL # for privmsg_cat - - # echo2 and cat2 are used output to both, stdout and stderr - # This is used to see what we send to the irc server. (debug output) - echo2() { echo "$*"; echo "$*" >&2; } - cat2() { tee /dev/stderr; } - - # privmsg_cat transforms stdin to a privmsg - privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; } - - # ircin is used to feed the output of netcat back to the "irc client" - # so we can implement expect-like behavior with sed^_^ - # XXX mkselfdestructingtmpfifo would be nice instead of this cruft - tmpdir=$(mktemp --tmpdir -d irc-announce_XXXXXXXX) - cd "$tmpdir" - mkfifo ircin - trap " - rm ircin - cd '$OLDPWD' - rmdir '$tmpdir' - trap - EXIT INT QUIT - " EXIT INT QUIT - - { - echo2 "USER $LOGNAME 0 * :$LOGNAME@$(hostname)" - echo2 "NICK $IRC_NICK" - - # wait for MODE message - sed -n '/^:[^ ]* MODE /q' - - echo2 "JOIN $IRC_CHANNEL" - - printf '%s' "$message" \ - | privmsg_cat \ - | cat2 - - echo2 "PART $IRC_CHANNEL" - - # wait for PART confirmation - sed -n '/:'"$IRC_NICK"'![^ ]* PART /q' - - echo2 'QUIT :Gone to have lunch' - } < ircin \ - | nc "$IRC_SERVER" "$IRC_PORT" | tee -a ircin -'' diff --git a/krebs/5pkgs/kpaste/default.nix b/krebs/5pkgs/kpaste/default.nix deleted file mode 100644 index d6823d584..000000000 --- a/krebs/5pkgs/kpaste/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ curl, writeDashBin }: - -writeDashBin "kpaste" '' - exec ${curl}/bin/curl -sS http://p.r --data-binary @- -'' diff --git a/krebs/5pkgs/krebspaste/default.nix b/krebs/5pkgs/krebspaste/default.nix deleted file mode 100644 index 31ad12780..000000000 --- a/krebs/5pkgs/krebspaste/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ writeDashBin, bepasty-client-cli }: - -# TODO use `execve` instead? -writeDashBin "krebspaste" '' - exec ${bepasty-client-cli}/bin/bepasty-cli -L 1m --url http://paste.r "$@" | sed '$ s/$/\/+inline/g' -'' diff --git a/krebs/5pkgs/krebszones/default.nix b/krebs/5pkgs/krebszones/default.nix deleted file mode 100644 index 9230192bd..000000000 --- a/krebs/5pkgs/krebszones/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, pkgs,python3Packages,fetchurl, ... }: - -# TODO: Prepare a diff of future and current -## ovh-zone export krebsco.de --config ~/secrets/krebs/cfg.json |sed 's/[ ]\+/ /g' | sort current -## sed 's/[ ]\+/ /g'/etc/zones/krebsco.de | sort > future -## diff future.sorted current.sorted - -python3Packages.buildPythonPackage rec { - name = "krebszones-${version}"; - version = "0.4.4"; - propagatedBuildInputs = with pkgs.python3Packages;[ - d2to1 # for setup to work - ovh - docopt - ]; - src = fetchurl { - url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz"; - sha256 = "1bzfc2b9468769j1yj93j12zdlccqbjiqfhql2larximh491sg4d"; - }; - meta = { - homepage = http://krebsco.de/; - description = "OVH Zone Upload"; - license = lib.licenses.wtfpl; - }; -} diff --git a/krebs/5pkgs/logf/default.nix b/krebs/5pkgs/logf/default.nix deleted file mode 100644 index ac95acb33..000000000 --- a/krebs/5pkgs/logf/default.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ lib, pkgs, ... }: - -with import ; - -let - default-host-colors = pkgs.writeJSON "logf.default-host-colors.json" { - }; - default-prio-colors = pkgs.writeJSON "logf.default-prio-colors.json" { - "0" = 196; # emerg - "1" = 160; # alert - "2" = 124; # crit - "3" = 009; # err - "4" = 011; # warning - "5" = 255; # notice - "6" = 250; # info - "7" = 139; # debug - "-" = 005; # undefined priority - }; - default-urgent = pkgs.writeJSON "logf.default-urgent.json" [ - ]; -in - -pkgs.writeDashBin "logf" '' - export LOGF_HOST_COLORS LOGF_PRIO_COLORS LOGF_URGENT - LOGF_HOST_COLORS=$(cat "''${LOGF_HOST_COLORS-${default-host-colors}}") - LOGF_PRIO_COLORS=$(cat "''${LOGF_PRIO_COLORS-${default-prio-colors}}") - LOGF_URGENT=$(cat "''${LOGF_URGENT-${default-urgent}}") - printf '%s\0' "$@" \ - | ${pkgs.findutils}/bin/xargs -0 -P 0 -n 1 ${pkgs.writeDash "logf-remote" '' - target=$1 - target_host=$(echo "$1" | sed 's/^.*@//;s/\..*//') - exec 3>&1 - 2>&1 1>&3 ssh "$target" -T \ - -o PreferredAuthentications=publickey \ - -o StrictHostKeyChecking=yes \ - exec journalctl -af -n 0 -o json \ - | stdbuf -oL jq -Rcf ${pkgs.writeJq "logf-remote-error.jq" '' - { - PRIORITY: "4", - MESSAGE: ., - SYSLOG_IDENTIFIER: env.target_host, - } - ''} - sleep 10m - exec "$0" "$@" - ''} \ - | ${pkgs.jq}/bin/jq -Rrf ${pkgs.writeJq "logf-filter.jq" '' - (env.LOGF_HOST_COLORS | fromjson) as $host_colors | - (env.LOGF_PRIO_COLORS | fromjson) as $prio_colors | - (env.LOGF_URGENT | fromjson | map("(\(.))") | join("|")) - as $urgent_regex | - - def when(c; f): if c then f else . end; - - # anaphoric gsub - def agsub(re; f): - # Don't try empty regex: https://github.com/stedolan/jq/issues/1206 - when(re != ""; gsub("(?\(re))"; .it | f)); - - # :: [int] -> sgr - def sgr: "\u001b[\(map(tostring) | join(";"))m"; - - # :: sgr - def rst: [] | sgr; - - # :: int -> sgr - def fg(i): [38,5,i]|sgr; - # TODO def fg(r;g;b): [38,2,r,g,b]|sgr; - # http://cvs.schmorp.de/rxvt-unicode/src/command.C?revision=1.570&view=markup&sortby=log&sortdir=down - - # (sgr; sgr) | (null; any) :: str -> str - def col(a; b): when(a != null; a + . + b); - def col(a): col(a; rst); - - - def p_time: - ._SOURCE_REALTIME_TIMESTAMP - | if . != null then . | fromjson | . / 1000000 else now end - | gmtime - | todateiso8601 - | col(fg(237)); - - def p_host: - ._HOSTNAME - | if . != null then . else "-" end - | col($host_colors[.]|when(. != null; fg(.))); - - def p_ident: - if .SYSLOG_IDENTIFIER != null then .SYSLOG_IDENTIFIER - else ._COMM end - | col(fg(244)); - - def p_message: - fg($prio_colors[if has("PRIORITY") then .PRIORITY else "-" end]) - as $prio_c | - .MESSAGE - | sub("\r$"; "") - | agsub($urgent_regex; "\(.)\u0007" | col(fg(219); $prio_c)) - | col($prio_c); - - try fromjson catch { - _SOURCE_REALTIME_TIMESTAMP: now | tostring | sub("[.]"; ""), - SYSLOG_IDENTIFIER: "logf/journalctl", - MESSAGE: ., - } | - - [ p_time - , p_host - , p_ident - , p_message - ] - | join(" ") - ''} -'' diff --git a/krebs/5pkgs/much/cabal.nix b/krebs/5pkgs/much/cabal.nix deleted file mode 100644 index 09bc7b5df..000000000 --- a/krebs/5pkgs/much/cabal.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ mkDerivation, aeson, attoparsec, base, base64-bytestring -, blaze-builder, blessings, bytestring, case-insensitive -, containers, deepseq, directory, docopt, email-header, fetchgit -, filepath, friendly-time, hyphenation, linebreak, old-locale -, process, random, rosezipper, safe, scanner, split, stdenv -, terminal-size, text, time, transformers, transformers-compat -, unix, vector -}: -mkDerivation { - pname = "much"; - version = "1.1.0"; - src = fetchgit { - url = "http://cgit.ni.krebsco.de/much"; - sha256 = "1325554zymr1dd0clj8c5ygl70c791csvs0hz33jcfr6b8wysdrl"; - rev = "dfec37d848e11c00d9b7f03295af1fc7b0e83ef5"; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - aeson attoparsec base base64-bytestring blaze-builder blessings - bytestring case-insensitive containers deepseq directory docopt - email-header filepath friendly-time hyphenation linebreak - old-locale process random rosezipper safe scanner split - terminal-size text time transformers transformers-compat unix - vector - ]; - license = stdenv.lib.licenses.mit; -} diff --git a/krebs/5pkgs/much/default.nix b/krebs/5pkgs/much/default.nix deleted file mode 100644 index cf55eb537..000000000 --- a/krebs/5pkgs/much/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ haskellPackages, ... }: - -haskellPackages.callPackage ./cabal.nix {} diff --git a/krebs/5pkgs/netcup/default.nix b/krebs/5pkgs/netcup/default.nix deleted file mode 100644 index d1f46299d..000000000 --- a/krebs/5pkgs/netcup/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ coreutils, curl, fetchgit, gawk, gnugrep, gnused, jq, stdenv, w3m, ... }: -with import ; -let - readJSON = path: fromJSON (readFile path); - sed.escape = replaceChars ["/"] ["\\/"]; # close enough - PATH = makeBinPath [ - coreutils - curl - gawk - gnugrep - gnused - jq - w3m - ]; -in -stdenv.mkDerivation { - name = "netcup-1.0.0"; - src = fetchgit { - url = "http://cgit.ni.krebsco.de/netcup"; - rev = "refs/tags/v1.0.0"; - sha256 = "1rn7bncfhjw0bqjbvj38m7lks4nyf5qcvkj9dg0zr99ba6dylzx5"; - }; - phases = [ "unpackPhase" "patchPhase" "installPhase" ]; - patchPhase = '' - path=${shell.escape (sed.escape PATH)} - sed -i "1s/.*/&\nPATH=$path/" vcp - ''; - installPhase = '' - mkdir -p $out/bin - cp vcp $out/bin - ''; -} diff --git a/krebs/5pkgs/newsbot-js/default.nix b/krebs/5pkgs/newsbot-js/default.nix deleted file mode 100644 index b52454ca4..000000000 --- a/krebs/5pkgs/newsbot-js/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ stdenv, makeWrapper, callPackage, lib, buildEnv, fetchgit, nodePackages, nodejs }: - -with lib; - -let - np = (callPackage ) { - generated = ./packages.nix; - self = np; - }; - - node_env = buildEnv { - name = "node_env"; - paths = [ - np.feedparser - np.form-data - np.irc - np.request - np.shell-quote - ]; - pathsToLink = [ "/lib" ]; - ignoreCollisions = true; - }; - -in np.buildNodePackage { - name = "newsbot-js"; - - src = fetchgit { - url = "http://cgit.prism/newsbot-js/"; - rev = "09e01639be4ea9691cf5b33f7d9057b68ac98079"; - sha256 = "28ffbed66c2efcd194c47823c7d5d5533c80852fc0cf9d9d4ee609c71d50c142"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - deps = (filter (v: nixType v == "derivation") (attrValues np)); - - buildInputs = [ - nodejs - makeWrapper - ]; -