diff options
Diffstat (limited to 'krebs/5pkgs')
37 files changed, 153 insertions, 162 deletions
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index c077bf4d7..f9ed6439c 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,18 +1,23 @@ -with import <stockholm/lib>; - +let + stockholm.lib = import ../../lib; +in +with stockholm.lib; self: super: - -# Import files and subdirectories like they are overlays. -foldl' mergeAttrs {} +fix (foldl' (flip extends) (self: super) ( + [ + (self: super: { inherit stockholm; }) + ] + ++ (map - (name: import (./. + "/${name}") self super) + (name: import (./. + "/${name}")) (filter (name: name != "default.nix" && !hasPrefix "." name) (attrNames (readDir ./.)))) - -// - -{ - brockman = self.haskellPackages.brockman; - reaktor2 = self.haskellPackages.reaktor2; -} + ++ + [ + (self: super: { + brockman = self.haskellPackages.brockman; + reaktor2 = self.haskellPackages.reaktor2; + }) + ] +)) diff --git a/krebs/5pkgs/haskell/X11-aeson.nix b/krebs/5pkgs/haskell/X11-aeson.nix index 7db6c28a8..103d87faa 100644 --- a/krebs/5pkgs/haskell/X11-aeson.nix +++ b/krebs/5pkgs/haskell/X11-aeson.nix @@ -1,4 +1,4 @@ -{ mkDerivation, aeson, base, fetchgit, stdenv, X11 }: +{ mkDerivation, aeson, base, fetchgit, lib, X11 }: mkDerivation { pname = "X11-aeson"; version = "1.0.0"; @@ -9,5 +9,5 @@ mkDerivation { fetchSubmodules = true; }; libraryHaskellDepends = [ aeson base X11 ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/blessings.nix b/krebs/5pkgs/haskell/blessings.nix index b0e81fdc1..2176db2ff 100644 --- a/krebs/5pkgs/haskell/blessings.nix +++ b/krebs/5pkgs/haskell/blessings.nix @@ -1,6 +1,7 @@ -with import <stockholm/lib>; -{ mkDerivation, base, fetchgit, hspec, QuickCheck, stdenv, text }: let +{ mkDerivation, base, fetchgit, hspec, QuickCheck, lib, stockholm, text }: +with stockholm.lib; +let cfg = { "18.03" = { version = "1.1.0"; @@ -23,5 +24,5 @@ in mkDerivation { testHaskellDepends = [ base hspec QuickCheck ]; doHaddock = false; # WTFPL is the true license, which is unknown to cabal. - license = stdenv.lib.licenses.wtfpl; + license = lib.licenses.wtfpl; } diff --git a/krebs/5pkgs/haskell/brockman/default.nix b/krebs/5pkgs/haskell/brockman/default.nix index d3dbcd89c..de41d1886 100644 --- a/krebs/5pkgs/haskell/brockman/default.nix +++ b/krebs/5pkgs/haskell/brockman/default.nix @@ -2,7 +2,7 @@ , case-insensitive, conduit, containers, directory, feed, filepath , hashable, hslogger, html-entity, http-client, irc-conduit, lens , lrucache, lrucaching, network, optparse-applicative, random, safe -, stdenv, text, time, timerep, wreq +, lib, text, time, timerep, wreq , fetchFromGitHub }: mkDerivation rec { @@ -22,5 +22,5 @@ mkDerivation rec { http-client irc-conduit lens lrucache lrucaching network optparse-applicative random safe text time timerep wreq ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/default.nix b/krebs/5pkgs/haskell/default.nix index e824699f9..98cbcb3b9 100644 --- a/krebs/5pkgs/haskell/default.nix +++ b/krebs/5pkgs/haskell/default.nix @@ -1,8 +1,9 @@ -with import <stockholm/lib>; +self: super: +with self.stockholm.lib; + let overrides = self: super: mapNixDir (path: self.callPackage path {}) ./.; in -self: super: { haskell = super.haskell // { packages = mapAttrs (name: value: diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix index 94b33e28b..e1e9d423f 100644 --- a/krebs/5pkgs/haskell/email-header.nix +++ b/krebs/5pkgs/haskell/email-header.nix @@ -1,8 +1,10 @@ -with import <stockholm/lib>; { mkDerivation, attoparsec, base, base64-bytestring, bytestring , case-insensitive, containers, exceptions, fetchgit, QuickCheck -, stdenv, tasty, tasty-quickcheck, text, text-icu, time -}: let +, lib, stockholm, tasty, tasty-quickcheck, text, text-icu, time +}: +with stockholm.lib; + +let cfg = { "18.03" = { @@ -40,5 +42,5 @@ in mkDerivation { jailbreak = true; homepage = "http://github.com/knrafto/email-header"; description = "Parsing and rendering of email and MIME headers"; - license = stdenv.lib.licenses.bsd3; + license = lib.licenses.bsd3; } diff --git a/krebs/5pkgs/haskell/hack.nix b/krebs/5pkgs/haskell/hack.nix index 4e157107e..37ef94e46 100644 --- a/krebs/5pkgs/haskell/hack.nix +++ b/krebs/5pkgs/haskell/hack.nix @@ -1,6 +1,5 @@ { mkDerivation, base, blessings, containers, data-default, fetchgit -, lens, mtl, old-locale, process, scanner, stdenv, time, unix -, zippers +, lens, lib, mtl, old-locale, process, scanner, time, unix, zippers }: mkDerivation { pname = "hack"; @@ -18,5 +17,5 @@ mkDerivation { base blessings containers data-default lens mtl old-locale process scanner time unix zippers ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/kirk.nix b/krebs/5pkgs/haskell/kirk.nix index 073e5d505..d6fdec4c9 100644 --- a/krebs/5pkgs/haskell/kirk.nix +++ b/krebs/5pkgs/haskell/kirk.nix @@ -1,5 +1,5 @@ -{ mkDerivation, async, base, bytestring, fetchgit, network -, optparse-applicative, stdenv, text +{ mkDerivation, async, base, bytestring, fetchgit, lib, network +, optparse-applicative, text }: mkDerivation { pname = "kirk"; @@ -8,6 +8,7 @@ mkDerivation { url = "http://cgit.krebsco.de/kirk"; sha256 = "1acsmmc485c54axpy9bd0320j18hs261vl1vdxns4n04sxzqd7k0"; rev = "cdf3cb373af8f9b03a9487a63eb32e0226913589"; + fetchSubmodules = true; }; isLibrary = true; isExecutable = true; @@ -17,5 +18,5 @@ mkDerivation { executableHaskellDepends = [ async base network optparse-applicative text ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/much.nix b/krebs/5pkgs/haskell/much.nix index 0a5453c0c..f3aad2ee6 100644 --- a/krebs/5pkgs/haskell/much.nix +++ b/krebs/5pkgs/haskell/much.nix @@ -2,9 +2,9 @@ , blaze-builder, blessings, bytestring, case-insensitive , containers, data-default, deepseq, directory, either , email-header, fetchgit, filepath, friendly-time, http-types -, hyphenation, linebreak, network, old-locale, optparse-applicative -, process, random, rosezipper, safe, scanner, servant-server, split -, stdenv, terminal-size, text, time, transformers +, hyphenation, lib, linebreak, network, old-locale +, optparse-applicative, process, random, rosezipper, safe, scanner +, servant-server, split, terminal-size, text, time, transformers , transformers-compat, unix, vector, wai, warp }: mkDerivation { @@ -32,5 +32,5 @@ mkDerivation { data-default deepseq directory filepath hyphenation linebreak process rosezipper safe scanner text time transformers unix ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/news.nix b/krebs/5pkgs/haskell/news.nix index ba5e7a5e1..0274ac8d5 100644 --- a/krebs/5pkgs/haskell/news.nix +++ b/krebs/5pkgs/haskell/news.nix @@ -1,5 +1,5 @@ { mkDerivation, base, bloomfilter, bytestring, feed, fetchgit, lens -, stdenv, wreq +, lib, wreq }: mkDerivation { pname = "news"; @@ -14,5 +14,5 @@ mkDerivation { executableHaskellDepends = [ base bloomfilter bytestring feed lens wreq ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/reaktor2/default.nix b/krebs/5pkgs/haskell/reaktor2/default.nix index 6a48f865c..d41d8d818 100644 --- a/krebs/5pkgs/haskell/reaktor2/default.nix +++ b/krebs/5pkgs/haskell/reaktor2/default.nix @@ -2,7 +2,7 @@ , bytestring, containers, data-default, fetchgit, filepath , hashable, lens, lens-aeson, network, network-simple , network-simple-tls, network-uri, pcre-light, process, random -, servant-server, stdenv, string-conversions, stringsearch, text +, servant-server, lib, string-conversions, stringsearch, text , time, transformers, unagi-chan, unix, unordered-containers , vector, wai, warp }: @@ -24,5 +24,5 @@ mkDerivation rec { random servant-server string-conversions stringsearch text time transformers unagi-chan unix unordered-containers vector wai warp ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/recht.nix b/krebs/5pkgs/haskell/recht.nix index 7d884a9fa..bf62d3697 100644 --- a/krebs/5pkgs/haskell/recht.nix +++ b/krebs/5pkgs/haskell/recht.nix @@ -1,6 +1,6 @@ { mkDerivation, ansi-terminal, async, base, binary, bytestring , data-default, directory, filepath, megaparsec -, optparse-applicative, pandoc, random, safe, scalpel, stdenv, text +, optparse-applicative, pandoc, random, safe, scalpel, lib, text , time , fetchFromGitHub }: @@ -21,5 +21,5 @@ mkDerivation rec { filepath megaparsec optparse-applicative pandoc random safe scalpel text time ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/scanner.nix b/krebs/5pkgs/haskell/scanner.nix index 28f89b069..a317e575e 100644 --- a/krebs/5pkgs/haskell/scanner.nix +++ b/krebs/5pkgs/haskell/scanner.nix @@ -1,4 +1,4 @@ -{ mkDerivation, base, fetchgit, stdenv }: +{ mkDerivation, base, fetchgit, lib }: mkDerivation { pname = "scanner"; version = "1.0.1"; @@ -9,5 +9,5 @@ mkDerivation { fetchSubmodules = true; }; libraryHaskellDepends = [ base ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/xmonad-aeson.nix b/krebs/5pkgs/haskell/xmonad-aeson.nix index 3fccab469..d27f9c783 100644 --- a/krebs/5pkgs/haskell/xmonad-aeson.nix +++ b/krebs/5pkgs/haskell/xmonad-aeson.nix @@ -1,4 +1,4 @@ -{ mkDerivation, aeson, base, fetchgit, stdenv, X11-aeson, xmonad }: +{ mkDerivation, aeson, base, fetchgit, lib, X11-aeson, xmonad }: mkDerivation { pname = "xmonad-aeson"; version = "1.0.0"; @@ -9,5 +9,5 @@ mkDerivation { fetchSubmodules = true; }; libraryHaskellDepends = [ aeson base X11-aeson xmonad ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/haskell/xmonad-stockholm.nix b/krebs/5pkgs/haskell/xmonad-stockholm.nix index 1b197b914..751f26749 100644 --- a/krebs/5pkgs/haskell/xmonad-stockholm.nix +++ b/krebs/5pkgs/haskell/xmonad-stockholm.nix @@ -1,4 +1,4 @@ -{ mkDerivation, base, containers, fetchgit, filepath, stdenv, unix, X11, X11-xft , X11-xshape, xmonad, xmonad-contrib +{ mkDerivation, base, containers, fetchgit, filepath, lib, unix, X11, X11-xft , X11-xshape, xmonad, xmonad-contrib }: mkDerivation rec { pname = "xmonad-stockholm"; @@ -11,5 +11,5 @@ mkDerivation rec { libraryHaskellDepends = [ base containers filepath unix X11 X11-xft X11-xshape xmonad xmonad-contrib ]; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix index c2149ae55..2291132ba 100644 --- a/krebs/5pkgs/override/default.nix +++ b/krebs/5pkgs/override/default.nix @@ -1,4 +1,3 @@ -with import <stockholm/lib>; self: super: { bitlbee-facebook = super.bitlbee-facebook.overrideAttrs (old: { diff --git a/krebs/5pkgs/simple/bling/default.nix b/krebs/5pkgs/simple/bling/default.nix index 8d6207f65..1c8610325 100644 --- a/krebs/5pkgs/simple/bling/default.nix +++ b/krebs/5pkgs/simple/bling/default.nix @@ -1,6 +1,5 @@ -{ imagemagick, runCommand, ... }: - -with import <stockholm/lib>; +{ imagemagick, runCommand, stockholm, ... }: +with stockholm.lib; let krebs-v2 = [ diff --git a/krebs/5pkgs/simple/buildbot-classic/sqlparse.nix b/krebs/5pkgs/simple/buildbot-classic/sqlparse.nix index b6aee633e..2cbb51845 100644 --- a/krebs/5pkgs/simple/buildbot-classic/sqlparse.nix +++ b/krebs/5pkgs/simple/buildbot-classic/sqlparse.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonPackage , fetchPypi , pytest @@ -22,7 +22,7 @@ buildPythonPackage rec { # Package supports 3.x, but tests are clearly 2.x only. doCheck = !isPy3k; - meta = with stdenv.lib; { + meta = with lib; { description = "Non-validating SQL parser for Python"; longDescription = '' Provides support for parsing, splitting and formatting SQL statements. diff --git a/krebs/5pkgs/simple/cgit-clear-cache.nix b/krebs/5pkgs/simple/cgit-clear-cache.nix index 28402c39c..31a2eccb3 100644 --- a/krebs/5pkgs/simple/cgit-clear-cache.nix +++ b/krebs/5pkgs/simple/cgit-clear-cache.nix @@ -1,8 +1,6 @@ -with import <stockholm/lib>; - -{ cache-root ? "/tmp/cgit", findutils, writeDashBin }: +{ cache-root ? "/tmp/cgit", findutils, stockholm, writeDashBin }: writeDashBin "cgit-clear-cache" '' set -efu - ${findutils}/bin/find ${shell.escape cache-root} -type f -delete + ${findutils}/bin/find ${stockholm.lib.shell.escape cache-root} -type f -delete '' diff --git a/krebs/5pkgs/simple/default.nix b/krebs/5pkgs/simple/default.nix index 6ba4fec83..76ad6ff10 100644 --- a/krebs/5pkgs/simple/default.nix +++ b/krebs/5pkgs/simple/default.nix @@ -1,18 +1,16 @@ -with import <stockholm/lib>; - self: super: let # This callPackage will try to detect obsolete overrides. + lib = super.stockholm.lib; callPackage = path: args: let override = self.callPackage path args; - upstream = optionalAttrs (override ? "name") - (super.${(parseDrvName override.name).name} or {}); + upstream = lib.optionalAttrs (override ? "name") + (super.${(lib.parseDrvName override.name).name} or {}); in if upstream ? "name" && override ? "name" && - compareVersions upstream.name override.name != -1 - then trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override + lib.compareVersions upstream.name override.name != -1 + then lib.trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override else override; in - - mapNixDir (path: callPackage path {}) ./. + lib.mapNixDir (path: callPackage path {}) ./. diff --git a/krebs/5pkgs/simple/eximlog.nix b/krebs/5pkgs/simple/eximlog.nix index 2d64e13e9..9e5ae8d63 100644 --- a/krebs/5pkgs/simple/eximlog.nix +++ b/krebs/5pkgs/simple/eximlog.nix @@ -1,7 +1,7 @@ -{ jq, systemd, writeDashBin }: +{ jq, stockholm, systemd, writeDashBin }: let - lib = import <stockholm/lib>; + lib = stockholm.lib; user = "exim"; # TODO make this configurable in diff --git a/krebs/5pkgs/simple/flameshot-once/default.nix b/krebs/5pkgs/simple/flameshot-once/default.nix index 20c709fb5..0524c2cfa 100644 --- a/krebs/5pkgs/simple/flameshot-once/default.nix +++ b/krebs/5pkgs/simple/flameshot-once/default.nix @@ -1,5 +1,5 @@ -with import <stockholm/lib>; -{ pkgs, ... }@args: +{ pkgs, stockholm, ... }@args: +with stockholm.lib; let # config cannot be declared in the input attribute set because that would diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 8aacbfa42..991b46118 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -1,5 +1,5 @@ -with import <stockholm/lib>; { config, pkgs }: +with pkgs.stockholm.lib; let # Refs https://github.com/lupoDharkael/flameshot/blob/master/src/widgets/capture/capturebutton.h diff --git a/krebs/5pkgs/simple/fzfmenu/default.nix b/krebs/5pkgs/simple/fzfmenu/default.nix index 537b90f42..f208f6a3e 100644 --- a/krebs/5pkgs/simple/fzfmenu/default.nix +++ b/krebs/5pkgs/simple/fzfmenu/default.nix @@ -1,5 +1,5 @@ -with import <stockholm/lib>; -{ pkgs, ... }@args: +{ pkgs, stockholm, ... }@args: +with stockholm.lib; let # config cannot be declared in the input attribute set because that would diff --git a/krebs/5pkgs/simple/git-hooks/default.nix b/krebs/5pkgs/simple/git-hooks/default.nix index acf34ad69..00a593be3 100644 --- a/krebs/5pkgs/simple/git-hooks/default.nix +++ b/krebs/5pkgs/simple/git-hooks/default.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ pkgs, stockholm, ... }: -with import <stockholm/lib>; +with stockholm.lib; { # TODO irc-announce should return a derivation diff --git a/krebs/5pkgs/simple/htgen-cyberlocker/default.nix b/krebs/5pkgs/simple/htgen-cyberlocker/default.nix index 515ea3cf9..c7d7ebfd8 100644 --- a/krebs/5pkgs/simple/htgen-cyberlocker/default.nix +++ b/krebs/5pkgs/simple/htgen-cyberlocker/default.nix @@ -1,5 +1,6 @@ -with import <stockholm/lib>; -{ pkgs, stdenv }: +{ pkgs, stockholm, stdenv }: +with stockholm.lib; + stdenv.mkDerivation rec { pname = "htgen-cyberlocker"; version = "1.0.0"; diff --git a/krebs/5pkgs/simple/htgen-cyberlocker/src/htgen-cyberlocker b/krebs/5pkgs/simple/htgen-cyberlocker/src/htgen-cyberlocker index ab9c4e8e3..5ca0ddd3e 100644 --- a/krebs/5pkgs/simple/htgen-cyberlocker/src/htgen-cyberlocker +++ b/krebs/5pkgs/simple/htgen-cyberlocker/src/htgen-cyberlocker @@ -1,3 +1,10 @@ +emptyok_response() {( + printf "HTTP/1.1 204 OK\r\n" + printf 'Connection: close\r\n' + printf 'Server: %s\r\n' "$Server" + printf '\r\n' +)} + delete_response() { jq -n -r \ --arg server "$Server" \ @@ -44,7 +51,10 @@ read_uri() { } uri=$(read_uri "$Request_URI") -path=$(jq -nr --argjson uri "$uri" '$uri.path') +path=$(jq -nr --argjson uri "$uri" ' + $uri.path | + gsub("/+"; "/") +') case "$Method $path" in 'POST /'*|'PUT /'*) @@ -57,6 +67,8 @@ case "$Method $path" in mkdir -v -p $STATEDIR/items >&2 cp -v $content $item >&2 + + emptyok_response exit ;; 'GET /'*) diff --git a/krebs/5pkgs/simple/htgen-imgur/default.nix b/krebs/5pkgs/simple/htgen-imgur/default.nix index fe0b2ab04..f429ff7a6 100644 --- a/krebs/5pkgs/simple/htgen-imgur/default.nix +++ b/krebs/5pkgs/simple/htgen-imgur/default.nix @@ -1,5 +1,4 @@ -with import <stockholm/lib>; -{ attr, coreutils, exiv2, findutils, gnugrep, jq, nix, utillinux, stdenv }: +{ attr, coreutils, exiv2, findutils, gnugrep, jq, nix, stockholm, utillinux, stdenv }: stdenv.mkDerivation rec { pname = "htgen-imgur"; version = "1.0.0"; @@ -9,7 +8,7 @@ stdenv.mkDerivation rec { buildPhase = '' ( exec > htgen-imgur - echo PATH=${makeBinPath [ + echo PATH=${stockholm.lib.makeBinPath [ attr coreutils exiv2 @@ -18,7 +17,7 @@ stdenv.mkDerivation rec { jq nix utillinux ]} - echo STATEDIR=${shell.escape "\${STATEDIR-$HOME}"} + echo STATEDIR=${stockholm.lib.shell.escape "\${STATEDIR-$HOME}"} cat $src/htgen-imgur ) ''; diff --git a/krebs/5pkgs/simple/irc-announce/default.nix b/krebs/5pkgs/simple/irc-announce/default.nix index 5797b3667..7b2af0307 100644 --- a/krebs/5pkgs/simple/irc-announce/default.nix +++ b/krebs/5pkgs/simple/irc-announce/default.nix @@ -1,18 +1,8 @@ { 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_$$ @@ -20,57 +10,15 @@ pkgs.writeDashBin "irc-announce" '' IRC_TLS=$5 message=$6 - 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() { - awk '{ - print $0 - print $0 > "/dev/stderr" - }' - } - - # privmsg_cat transforms stdin to a privmsg - privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; } - - tls_flag() { if [ "$IRC_TLS" -eq 1 ]; then echo "-c"; fi } - - # 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" - - awk 'match($0, /PING(.*)/, m) {print "PONG", m[1]; exit}' - - # 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 $(tls_flag) "$IRC_SERVER" "$IRC_PORT" | tee -a ircin + if test "$IRC_TLS" != 1; then + unset IRC_TLS + fi + + printf %s "$message" | + ${pkgs.ircaids}/bin/ircsink \ + --nick="$IRC_NICK" \ + --port="$IRC_PORT" \ + --server="$IRC_SERVER" \ + --target="$IRC_CHANNEL" \ + ''${IRC_TLS:+--secure} '' diff --git a/krebs/5pkgs/simple/ircaids/default.nix b/krebs/5pkgs/simple/ircaids/default.nix new file mode 100644 index 000000000..61d3ee31c --- /dev/null +++ b/krebs/5pkgs/simple/ircaids/default.nix |