diff options
author | lassulus <lass@aidsballs.de> | 2015-09-05 12:17:59 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-09-05 12:17:59 +0200 |
commit | f54a0a9ea7fd5a9902a5b38786da42f06d615b5a (patch) | |
tree | d7c475b212d8acc35a5dc7d20ec1f2228c664010 /krebs/5pkgs | |
parent | f3c1727659c59ff638b1adead8e30ee2f79f39de (diff) | |
parent | d6d9956abc60548c755d30e6a5bd13c10abbb181 (diff) |
Merge branch 'makefu'
Diffstat (limited to 'krebs/5pkgs')
19 files changed, 262 insertions, 13 deletions
diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix new file mode 100644 index 000000000..524782081 --- /dev/null +++ b/krebs/5pkgs/Reaktor/default.nix @@ -0,0 +1,19 @@ +{ lib, pkgs,python3Packages,fetchurl, ... }: + +python3Packages.buildPythonPackage rec { + name = "Reaktor-${version}"; + version = "0.4.3"; + propagatedBuildInputs = with pkgs;[ + python3Packages.docopt + python3Packages.requests2 + ]; + src = fetchurl { + url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; + sha256 = "1rvfw9vg7i7z2ah7m5k3zik2b92d3xdaqa8am62qw6vgvmxcmfp4"; + }; + meta = { + homepage = http://krebsco.de/; + description = "An IRC bot based on asynchat"; + license = lib.licenses.wtfpl; + }; +} diff --git a/krebs/5pkgs/cac.nix b/krebs/5pkgs/cac/default.nix index eff523048..eff523048 100644 --- a/krebs/5pkgs/cac.nix +++ b/krebs/5pkgs/cac/default.nix diff --git a/krebs/5pkgs/charybdis/default.nix b/krebs/5pkgs/charybdis/default.nix new file mode 100644 index 000000000..f3e6be40e --- /dev/null +++ b/krebs/5pkgs/charybdis/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchgit, bison, flex, openssl }: + +stdenv.mkDerivation rec { + name = "charybdis-3.5.0-rc1"; + + src = fetchgit { + url = "https://github.com/atheme/charybdis.git"; + rev = "61815bf9324e872f51255e09fe37a8c595f94a60"; + sha256 = "0zsd6xk2cnspc1cvryy2296p3ix4hwjd9k24wmgbh5wzks0wahwy"; + }; + + patches = [ + ./remove-setenv.patch + ]; + + configureFlags = [ + "--enable-epoll" + "--enable-ipv6" + "--enable-openssl=${openssl}" + "--enable-small-net" + "--with-program-prefix=charybdis-" + "--sysconfdir=/tmp" + ]; + + buildInputs = [ bison flex openssl ]; + + meta = { + description = "An extremely scalable ircd with some cooperation with the ratbox and ircu guys"; + homepage = https://github.com/atheme/charybdis; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.lassulus ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/krebs/5pkgs/charybdis/remove-setenv.patch b/krebs/5pkgs/charybdis/remove-setenv.patch new file mode 100644 index 000000000..bbaf95e19 --- /dev/null +++ b/krebs/5pkgs/charybdis/remove-setenv.patch @@ -0,0 +1,12 @@ +diff --git a/src/bandbi.c b/src/bandbi.c +index 03dd907..3698e85 100644 +--- a/src/bandbi.c ++++ b/src/bandbi.c +@@ -82,7 +82,6 @@ start_bandb(void) + const char *suffix = ""; + #endif + +- rb_setenv("BANDB_DBPATH", PKGLOCALSTATEDIR "/ban.db", 1); + if(bandb_path == NULL) + { + rb_snprintf(fullpath, sizeof(fullpath), "%s/bandb%s", PKGLIBEXECDIR, suffix); diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 2454c19c8..39d3d69ce 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,18 +1,54 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: + +with import ../4lib { inherit lib; }; let inherit (pkgs) callPackage; in -pkgs // -{ - cac = callPackage ./cac.nix {}; - dic = callPackage ./dic.nix {}; - genid = callPackage ./genid.nix {}; - github-hosts-sync = callPackage ./github-hosts-sync.nix {}; - github-known_hosts = callPackage ./github-known_hosts.nix {}; - hashPassword = callPackage ./hashPassword.nix {}; - nq = callPackage ./nq.nix {}; - posix-array = callPackage ./posix-array.nix {}; - youtube-tools = callPackage ./youtube-tools.nix {}; +rec { + cac = callPackage ./cac {}; + charybdis = callPackage ./charybdis {}; + dic = callPackage ./dic {}; + genid = callPackage ./genid {}; + github-hosts-sync = callPackage ./github-hosts-sync {}; + github-known_hosts = callPackage ./github-known_hosts {}; + hashPassword = callPackage ./hashPassword {}; + krebszones = callPackage ./krebszones {}; + lentil = callPackage ./lentil {}; + much = callPackage ./much {}; + nq = callPackage ./nq {}; + posix-array = callPackage ./posix-array {}; + pssh = callPackage ./pssh {}; + Reaktor = callPackage ./Reaktor {}; + youtube-tools = callPackage ./youtube-tools {}; + + execve = name: { filename, argv, envp ? {}, destination ? "" }: + writeC name { inherit destination; } '' + #include <unistd.h> + int main () { + const char *filename = ${toC filename}; + char *const argv[] = ${toC (argv ++ [null])}; + char *const envp[] = ${toC ( + mapAttrsToList (k: v: "${k}=${v}") envp ++ [null] + )}; + execve(filename, argv, envp); + return -1; + } + ''; + + execveBin = name: cfg: execve name (cfg // { destination = "/bin/${name}"; }); + + writeC = name: { destination ? "" }: src: pkgs.runCommand name {} '' + PATH=${lib.makeSearchPath "bin" (with pkgs; [ + binutils + coreutils + gcc + ])} + src=${pkgs.writeText "${name}.c" src} + exe=$out${destination} + mkdir -p "$(dirname "$exe")" + gcc -O -Wall -o "$exe" $src + strip --strip-unneeded "$exe" + ''; } diff --git a/krebs/5pkgs/dic.nix b/krebs/5pkgs/dic/default.nix index 571773d22..571773d22 100644 --- a/krebs/5pkgs/dic.nix +++ b/krebs/5pkgs/dic/default.nix diff --git a/krebs/5pkgs/genid.nix b/krebs/5pkgs/genid/default.nix index c75bec317..c75bec317 100644 --- a/krebs/5pkgs/genid.nix +++ b/krebs/5pkgs/genid/default.nix diff --git a/krebs/5pkgs/github-hosts-sync.nix b/krebs/5pkgs/github-hosts-sync/default.nix index d69b2b12b..d69b2b12b 100644 --- a/krebs/5pkgs/github-hosts-sync.nix +++ b/krebs/5pkgs/github-hosts-sync/default.nix diff --git a/krebs/5pkgs/github-known_hosts.nix b/krebs/5pkgs/github-known_hosts/default.nix index 302fdd8d5..fe5efe413 100644 --- a/krebs/5pkgs/github-known_hosts.nix +++ b/krebs/5pkgs/github-known_hosts/default.nix @@ -4,7 +4,7 @@ with builtins; with lib; let - github-pubkey = removeSuffix "\n" (readFile ../../Zpubkeys/github.ssh.pub); + github-pubkey = removeSuffix "\n" (readFile ./github.ssh.pub); in toFile "github-known_hosts" diff --git a/krebs/5pkgs/github-known_hosts/github.ssh.pub b/krebs/5pkgs/github-known_hosts/github.ssh.pub new file mode 100644 index 000000000..90f6e2b71 --- /dev/null +++ b/krebs/5pkgs/github-known_hosts/github.ssh.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== diff --git a/krebs/5pkgs/hashPassword.nix b/krebs/5pkgs/hashPassword/default.nix index a10340cc4..a10340cc4 100644 --- a/krebs/5pkgs/hashPassword.nix +++ b/krebs/5pkgs/hashPassword/default.nix diff --git a/krebs/5pkgs/krebszones/default.nix b/krebs/5pkgs/krebszones/default.nix new file mode 100644 index 000000000..62805c73c --- /dev/null +++ b/krebs/5pkgs/krebszones/default.nix @@ -0,0 +1,20 @@ +{ lib, pkgs,python3Packages,fetchurl, ... }: + +python3Packages.buildPythonPackage rec { + name = "krebszones-${version}"; + version = "0.4.3"; + 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 = "1i6aqy27bikypc4mq7ymfnvf42rr5sxiy6l7gnyk6ifhlp1jq8z5"; + }; + meta = { + homepage = http://krebsco.de/; + description = "OVH Zone Upload"; + license = lib.licenses.wtfpl; + }; +} diff --git a/krebs/5pkgs/lentil/default.nix b/krebs/5pkgs/lentil/default.nix new file mode 100644 index 000000000..fc9b4fd31 --- /dev/null +++ b/krebs/5pkgs/lentil/default.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +(pkgs.haskellngPackages.override { + overrides = self: super: { + lentil = super.lentil.override { + mkDerivation = (attrs: self.mkDerivation (attrs // { + version = "0.1.3.0"; + sha256 = "0xa59avh0bvfg69xh9p5b8dppfhx29mvfq8v41sk9j7qbcnzjivg"; + patches = [ + ./syntaxes.patch + ]; + })); + }; + }; +}).lentil diff --git a/krebs/5pkgs/lentil/syntaxes.patch b/krebs/5pkgs/lentil/syntaxes.patch new file mode 100644 index 000000000..a9390ae51 --- /dev/null +++ b/krebs/5pkgs/lentil/syntaxes.patch @@ -0,0 +1,11 @@ +diff -rN -u old-lentil/src/Lentil/Parse/Syntaxes.hs new-lentil/src/Lentil/Parse/Syntaxes.hs +--- old-lentil/src/Lentil/Parse/Syntaxes.hs 2015-07-20 23:15:38.600539779 +0200 ++++ new-lentil/src/Lentil/Parse/Syntaxes.hs 2015-07-20 23:15:38.600539779 +0200 +@@ -30,6 +30,7 @@ + | ext `elem` [".pas", ".pp", ".inc"] = Just pascal + | ext `elem` [".py"] = Just python + | ext `elem` [".rb"] = Just ruby ++ | ext `elem` [".nix"] = Just perl -- Nix + | ext `elem` [".pl", ".pm", ".t"] = Just perl + | ext `elem` [".sh"] = Just perl -- shell + | ext `elem` [".txt"] = Just text diff --git a/krebs/5pkgs/much/default.nix b/krebs/5pkgs/much/default.nix new file mode 100644 index 000000000..82586b422 --- /dev/null +++ b/krebs/5pkgs/much/default.nix @@ -0,0 +1,64 @@ +{ pkgs, ... }: + +let + hspkgs = pkgs.haskellngPackages.override { + overrides = self: super: { + email-header = self.callPackage ( +{ mkDerivation, attoparsec, base, base64-bytestring, bytestring +, case-insensitive, containers, exceptions, fetchgit, QuickCheck +, stdenv, tasty, tasty-quickcheck, text, text-icu, time +}: +mkDerivation { + pname = "email-header"; + version = "0.3.0"; + src = fetchgit { + url = "https://github.com/4z3/email-header"; + sha256 = "f33fba567a39b1f2448869b269c26c40d8007599c23ab83bde5b4dfd9fd76ebc"; + rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8"; + }; + buildDepends = [ + attoparsec base base64-bytestring bytestring case-insensitive + containers exceptions text text-icu time + ]; + testDepends = [ + base bytestring case-insensitive containers QuickCheck tasty + tasty-quickcheck text time + ]; + jailbreak = true; + homepage = "http://github.com/knrafto/email-header"; + description = "Parsing and rendering of email and MIME headers"; + license = stdenv.lib.licenses.bsd3; +} +) {}; + }; + }; +in + +hspkgs.callPackage ( +{ mkDerivation, aeson, attoparsec, base, base64-bytestring +, blaze-builder, bytestring, case-insensitive, containers, deepseq +, directory, docopt, email-header, fetchgit, filepath +, friendly-time, hyphenation, linebreak, old-locale, process +, random, rosezipper, safe, split, stdenv, terminal-size, text +, time, transformers, transformers-compat, unix, vector +}: +mkDerivation { + pname = "much"; + version = "0.0.0.0"; + src = fetchgit { + url = "http://cgit.nomic/much"; + sha256 = "f0bcc34456cb876d3439694d1e16db414a540e13f476fa3ff1ad70d1d3caccb2"; + rev = "bfd854e05207a073eaa983c49f27c37555ccfce5"; + }; + isLibrary = false; + isExecutable = true; + buildDepends = [ + aeson attoparsec base base64-bytestring blaze-builder bytestring + case-insensitive containers deepseq directory docopt email-header + filepath friendly-time hyphenation linebreak old-locale process + random rosezipper safe split terminal-size text time transformers + transformers-compat unix vector + ]; + license = stdenv.lib.licenses.mit; +} +) {} diff --git a/krebs/5pkgs/nq.nix b/krebs/5pkgs/nq/default.nix index 0f397a43c..0f397a43c 100644 --- a/krebs/5pkgs/nq.nix +++ b/krebs/5pkgs/nq/default.nix diff --git a/krebs/5pkgs/posix-array.nix b/krebs/5pkgs/posix-array/default.nix index 456a3cc11..456a3cc11 100644 --- a/krebs/5pkgs/posix-array.nix +++ b/krebs/5pkgs/posix-array/default.nix diff --git a/krebs/5pkgs/pssh/default.nix b/krebs/5pkgs/pssh/default.nix new file mode 100644 index 000000000..fd48d3e7c --- /dev/null +++ b/krebs/5pkgs/pssh/default.nix @@ -0,0 +1,37 @@ +{ writeScriptBin }: + +writeScriptBin "pssh" '' + #! /bin/sh + set -efu + case ''${1-} in + + # TODO create plog with -o json | jq ... | map date + + # usage: pssh {-j,--journal} host... + # Follow journal at each host. + -j|--journal) + shift + "$0" journalctl -n0 -ocat --follow --all ::: "$@" \ + | while read line; do + printf '%s %s\n' "$(date --rfc-3339=s)" "$line" + done + ;; + + -*) + echo $0: unknown option: $1 >&2 + exit 1 + ;; + + # usage: pssh command [arg...] ::: host... + # Run command at each host. + *) + exec parallel \ + --line-buffer \ + -j0 \ + --no-notice \ + --tagstring {} \ + ssh -T {} "$@" + ;; + + esac +'' diff --git a/krebs/5pkgs/youtube-tools.nix b/krebs/5pkgs/youtube-tools/default.nix index d767728be..d767728be 100644 --- a/krebs/5pkgs/youtube-tools.nix +++ b/krebs/5pkgs/youtube-tools/default.nix |