summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r--krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh2
-rw-r--r--krebs/5pkgs/simple/bitlbee-discord/default.nix29
-rw-r--r--krebs/5pkgs/simple/eximlog.nix28
-rw-r--r--krebs/5pkgs/simple/fortclientsslvpn/default.nix4
-rw-r--r--krebs/5pkgs/simple/stockholm/default.nix23
5 files changed, 72 insertions, 14 deletions
diff --git a/krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh b/krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh
index 3b4d04f80..d500b3cb3 100644
--- a/krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh
+++ b/krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh
@@ -2,5 +2,5 @@
set -eu
printf "Sie meinten wohl \""
echo -n $@ | sed 's/Shack/shack/g'
-echo "\""
+echo "\" check out https://wiki.shackspace.de/project/logo_and_ci#name_ci"
echo "${_from}--"
diff --git a/krebs/5pkgs/simple/bitlbee-discord/default.nix b/krebs/5pkgs/simple/bitlbee-discord/default.nix
new file mode 100644
index 000000000..c01b87d6b
--- /dev/null
+++ b/krebs/5pkgs/simple/bitlbee-discord/default.nix
@@ -0,0 +1,29 @@
+{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoreconfHook, pkgconfig, glib }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+ name = "bitlbee-discord-2017-12-27";
+
+ src = fetchFromGitHub {
+ rev = "6a03db169ad44fee55609ecd16e19f3c0f99a182";
+ owner = "sm00th";
+ repo = "bitlbee-discord";
+ sha256 = "1ci9a12c6zg8d6i9f95pq6dal79cp4klmmsyj8ag2gin90kl3x95";
+ };
+
+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
+ buildInputs = [ bitlbee glib ];
+
+ preConfigure = ''
+ export BITLBEE_PLUGINDIR=$out/lib/bitlbee
+ ./autogen.sh
+ '';
+
+ meta = {
+ description = "Bitlbee plugin for Discord";
+
+ homepage = https://github.com/sm00th/bitlbee-discord;
+ license = licenses.gpl2Plus;
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/krebs/5pkgs/simple/eximlog.nix b/krebs/5pkgs/simple/eximlog.nix
new file mode 100644
index 000000000..2d64e13e9
--- /dev/null
+++ b/krebs/5pkgs/simple/eximlog.nix
@@ -0,0 +1,28 @@
+{ jq, systemd, writeDashBin }:
+
+let
+ lib = import <stockholm/lib>;
+ user = "exim"; # TODO make this configurable
+in
+
+# TODO execute eximlog only if journalctl doesn't fail
+# bash's set -o pipefail isn't enough
+
+writeDashBin "eximlog" ''
+ ${systemd}/bin/journalctl \
+ -u ${lib.shell.escape user} \
+ -o short-unix \
+ "$@" \
+ |
+ ${jq}/bin/jq -Rr '
+ # Only select lines that start with a timestamp
+ select(test("^[0-9]")) |
+
+ split(" ") |
+ (.[0] | tonumber) as $time |
+ (.[3:] | join(" ")) as $message |
+
+ "\($time | strftime("%Y-%m-%d %H:%M:%S %z")) \($message)"
+
+ '
+''
diff --git a/krebs/5pkgs/simple/fortclientsslvpn/default.nix b/krebs/5pkgs/simple/fortclientsslvpn/default.nix
index cbcfab05f..1f86d6fe4 100644
--- a/krebs/5pkgs/simple/fortclientsslvpn/default.nix
+++ b/krebs/5pkgs/simple/fortclientsslvpn/default.nix
@@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
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;
+ url = 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" ];
diff --git a/krebs/5pkgs/simple/stockholm/default.nix b/krebs/5pkgs/simple/stockholm/default.nix
index 5705f086d..53c1ca5ba 100644
--- a/krebs/5pkgs/simple/stockholm/default.nix
+++ b/krebs/5pkgs/simple/stockholm/default.nix
@@ -92,6 +92,17 @@
-I "$target_path"
'');
+ cmds.get-version = pkgs.writeDash "get-version" ''
+ set -efu
+ hostname=''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)}
+ version=git.$(${pkgs.git}/bin/git describe --always --dirty)
+ case $version in (*-dirty)
+ version=$version@$hostname
+ esac
+ date=$(${pkgs.coreutils}/bin/date +%y.%m)
+ echo "$date.$version"
+ '';
+
cmds.install = pkgs.withGetopt {
force-populate = { default = /* sh */ "false"; switch = true; };
quiet = { default = /* sh */ "false"; switch = true; };
@@ -205,7 +216,7 @@
init.env = pkgs.writeText "init.env" /* sh */ ''
export HOSTNAME="$(${pkgs.nettools}/bin/hostname)"
- export STOCKHOLM_VERSION="''${STOCKHOLM_VERSION-$(${shell.get-version})}"
+ export STOCKHOLM_VERSION="''${STOCKHOLM_VERSION-$(${cmds.get-version})}"
export quiet
export system
@@ -274,16 +285,6 @@
fi
'';
- shell.get-version = pkgs.writeDash "stockholm.get-version" ''
- set -efu
- version=git.$(${pkgs.git}/bin/git describe --always --dirty)
- case $version in (*-dirty)
- version=$version@$HOSTNAME
- esac
- date=$(${pkgs.coreutils}/bin/date +%y.%m)
- echo "$date.$version"
- '';
-
in
pkgs.writeOut "stockholm" (lib.mapAttrs' (name: link: