From 13be61e360e769ad28fc48df20524e483cf00efc Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 21 Dec 2017 01:24:11 +0100 Subject: eximlog: init --- krebs/5pkgs/simple/eximlog.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 krebs/5pkgs/simple/eximlog.nix (limited to 'krebs/5pkgs') 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 ; + 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)" + + ' +'' -- cgit v1.2.3 From 4ab161be0aed7598ebbc32ed95d13e979ab2dbcf Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 28 Dec 2017 16:01:57 +0100 Subject: pkgs.Reaktor: add help for shack-correct --- krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs') 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}--" -- cgit v1.2.3 From 161c810b7470727da320b617b874002f43c8fd6f Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 28 Dec 2017 16:02:32 +0100 Subject: forticlientsslvpn: use archive.org --- krebs/5pkgs/simple/fortclientsslvpn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs/5pkgs') 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" ]; -- cgit v1.2.3 From 9babbab936696b12ee850274529492a57cff523b Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:39:22 +0100 Subject: init bitlbee-discord --- krebs/5pkgs/simple/bitlbee-discord/default.nix | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 krebs/5pkgs/simple/bitlbee-discord/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/bitlbee-discord/default.nix b/krebs/5pkgs/simple/bitlbee-discord/default.nix new file mode 100644 index 000000000..da6a58801 --- /dev/null +++ b/krebs/5pkgs/simple/bitlbee-discord/default.nix @@ -0,0 +1,29 @@ +{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, 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 = [ pkgconfig ]; + buildInputs = [ bitlbee autoconf automake libtool 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; + }; +} -- cgit v1.2.3 From bfde8bea27144c441f023fca6ac888c3baec0aeb Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 2 Jan 2018 12:53:44 +0100 Subject: bitlbee-discord: cleanup --- krebs/5pkgs/simple/bitlbee-discord/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/bitlbee-discord/default.nix b/krebs/5pkgs/simple/bitlbee-discord/default.nix index da6a58801..c01b87d6b 100644 --- a/krebs/5pkgs/simple/bitlbee-discord/default.nix +++ b/krebs/5pkgs/simple/bitlbee-discord/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkgconfig, glib }: +{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoreconfHook, pkgconfig, glib }: with stdenv.lib; stdenv.mkDerivation rec { @@ -11,8 +11,8 @@ stdenv.mkDerivation rec { sha256 = "1ci9a12c6zg8d6i9f95pq6dal79cp4klmmsyj8ag2gin90kl3x95"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ bitlbee autoconf automake libtool glib ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ bitlbee glib ]; preConfigure = '' export BITLBEE_PLUGINDIR=$out/lib/bitlbee -- cgit v1.2.3 From c25054b4a0c034b9c410799bf29486820d9778d7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 2 Jan 2018 12:59:01 +0100 Subject: writers: add deps & flake8 to writePython{2,3} --- krebs/5pkgs/writers.nix | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix index 6e67ed699..0cc4efb51 100644 --- a/krebs/5pkgs/writers.nix +++ b/krebs/5pkgs/writers.nix @@ -283,27 +283,27 @@ with import ; ${pkgs.cabal2nix}/bin/cabal2nix ${path} > $out ''); - writePython2 = name: text: - assert (with types; either absolute-pathname filename).check name; - pkgs.writeOut (baseNameOf name) { - ${optionalString (types.absolute-pathname.check name) name} = { - check = pkgs.writeDash "python2check.sh" '' - exec ${pkgs.python2}/bin/python -m py_compile "$1" - ''; - inherit text; - }; - }; + writePython2 = deps: + let + py = pkgs.python2.withPackages(ps: attrVals deps ps); + in + pkgs.makeScriptWriter { + interpreter = "${py}/bin/python"; + check = pkgs.writeDash "python2check.sh" '' + exec ${pkgs.python2Packages.flake8}/bin/flake8 --show-source "$1" + ''; + }; - writePython3 = name: text: - assert (with types; either absolute-pathname filename).check name; - pkgs.writeOut (baseNameOf name) { - ${optionalString (types.absolute-pathname.check name) name} = { - check = pkgs.writeDash "python3check.sh" '' - exec ${pkgs.python3}/bin/python -m py_compile "$textPath" - ''; - inherit text; - }; - }; + writePython3 = deps: + let + py = pkgs.python3.withPackages(ps: attrVals deps ps); + in + pkgs.makeScriptWriter { + interpreter = "${py}/bin/python"; + check = pkgs.writeDash "python3check.sh" '' + exec ${pkgs.python3Packages.flake8}/bin/flake8 --show-source "$1" + ''; + }; writeSed = pkgs.makeScriptWriter { interpreter = "${pkgs.gnused}/bin/sed -f"; -- cgit v1.2.3 From 5d7c8bf5b4e718772e56512a878c0e65c154c190 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 2 Jan 2018 12:59:18 +0100 Subject: writers: add writePython{2,3}Bin --- krebs/5pkgs/writers.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/writers.nix b/krebs/5pkgs/writers.nix index 0cc4efb51..a48fc0f87 100644 --- a/krebs/5pkgs/writers.nix +++ b/krebs/5pkgs/writers.nix @@ -294,6 +294,9 @@ with import ; ''; }; + writePython2Bin = d: name: + pkgs.writePython2 d "/bin/${name}"; + writePython3 = deps: let py = pkgs.python3.withPackages(ps: attrVals deps ps); @@ -305,6 +308,9 @@ with import ; ''; }; + writePython3Bin = d: name: + pkgs.writePython3 d "/bin/${name}"; + writeSed = pkgs.makeScriptWriter { interpreter = "${pkgs.gnused}/bin/sed -f"; }; -- cgit v1.2.3 From 68733092391f43d0fd9e04f095cdad826e2d54e8 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 2 Jan 2018 21:18:51 +0100 Subject: stockholm: {shell => cmds}.get-version --- krebs/5pkgs/simple/stockholm/default.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'krebs/5pkgs') 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: -- cgit v1.2.3