From 407985695d91af4361799b2aeb5b0caf129d2c29 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Aug 2015 17:10:02 +0200 Subject: revert path from cacert to nss-cacert --- krebs/3modules/urlwatch.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 531e6c87b..80d9f5e93 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -78,7 +78,7 @@ let HOME = cfg.dataDir; LC_ALL = "en_US.UTF-8"; LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; - SSL_CERT_FILE = "${pkgs.cacert}/etc/ca-bundle.crt"; + SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; }; serviceConfig = { User = user.name; -- cgit v1.2.3 From 8c5ca07413e983208ced2fc5b67dd84fb70482a4 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Aug 2015 17:11:05 +0200 Subject: add vaapi for tp-x220 this resolves the issue of vlc being slow after suspend --- makefu/2configs/tp-x220.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/makefu/2configs/tp-x220.nix b/makefu/2configs/tp-x220.nix index 787a0639e..94e51f726 100644 --- a/makefu/2configs/tp-x220.nix +++ b/makefu/2configs/tp-x220.nix @@ -8,13 +8,21 @@ with lib; boot.kernelModules = [ "kvm-intel" ]; #services.xserver.vaapiDrivers = [pkgs.vaapiIntel pkgs.vaapiVdpau ]; - services.xserver.vaapiDrivers = []; + + services.xserver = { + videoDriver = "intel"; + vaapiDrivers = [ pkgs.vaapiIntel ]; + deviceSection = '' + Option "AccelMethod" "sna" + BusID "PCI:0:2:0" + ''; + }; services.xserver.displayManager.sessionCommands ='' xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 - xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 + # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 ''; } -- cgit v1.2.3 From 015720ef89b81d3d17b3aa7dcaa1e1489c0f87a8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 20:09:54 +0200 Subject: {tv/4lib shell-escape,krebs/4lib/shell.nix escape} --- krebs/4lib/default.nix | 1 + krebs/4lib/shell.nix | 15 +++++++++++++++ tv/4lib/default.nix | 9 +-------- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 krebs/4lib/shell.nix diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index b67585335..8b587dfb2 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -14,5 +14,6 @@ builtins // lib // rec { dns = import ./dns.nix { inherit lib; }; listset = import ./listset.nix { inherit lib; }; + shell = import ./shell.nix { inherit lib; }; tree = import ./tree.nix { inherit lib; }; } diff --git a/krebs/4lib/shell.nix b/krebs/4lib/shell.nix new file mode 100644 index 000000000..48b220f87 --- /dev/null +++ b/krebs/4lib/shell.nix @@ -0,0 +1,15 @@ +{ lib, ... }: + +with builtins; +with lib; + +rec { + escape = + let + isSafeChar = c: match "[-./0-9_a-zA-Z]" c != null; + in + stringAsChars (c: + if isSafeChar c then c + else if c == "\n" then "'\n'" + else "\\${c}"); +} diff --git a/tv/4lib/default.nix b/tv/4lib/default.nix index 352689af4..106535ba2 100644 --- a/tv/4lib/default.nix +++ b/tv/4lib/default.nix @@ -16,12 +16,5 @@ krebs // rec { # "7.4.335" -> "74" majmin = with lib; x : concatStrings (take 2 (splitString "." x)); - shell-escape = - let - isSafeChar = c: match "[-./0-9_a-zA-Z]" c != null; - in - stringAsChars (c: - if isSafeChar c then c - else if c == "\n" then "'\n'" - else "\\${c}"); + shell-escape = krebs.shell.escape; } -- cgit v1.2.3 From f6997378c91be84432703183397f8675143030e9 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 20:11:03 +0200 Subject: krebs shell: add cat --- krebs/4lib/shell.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/krebs/4lib/shell.nix b/krebs/4lib/shell.nix index 48b220f87..2a6da5c16 100644 --- a/krebs/4lib/shell.nix +++ b/krebs/4lib/shell.nix @@ -12,4 +12,11 @@ rec { if isSafeChar c then c else if c == "\n" then "'\n'" else "\\${c}"); + + # + # shell script generators + # + + # example: "${cat (toJSON { foo = "bar"; })} | jq -r .foo" + cat = s: "printf '%s' ${escape s}"; } -- cgit v1.2.3 From c1aaaca7f7febe0c587342ae74e7045bb9a67c5a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:31:59 +0200 Subject: krebs += pkgs.writeC lib.toC --- krebs/4lib/default.nix | 6 ++++++ krebs/5pkgs/default.nix | 13 ++++++++++++- tv/1systems/wu.nix | 2 +- tv/2configs/mail-client.nix | 4 ++-- tv/5pkgs/default.nix | 4 ++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index 8b587dfb2..ca7219c7e 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -16,4 +16,10 @@ builtins // lib // rec { listset = import ./listset.nix { inherit lib; }; shell = import ./shell.nix { inherit lib; }; tree = import ./tree.nix { inherit lib; }; + + toC = x: { + list = "{ ${concatStringsSep ", " (map toC x)} }"; + null = "NULL"; + string = toJSON x; # close enough + }.${typeOf x}; } diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 2149b6f10..c8fb1d2d7 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: let inherit (pkgs) callPackage; @@ -14,4 +14,15 @@ pkgs // hashPassword = callPackage ./hashPassword.nix {}; nq = callPackage ./nq.nix {}; posix-array = callPackage ./posix-array.nix {}; + + writeC = name: {}: src: pkgs.runCommand name {} '' + PATH=${lib.makeSearchPath "bin" (with pkgs; [ + binutils + coreutils + gcc + ])} + in=${pkgs.writeText "${name}.c" src} + gcc -O -Wall -o $out $in + strip --strip-unneeded $out + ''; } diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index e48da90ad..6131897a7 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -3,7 +3,7 @@ with lib; let - tvpkgs = import ../5pkgs { inherit pkgs; }; + tvpkgs = import ../5pkgs { inherit lib pkgs; }; in { diff --git a/tv/2configs/mail-client.nix b/tv/2configs/mail-client.nix index a632cf7c4..1daacdb4c 100644 --- a/tv/2configs/mail-client.nix +++ b/tv/2configs/mail-client.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: -with import ../5pkgs { inherit pkgs; }; +with import ../5pkgs { inherit lib pkgs; }; { environment.systemPackages = [ diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 7b5d10a60..a0a22df9f 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,8 +1,8 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: let inherit (pkgs) callPackage; - kpkgs = import ../../krebs/5pkgs { inherit pkgs; }; + kpkgs = import ../../krebs/5pkgs { inherit lib pkgs; }; in kpkgs // { -- cgit v1.2.3 From 8827469a35852a0623d8353c22b481a15328254a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:43:16 +0200 Subject: krebs pkgs += execve --- krebs/5pkgs/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index c8fb1d2d7..406bd15eb 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,11 +1,13 @@ { lib, pkgs, ... }: +with import ../4lib { inherit lib; }; + let inherit (pkgs) callPackage; in pkgs // -{ +rec { cac = callPackage ./cac.nix {}; dic = callPackage ./dic.nix {}; genid = callPackage ./genid.nix {}; @@ -15,6 +17,20 @@ pkgs // nq = callPackage ./nq.nix {}; posix-array = callPackage ./posix-array.nix {}; + execve = name: { filename, argv, envp }: + writeC name {} '' + #include + 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; + } + ''; + writeC = name: {}: src: pkgs.runCommand name {} '' PATH=${lib.makeSearchPath "bin" (with pkgs; [ binutils -- cgit v1.2.3 From 62865ae6ae46e006cea7ee80b931fc5be27d3449 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:48:29 +0200 Subject: tv configs test: init --- tv/1systems/wu.nix | 1 + tv/2configs/test.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tv/2configs/test.nix diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 6131897a7..34ba5651e 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -33,6 +33,7 @@ in ../2configs/mail-client.nix ../2configs/xserver.nix ../2configs/synaptics.nix # TODO w110er if xserver is enabled + ../2configs/test.nix ../2configs/urlwatch.nix { environment.systemPackages = with pkgs; [ diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix new file mode 100644 index 000000000..f96b9e98e --- /dev/null +++ b/tv/2configs/test.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with import ../4lib { inherit lib pkgs; }; + +let + tvpkgs = import ../5pkgs { inherit lib pkgs; }; + + out = { + security.sudo.extraConfig = '' + tv ALL=(test) NOPASSWD: ALL + ''; + users.extraUsers.test = { + shell = "${test-shell}"; + }; + }; + + test-shell = tvpkgs.execve "test-shell" rec { + filename = "${pkgs.bash}/bin/bash"; + argv = ["sh" "--noprofile" "-l"]; + envp.ENV = pkgs.writeText "test-env" '' + ${shell.cat "Hello, `$(j0w\nd0g!)`!\\o/\n"} >&2 + ''; + }; + +in out -- cgit v1.2.3 From 642c761bd015f5766a75cf5688b50d42efdb96c3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 22:13:17 +0200 Subject: krebs pkgs += execveBin --- krebs/5pkgs/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 3658c43e0..54604382f 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -18,8 +18,8 @@ rec { posix-array = callPackage ./posix-array.nix {}; youtube-tools = callPackage ./youtube-tools.nix {}; - execve = name: { filename, argv, envp }: - writeC name {} '' + execve = name: { filename, argv, envp ? {}, destination ? "" }: + writeC name { inherit destination; } '' #include int main () { const char *filename = ${toC filename}; @@ -32,14 +32,18 @@ rec { } ''; - writeC = name: {}: src: pkgs.runCommand name {} '' + 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 ])} - in=${pkgs.writeText "${name}.c" src} - gcc -O -Wall -o $out $in - strip --strip-unneeded $out + src=${pkgs.writeText "${name}.c" src} + exe=$out${destination} + mkdir -p "$(dirname "$exe")" + gcc -O -Wall -o "$exe" $src + strip --strip-unneeded "$exe" ''; } -- cgit v1.2.3 From 8e5137481852df6fb5488296a7081b5180e6954f Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 22:14:34 +0200 Subject: tv configs test: systemPackages += su-test --- tv/2configs/test.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix index f96b9e98e..fa556ec78 100644 --- a/tv/2configs/test.nix +++ b/tv/2configs/test.nix @@ -6,6 +6,9 @@ let tvpkgs = import ../5pkgs { inherit lib pkgs; }; out = { + environment.systemPackages = [ + su-test + ]; security.sudo.extraConfig = '' tv ALL=(test) NOPASSWD: ALL ''; @@ -14,6 +17,11 @@ let }; }; + su-test = tvpkgs.execveBin "su-test" rec { + filename = "/var/setuid-wrappers/sudo"; + argv = ["sudo" "-u" "test" "-i"]; + }; + test-shell = tvpkgs.execve "test-shell" rec { filename = "${pkgs.bash}/bin/bash"; argv = ["sh" "--noprofile" "-l"]; -- cgit v1.2.3 From 144fcda288eb050153620c386511c7722e031029 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 22:27:23 +0200 Subject: {tv,krebs}: import krebs pkgs with lib --- krebs/3modules/github-hosts-sync.nix | 2 +- tv/1systems/cd.nix | 2 +- tv/2configs/charybdis.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/github-hosts-sync.nix b/krebs/3modules/github-hosts-sync.nix index 0274b9d15..207b937de 100644 --- a/krebs/3modules/github-hosts-sync.nix +++ b/krebs/3modules/github-hosts-sync.nix @@ -78,6 +78,6 @@ let uid = 3220554646; # genid github-hosts-sync }; - kpkgs = import ../../krebs/5pkgs { inherit pkgs; }; + kpkgs = import ../../krebs/5pkgs { inherit lib pkgs; }; in out diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 9f412d9b8..8d6ac957a 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -3,7 +3,7 @@ with lib; let - tvpkgs = import ../5pkgs { inherit pkgs; }; + tvpkgs = import ../5pkgs { inherit lib pkgs; }; in { diff --git a/tv/2configs/charybdis.nix b/tv/2configs/charybdis.nix index a2952219d..6be6c02c6 100644 --- a/tv/2configs/charybdis.nix +++ b/tv/2configs/charybdis.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - tvpkgs = import ../5pkgs { inherit pkgs; }; + tvpkgs = import ../5pkgs { inherit lib pkgs; }; in with builtins; -- cgit v1.2.3 From 81eaf7a9e7b083c169828590d0d848cf933b32e0 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:17:25 +0200 Subject: one pkgs to rule them all --- default.nix | 6 ++++++ krebs/3modules/github-hosts-sync.nix | 6 ++---- krebs/5pkgs/default.nix | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index 59a76f81b..875f0d5b4 100644 --- a/default.nix +++ b/default.nix @@ -8,6 +8,12 @@ let "${user-name}/1systems/${system-name}.nix" "${user-name}/3modules" "krebs/3modules" + ] ++ [ + ({ lib, pkgs, ... }: { + _module.args.pkgs = + (import ./krebs/5pkgs { inherit lib pkgs; }) // + (import (./. + "/${user-name}/5pkgs") { inherit lib pkgs; }); + }) ]; }; diff --git a/krebs/3modules/github-hosts-sync.nix b/krebs/3modules/github-hosts-sync.nix index 207b937de..dbc0cc1de 100644 --- a/krebs/3modules/github-hosts-sync.nix +++ b/krebs/3modules/github-hosts-sync.nix @@ -61,9 +61,9 @@ let ${cfg.ssh-identity-file} \ "$ssh_identity_file_target" - ln -snf ${kpkgs.github-known_hosts} ${cfg.dataDir}/.ssh/known_hosts + ln -snf ${pkgs.github-known_hosts} ${cfg.dataDir}/.ssh/known_hosts ''; - ExecStart = "${kpkgs.github-hosts-sync}/bin/github-hosts-sync"; + ExecStart = "${pkgs.github-hosts-sync}/bin/github-hosts-sync"; }; }; @@ -77,7 +77,5 @@ let name = "github-hosts-sync"; uid = 3220554646; # genid github-hosts-sync }; - - kpkgs = import ../../krebs/5pkgs { inherit lib pkgs; }; in out diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 54604382f..2f7a24ed2 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -6,7 +6,6 @@ let inherit (pkgs) callPackage; in -pkgs // rec { cac = callPackage ./cac.nix {}; dic = callPackage ./dic.nix {}; -- cgit v1.2.3 From 09257f97823e9a57cda749c2d5a69b18ef484cec Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:19:52 +0200 Subject: tv: use only pkgs --- tv/1systems/cd.nix | 6 +----- tv/1systems/wu.nix | 16 ++++++---------- tv/2configs/charybdis.nix | 6 +----- tv/2configs/mail-client.nix | 5 ++--- tv/2configs/test.nix | 6 ++---- tv/5pkgs/default.nix | 5 ++--- 6 files changed, 14 insertions(+), 30 deletions(-) diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 8d6ac957a..0049387be 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -2,10 +2,6 @@ with lib; -let - tvpkgs = import ../5pkgs { inherit lib pkgs; }; -in - { krebs.build.host = config.krebs.hosts.cd; krebs.build.user = config.krebs.users.tv; @@ -136,7 +132,7 @@ in server-names = singleton "viljetic.de"; # TODO directly set root (instead via location) locations = singleton (nameValuePair "/" '' - root ${tvpkgs.viljetic-pages}; + root ${pkgs.viljetic-pages}; ''); }; } diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 34ba5651e..622fd721a 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -2,10 +2,6 @@ with lib; -let - tvpkgs = import ../5pkgs { inherit lib pkgs; }; -in - { krebs.build.host = config.krebs.hosts.wu; krebs.build.user = config.krebs.users.tv; @@ -39,12 +35,12 @@ in environment.systemPackages = with pkgs; [ # stockholm + genid git gnumake + hashPassword + lentil parallel - tvpkgs.genid - tvpkgs.hashPassword - tvpkgs.lentil (pkgs.writeScriptBin "ff" '' #! ${pkgs.bash}/bin/bash exec sudo -u ff -i < Date: Sat, 29 Aug 2015 00:36:50 +0200 Subject: krebs pkgs += charybdis lentil much While there, put everything into subdirectories. --- krebs/5pkgs/cac.nix | 38 ------------------ krebs/5pkgs/cac/default.nix | 38 ++++++++++++++++++ krebs/5pkgs/charybdis/default.nix | 34 ++++++++++++++++ krebs/5pkgs/charybdis/remove-setenv.patch | 12 ++++++ krebs/5pkgs/default.nix | 21 +++++----- krebs/5pkgs/dic.nix | 36 ----------------- krebs/5pkgs/dic/default.nix | 36 +++++++++++++++++ krebs/5pkgs/genid.nix | 22 ---------- krebs/5pkgs/genid/default.nix | 22 ++++++++++ krebs/5pkgs/github-hosts-sync.nix | 40 ------------------- krebs/5pkgs/github-hosts-sync/default.nix | 40 +++++++++++++++++++ krebs/5pkgs/github-known_hosts.nix | 13 ------ krebs/5pkgs/github-known_hosts/default.nix | 13 ++++++ krebs/5pkgs/hashPassword.nix | 16 -------- krebs/5pkgs/hashPassword/default.nix | 16 ++++++++ krebs/5pkgs/lentil/default.nix | 15 +++++++ krebs/5pkgs/lentil/syntaxes.patch | 11 +++++ krebs/5pkgs/much/default.nix | 64 ++++++++++++++++++++++++++++++ krebs/5pkgs/nq.nix | 16 -------- krebs/5pkgs/nq/default.nix | 16 ++++++++ krebs/5pkgs/posix-array.nix | 31 --------------- krebs/5pkgs/posix-array/default.nix | 31 +++++++++++++++ krebs/5pkgs/youtube-tools.nix | 21 ---------- krebs/5pkgs/youtube-tools/default.nix | 21 ++++++++++ tv/5pkgs/charybdis/default.nix | 34 ---------------- tv/5pkgs/charybdis/remove-setenv.patch | 12 ------ tv/5pkgs/default.nix | 3 -- tv/5pkgs/lentil/default.nix | 15 ------- tv/5pkgs/lentil/syntaxes.patch | 11 ----- tv/5pkgs/much.nix | 64 ------------------------------ 30 files changed, 381 insertions(+), 381 deletions(-) delete mode 100644 krebs/5pkgs/cac.nix create mode 100644 krebs/5pkgs/cac/default.nix create mode 100644 krebs/5pkgs/charybdis/default.nix create mode 100644 krebs/5pkgs/charybdis/remove-setenv.patch delete mode 100644 krebs/5pkgs/dic.nix create mode 100644 krebs/5pkgs/dic/default.nix delete mode 100644 krebs/5pkgs/genid.nix create mode 100644 krebs/5pkgs/genid/default.nix delete mode 100644 krebs/5pkgs/github-hosts-sync.nix create mode 100644 krebs/5pkgs/github-hosts-sync/default.nix delete mode 100644 krebs/5pkgs/github-known_hosts.nix create mode 100644 krebs/5pkgs/github-known_hosts/default.nix delete mode 100644 krebs/5pkgs/hashPassword.nix create mode 100644 krebs/5pkgs/hashPassword/default.nix create mode 100644 krebs/5pkgs/lentil/default.nix create mode 100644 krebs/5pkgs/lentil/syntaxes.patch create mode 100644 krebs/5pkgs/much/default.nix delete mode 100644 krebs/5pkgs/nq.nix create mode 100644 krebs/5pkgs/nq/default.nix delete mode 100644 krebs/5pkgs/posix-array.nix create mode 100644 krebs/5pkgs/posix-array/default.nix delete mode 100644 krebs/5pkgs/youtube-tools.nix create mode 100644 krebs/5pkgs/youtube-tools/default.nix delete mode 100644 tv/5pkgs/charybdis/default.nix delete mode 100644 tv/5pkgs/charybdis/remove-setenv.patch delete mode 100644 tv/5pkgs/lentil/default.nix delete mode 100644 tv/5pkgs/lentil/syntaxes.patch delete mode 100644 tv/5pkgs/much.nix diff --git a/krebs/5pkgs/cac.nix b/krebs/5pkgs/cac.nix deleted file mode 100644 index eff523048..000000000 --- a/krebs/5pkgs/cac.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ stdenv, fetchgit, coreutils, curl, gnused, jq, ncurses, sshpass, ... }: - -stdenv.mkDerivation { - name = "cac"; - - src = fetchgit { - url = http://cgit.cd.retiolum/cac; - rev = "f4589158572ab35969b9bccf801ea07e115705e1"; - sha256 = "9d761cd1d7ff68507392cbfd6c3f6000ddff9cc540293da2b3c4ee902321fb27"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = - let - path = stdenv.lib.makeSearchPath "bin" [ - coreutils - curl - gnused - jq - ncurses - sshpass - ]; - in - '' - mkdir -p $out/bin - - sed \ - 's,^\( true) \)\(cac "$@";;\)$,\1 PATH=${path}${PATH+:$PATH} \2,' \ - < ./cac \ - > $out/bin/cac - - chmod +x $out/bin/cac - ''; -} diff --git a/krebs/5pkgs/cac/default.nix b/krebs/5pkgs/cac/default.nix new file mode 100644 index 000000000..eff523048 --- /dev/null +++ b/krebs/5pkgs/cac/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchgit, coreutils, curl, gnused, jq, ncurses, sshpass, ... }: + +stdenv.mkDerivation { + name = "cac"; + + src = fetchgit { + url = http://cgit.cd.retiolum/cac; + rev = "f4589158572ab35969b9bccf801ea07e115705e1"; + sha256 = "9d761cd1d7ff68507392cbfd6c3f6000ddff9cc540293da2b3c4ee902321fb27"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + installPhase = + let + path = stdenv.lib.makeSearchPath "bin" [ + coreutils + curl + gnused + jq + ncurses + sshpass + ]; + in + '' + mkdir -p $out/bin + + sed \ + 's,^\( true) \)\(cac "$@";;\)$,\1 PATH=${path}${PATH+:$PATH} \2,' \ + < ./cac \ + > $out/bin/cac + + chmod +x $out/bin/cac + ''; +} 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 2f7a24ed2..71bee3fa2 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -7,15 +7,18 @@ let in rec { - 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 {}; + 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 {}; + lentil = callPackage ./lentil {}; + much = callPackage ./much {}; + nq = callPackage ./nq {}; + posix-array = callPackage ./posix-array {}; + youtube-tools = callPackage ./youtube-tools {}; execve = name: { filename, argv, envp ? {}, destination ? "" }: writeC name { inherit destination; } '' diff --git a/krebs/5pkgs/dic.nix b/krebs/5pkgs/dic.nix deleted file mode 100644 index 571773d22..000000000 --- a/krebs/5pkgs/dic.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, fetchgit, coreutils, curl, gnused, gnugrep, ... }: - -stdenv.mkDerivation { - name = "dic"; - - src = fetchgit { - url = https://github.com/krebscode/painload; - rev = "35ccac73d563ad30d2851b9aeed4cfef69ff74e3"; - sha256 = "1y1fs2p3xj2yrqpw0h5kd0f3c5p1y70xk1hjnw99sr33r67s9c35"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = - let - path = stdenv.lib.makeSearchPath "bin" [ - coreutils - curl - gnused - gnugrep - ]; - in - '' - mkdir -p $out/bin - - sed \ - 's,^main() {$,&\n PATH=${path}; export PATH,' \ - < ./util/bin/dic \ - > $out/bin/dic - - chmod +x $out/bin/dic - ''; -} diff --git a/krebs/5pkgs/dic/default.nix b/krebs/5pkgs/dic/default.nix new file mode 100644 index 000000000..571773d22 --- /dev/null +++ b/krebs/5pkgs/dic/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchgit, coreutils, curl, gnused, gnugrep, ... }: + +stdenv.mkDerivation { + name = "dic"; + + src = fetchgit { + url = https://github.com/krebscode/painload; + rev = "35ccac73d563ad30d2851b9aeed4cfef69ff74e3"; + sha256 = "1y1fs2p3xj2yrqpw0h5kd0f3c5p1y70xk1hjnw99sr33r67s9c35"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + installPhase = + let + path = stdenv.lib.makeSearchPath "bin" [ + coreutils + curl + gnused + gnugrep + ]; + in + '' + mkdir -p $out/bin + + sed \ + 's,^main() {$,&\n PATH=${path}; export PATH,' \ + < ./util/bin/dic \ + > $out/bin/dic + + chmod +x $out/bin/dic + ''; +} diff --git a/krebs/5pkgs/genid.nix b/krebs/5pkgs/genid.nix deleted file mode 100644 index c75bec317..000000000 --- a/krebs/5pkgs/genid.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, pkgs, ... }: - -pkgs.writeScriptBin "genid" '' - #! /bin/sh - # usage: genid NAME - set -euf - - export PATH=${lib.makeSearchPath "bin" (with pkgs; [ - bc - coreutils - ])} - - name=$1 - hash=$(printf %s "$name" | sha1sum | cut -d\ -f1 | tr a-f A-F) - echo " - min=2^24 # bigger than nobody and nogroup, see - # and some spare for stuff like lxd. - max=2^32 # see 2^(8*sizeof(uid_t)) - ibase=16 - ($hash + min) % max - " | bc -'' diff --git a/krebs/5pkgs/genid/default.nix b/krebs/5pkgs/genid/default.nix new file mode 100644 index 000000000..c75bec317 --- /dev/null +++ b/krebs/5pkgs/genid/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: + +pkgs.writeScriptBin "genid" '' + #! /bin/sh + # usage: genid NAME + set -euf + + export PATH=${lib.makeSearchPath "bin" (with pkgs; [ + bc + coreutils + ])} + + name=$1 + hash=$(printf %s "$name" | sha1sum | cut -d\ -f1 | tr a-f A-F) + echo " + min=2^24 # bigger than nobody and nogroup, see + # and some spare for stuff like lxd. + max=2^32 # see 2^(8*sizeof(uid_t)) + ibase=16 + ($hash + min) % max + " | bc +'' diff --git a/krebs/5pkgs/github-hosts-sync.nix b/krebs/5pkgs/github-hosts-sync.nix deleted file mode 100644 index d69b2b12b..000000000 --- a/krebs/5pkgs/github-hosts-sync.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ stdenv, fetchgit, pkgs, ... }: - -stdenv.mkDerivation { - name = "github-hosts-sync"; - - src = fetchgit { - url = https://github.com/krebscode/painload; - rev = "35ccac73d563ad30d2851b9aeed4cfef69ff74e3"; - sha256 = "1y1fs2p3xj2yrqpw0h5kd0f3c5p1y70xk1hjnw99sr33r67s9c35"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = - let - ca-bundle = "${pkgs.cacert}/etc/ca-bundle.crt"; - path = stdenv.lib.makeSearchPath "bin" (with pkgs; [ - coreutils - findutils - git - gnugrep - gnused - 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/github-hosts-sync/default.nix b/krebs/5pkgs/github-hosts-sync/default.nix new file mode 100644 index 000000000..d69b2b12b --- /dev/null +++ b/krebs/5pkgs/github-hosts-sync/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchgit, pkgs, ... }: + +stdenv.mkDerivation { + name = "github-hosts-sync"; + + src = fetchgit { + url = https://github.com/krebscode/painload; + rev = "35ccac73d563ad30d2851b9aeed4cfef69ff74e3"; + sha256 = "1y1fs2p3xj2yrqpw0h5kd0f3c5p1y70xk1hjnw99sr33r67s9c35"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + installPhase = + let + ca-bundle = "${pkgs.cacert}/etc/ca-bundle.crt"; + path = stdenv.lib.makeSearchPath "bin" (with pkgs; [ + coreutils + findutils + git + gnugrep + gnused + 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/github-known_hosts.nix b/krebs/5pkgs/github-known_hosts.nix deleted file mode 100644 index 302fdd8d5..000000000 --- a/krebs/5pkgs/github-known_hosts.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, ... }: - -with builtins; -with lib; - -let - github-pubkey = removeSuffix "\n" (readFile ../../Zpubkeys/github.ssh.pub); -in - -toFile "github-known_hosts" - (concatMapStrings - (i: "github.com,192.30.252.${toString i} ${github-pubkey}\n") - (range 0 255)) diff --git a/krebs/5pkgs/github-known_hosts/default.nix b/krebs/5pkgs/github-known_hosts/default.nix new file mode 100644 index 000000000..302fdd8d5 --- /dev/null +++ b/krebs/5pkgs/github-known_hosts/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +with builtins; +with lib; + +let + github-pubkey = removeSuffix "\n" (readFile ../../Zpubkeys/github.ssh.pub); +in + +toFile "github-known_hosts" + (concatMapStrings + (i: "github.com,192.30.252.${toString i} ${github-pubkey}\n") + (range 0 255)) diff --git a/krebs/5pkgs/hashPassword.nix b/krebs/5pkgs/hashPassword.nix deleted file mode 100644 index a10340cc4..000000000 --- a/krebs/5pkgs/hashPassword.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, pkgs, ... }: - -pkgs.writeScriptBin "hashPassword" '' - #! /bin/sh - # usage: hashPassword - set -euf - - export PATH=${lib.makeSearchPath "bin" (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/hashPassword/default.nix b/krebs/5pkgs/hashPassword/default.nix new file mode 100644 index 000000000..a10340cc4 --- /dev/null +++ b/krebs/5pkgs/hashPassword/default.nix @@ -0,0 +1,16 @@ +{ lib, pkgs, ... }: + +pkgs.writeScriptBin "hashPassword" '' + #! /bin/sh + # usage: hashPassword + set -euf + + export PATH=${lib.makeSearchPath "bin" (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/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.nix deleted file mode 100644 index 0f397a43c..000000000 --- a/krebs/5pkgs/nq.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ fetchgit, stdenv }: - -stdenv.mkDerivation rec { - name = "nq-${rev}"; - rev = "0eae839cb1"; - - src = fetchgit { - url = https://github.com/chneukirchen/nq; - inherit rev; - sha256 = "1150274750cde934932d65bd6053d7a0ba2404a59eadfb87fc6bd8a4fb70febb"; - }; - - configurePhase = '' - sed -i "s:^PREFIX=.*:PREFIX=$out:" Makefile - ''; -} diff --git a/krebs/5pkgs/nq/default.nix b/krebs/5pkgs/nq/default.nix new file mode 100644 index 000000000..0f397a43c --- /dev/null +++ b/krebs/5pkgs/nq/default.nix @@ -0,0 +1,16 @@ +{ fetchgit, stdenv }: + +stdenv.mkDerivation rec { + name = "nq-${rev}"; + rev = "0eae839cb1"; + + src = fetchgit { + url = https://github.com/chneukirchen/nq; + inherit rev; + sha256 = "1150274750cde934932d65bd6053d7a0ba2404a59eadfb87fc6bd8a4fb70febb"; + }; + + configurePhase = '' + sed -i "s:^PREFIX=.*:PREFIX=$out:" Makefile + ''; +} diff --git a/krebs/5pkgs/posix-array.nix b/krebs/5pkgs/posix-array.nix deleted file mode 100644 index 456a3cc11..000000000 --- a/krebs/5pkgs/posix-array.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ stdenv, fetchgit, ... }: - -with stdenv; stdenv.mkDerivation rec { - name = "posix-array"; - version = "1.0.0"; - - src = fetchgit { - url = https://github.com/makefu/array.git; - rev = "refs/tags/${version}"; - sha256 = "0yzwlhdg1rgc4p64ny7gj30l7z6vikhskhppsa2qj7s9gm2gz938"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = '' - mkdir -p "$out/bin" - cp -a ./array $out/bin - rm * - ''; - - meta = { - description = "Posix-compliant array implementation"; - url = https://github.com/makefu/array; - license = licenses.wtfpl; - platforms = platforms.unix; - maintainers = with maintainers; [ makefu ]; - }; -} diff --git a/krebs/5pkgs/posix-array/default.nix b/krebs/5pkgs/posix-array/default.nix new file mode 100644 index 000000000..456a3cc11 --- /dev/null +++ b/krebs/5pkgs/posix-array/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchgit, ... }: + +with stdenv; stdenv.mkDerivation rec { + name = "posix-array"; + version = "1.0.0"; + + src = fetchgit { + url = https://github.com/makefu/array.git; + rev = "refs/tags/${version}"; + sha256 = "0yzwlhdg1rgc4p64ny7gj30l7z6vikhskhppsa2qj7s9gm2gz938"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + installPhase = '' + mkdir -p "$out/bin" + cp -a ./array $out/bin + rm * + ''; + + meta = { + description = "Posix-compliant array implementation"; + url = https://github.com/makefu/array; + license = licenses.wtfpl; + platforms = platforms.unix; + maintainers = with maintainers; [ makefu ]; + }; +} diff --git a/krebs/5pkgs/youtube-tools.nix b/krebs/5pkgs/youtube-tools.nix deleted file mode 100644 index d767728be..000000000 --- a/krebs/5pkgs/youtube-tools.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchgit, ... }: - -stdenv.mkDerivation { - name = "youtube-tools"; - - src = fetchgit { - url = https://github.com/Lassulus/the_playlist; - rev = "9218b163f2d8bc965b853ed9fc9e13d15a703456"; - sha256 = "ae5db4be652d015a518e57e4ed2de34b9127e77d9272af3049832bb134e96e4d"; - }; - - phases = [ - "unpackPhase" - "installPhase" - ]; - - installPhase = '' - mkdir -p $out/bin - cp bin/* $out/bin/ - ''; -} diff --git a/krebs/5pkgs/youtube-tools/default.nix b/krebs/5pkgs/youtube-tools/default.nix new file mode 100644 index 000000000..d767728be --- /dev/null +++ b/krebs/5pkgs/youtube-tools/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchgit, ... }: + +stdenv.mkDerivation { + name = "youtube-tools"; + + src = fetchgit { + url = https://github.com/Lassulus/the_playlist; + rev = "9218b163f2d8bc965b853ed9fc9e13d15a703456"; + sha256 = "ae5db4be652d015a518e57e4ed2de34b9127e77d9272af3049832bb134e96e4d"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + installPhase = '' + mkdir -p $out/bin + cp bin/* $out/bin/ + ''; +} diff --git a/tv/5pkgs/charybdis/default.nix b/tv/5pkgs/charybdis/default.nix deleted file mode 100644 index f3e6be40e..000000000 --- a/tv/5pkgs/charybdis/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ 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/tv/5pkgs/charybdis/remove-setenv.patch b/tv/5pkgs/charybdis/remove-setenv.patch deleted file mode 100644 index bbaf95e19..000000000 --- a/tv/5pkgs/charybdis/remove-setenv.patch +++ /dev/null @@ -1,12 +0,0 @@ -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/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index ce137d961..4175292f2 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -5,8 +5,5 @@ let in { - charybdis = callPackage ./charybdis {}; - lentil = callPackage ./lentil {}; - much = callPackage ./much.nix {}; viljetic-pages = callPackage ./viljetic-pages {}; } diff --git a/tv/5pkgs/lentil/default.nix b/tv/5pkgs/lentil/default.nix deleted file mode 100644 index fc9b4fd31..000000000 --- a/tv/5pkgs/lentil/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ 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/tv/5pkgs/lentil/syntaxes.patch b/tv/5pkgs/lentil/syntaxes.patch deleted file mode 100644 index a9390ae51..000000000 --- a/tv/5pkgs/lentil/syntaxes.patch +++ /dev/null @@ -1,11 +0,0 @@ -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/tv/5pkgs/much.nix b/tv/5pkgs/much.nix deleted file mode 100644 index 82586b422..000000000 --- a/tv/5pkgs/much.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ 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; -} -) {} -- cgit v1.2.3 From cb6bede2f65bdcaafe547fdffd8c99f671c54ee9 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:48:37 +0200 Subject: Zpubkeys github -> krebs pkgs github-known_hosts --- Zpubkeys/github.ssh.pub | 1 - krebs/5pkgs/github-known_hosts/default.nix | 2 +- krebs/5pkgs/github-known_hosts/github.ssh.pub | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 Zpubkeys/github.ssh.pub create mode 100644 krebs/5pkgs/github-known_hosts/github.ssh.pub diff --git a/Zpubkeys/github.ssh.pub b/Zpubkeys/github.ssh.pub deleted file mode 100644 index 90f6e2b71..000000000 --- a/Zpubkeys/github.ssh.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== diff --git a/krebs/5pkgs/github-known_hosts/default.nix b/krebs/5pkgs/github-known_hosts/default.nix index 302fdd8d5..fe5efe413 100644 --- a/krebs/5pkgs/github-known_hosts/default.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== -- cgit v1.2.3 From 5591b1dd120dac7cc52098eaacb1476da7b9cb84 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:58:41 +0200 Subject: Z* -> */Z* --- Zcerts/charybdis_cd.crt.pem | 24 ------------------------ Zhosts/Styx | 10 ---------- Zhosts/ThinkArmageddon | 9 --------- Zhosts/TriBot | 11 ----------- Zhosts/ach | 11 ----------- Zhosts/air | 11 ----------- Zhosts/alarmpi | 11 ----------- Zhosts/albi10 | 11 ----------- Zhosts/albi7 | 10 ---------- Zhosts/almoehi | 11 ----------- Zhosts/alphalabs | 10 ---------- Zhosts/apfull | 11 ----------- Zhosts/bitchctl | 11 ----------- Zhosts/bitchextend | 11 ----------- Zhosts/bitchtop | 11 ----------- Zhosts/box | 10 ---------- Zhosts/bridge | 12 ------------ Zhosts/c2ft | 10 ---------- Zhosts/c2fthome | 10 ---------- Zhosts/casino | 11 ----------- Zhosts/cat1 | 11 ----------- Zhosts/cband | 11 ----------- Zhosts/cd | 17 ----------------- Zhosts/cloudkrebs | 12 ------------ Zhosts/darth | 12 ------------ Zhosts/dei | 11 ----------- Zhosts/destroy | 11 ----------- Zhosts/devstar | 11 ----------- Zhosts/eigenserv | 11 ----------- Zhosts/elvis | 12 ------------ Zhosts/eulerwalk | 11 ----------- Zhosts/exile | 9 --------- Zhosts/exitium_mobilis | 10 ---------- Zhosts/falk | 11 ----------- Zhosts/fastpoke | 12 ------------ Zhosts/filebitch | 11 ----------- Zhosts/filepimp | 11 ----------- Zhosts/flap | 12 ------------ Zhosts/foobar | 11 ----------- Zhosts/fuerkrebs | 10 ---------- Zhosts/go | 13 ------------- Zhosts/gum | 14 -------------- Zhosts/heidi | 11 ----------- Zhosts/horisa | 12 ------------ Zhosts/horreum_magnus | 15 --------------- Zhosts/incept | 13 ------------- Zhosts/ire | 12 ------------ Zhosts/ire2 | 9 --------- Zhosts/irkel | 12 ------------ Zhosts/juhulian | 11 ----------- Zhosts/k2 | 28 ---------------------------- Zhosts/kabinett | 11 ----------- Zhosts/kaepsele | 11 ----------- Zhosts/kalle | 11 ----------- Zhosts/karthus | 10 ---------- Zhosts/khackplug | 11 ----------- Zhosts/kheurop | 12 ------------ Zhosts/kiosk | 12 ------------ Zhosts/krebsplug | 10 ---------- Zhosts/kvasir | 11 ----------- Zhosts/laqueus | 11 ----------- Zhosts/linuxatom | 11 ----------- Zhosts/luminos | 11 ----------- Zhosts/machine | 11 ----------- Zhosts/makalu | 11 ----------- Zhosts/mako | 11 ----------- Zhosts/miefda0 | 10 ---------- Zhosts/minikrebs | 10 ---------- Zhosts/mkdir | 11 ----------- Zhosts/monitor | 11 ----------- Zhosts/mors | 10 ---------- Zhosts/motor | 12 ------------ Zhosts/mu | 10 ---------- Zhosts/muhbaasu | 13 ------------- Zhosts/nomic | 10 ---------- Zhosts/nomic2 | 10 ---------- Zhosts/nukular | 11 ----------- Zhosts/omo | 9 --------- Zhosts/pic | 11 ----------- Zhosts/pigstarter | 13 ------------- Zhosts/pike | 11 ----------- Zhosts/pnp | 11 ----------- Zhosts/pornocauster | 10 ---------- Zhosts/radiotuxmini | 11 ----------- Zhosts/random | 10 ---------- Zhosts/raspafari | 11 ----------- Zhosts/reimae | 12 ------------ Zhosts/rmdir | 11 ----------- Zhosts/robchina | 11 ----------- Zhosts/rockit | 11 ----------- Zhosts/rtjure_debian_oder_so | 11 ----------- Zhosts/rtjure_ras | 11 ----------- Zhosts/rtjure_rdrlab_linkstation | 11 ----------- Zhosts/rubus | 9 --------- Zhosts/senderechner | 10 ---------- Zhosts/serenity | 11 ----------- Zhosts/seruundroid | 12 ------------ Zhosts/sir_krebs_a_lot | 11 ----------- Zhosts/skirfir | 11 ----------- Zhosts/sleipnir | 12 ------------ Zhosts/smove | 9 --------- Zhosts/sokrates | 11 ----------- Zhosts/sokrateslaptop | 11 ----------- Zhosts/soundflower | 10 ---------- Zhosts/steve | 10 ---------- Zhosts/tahoe | 12 ------------ Zhosts/taschenkrebs | 11 ----------- Zhosts/terrapi | 11 ----------- Zhosts/thomasDOTde | 9 --------- Zhosts/tincdroid | 9 --------- Zhosts/tmpd | 11 ----------- Zhosts/tpsw | 11 ----------- Zhosts/tsp | 16 ---------------- Zhosts/ufo | 11 ----------- Zhosts/uriel | 11 ----------- Zhosts/vault | 10 ---------- Zhosts/voyager | 17 ----------------- Zhosts/wooktop | 11 ----------- Zhosts/wu | 10 ---------- Zhosts/ytart | 9 --------- Zhosts/zombiecancer | 11 ----------- Zpubkeys/deploy_wu.ssh.pub | 1 - Zpubkeys/lass.ssh.pub | 1 - Zpubkeys/makefu_arch.ssh.pub | 1 - Zpubkeys/makefu_omo.ssh.pub | 1 - Zpubkeys/makefu_tsp.ssh.pub | 1 - Zpubkeys/mv_vod.ssh.pub | 1 - Zpubkeys/tv_wu.ssh.pub | 1 - Zpubkeys/uriel.ssh.pub | 1 - krebs/3modules/default.nix | 10 +++++----- krebs/3modules/retiolum.nix | 2 +- krebs/Zhosts/Styx | 10 ++++++++++ krebs/Zhosts/ThinkArmageddon | 9 +++++++++ krebs/Zhosts/TriBot | 11 +++++++++++ krebs/Zhosts/ach | 11 +++++++++++ krebs/Zhosts/air | 11 +++++++++++ krebs/Zhosts/alarmpi | 11 +++++++++++ krebs/Zhosts/albi10 | 11 +++++++++++ krebs/Zhosts/albi7 | 10 ++++++++++ krebs/Zhosts/almoehi | 11 +++++++++++ krebs/Zhosts/alphalabs | 10 ++++++++++ krebs/Zhosts/apfull | 11 +++++++++++ krebs/Zhosts/bitchctl | 11 +++++++++++ krebs/Zhosts/bitchextend | 11 +++++++++++ krebs/Zhosts/bitchtop | 11 +++++++++++ krebs/Zhosts/box | 10 ++++++++++ krebs/Zhosts/bridge | 12 ++++++++++++ krebs/Zhosts/c2ft | 10 ++++++++++ krebs/Zhosts/c2fthome | 10 ++++++++++ krebs/Zhosts/casino | 11 +++++++++++ krebs/Zhosts/cat1 | 11 +++++++++++ krebs/Zhosts/cband | 11 +++++++++++ krebs/Zhosts/cd | 17 +++++++++++++++++ krebs/Zhosts/cloudkrebs | 12 ++++++++++++ krebs/Zhosts/darth | 12 ++++++++++++ krebs/Zhosts/dei | 11 +++++++++++ krebs/Zhosts/destroy | 11 +++++++++++ krebs/Zhosts/devstar | 11 +++++++++++ krebs/Zhosts/eigenserv | 11 +++++++++++ krebs/Zhosts/elvis | 12 ++++++++++++ krebs/Zhosts/eulerwalk | 11 +++++++++++ krebs/Zhosts/exile | 9 +++++++++ krebs/Zhosts/exitium_mobilis | 10 ++++++++++ krebs/Zhosts/falk | 11 +++++++++++ krebs/Zhosts/fastpoke | 12 ++++++++++++ krebs/Zhosts/filebitch | 11 +++++++++++ krebs/Zhosts/filepimp | 11 +++++++++++ krebs/Zhosts/flap | 12 ++++++++++++ krebs/Zhosts/foobar | 11 +++++++++++ krebs/Zhosts/fuerkrebs | 10 ++++++++++ krebs/Zhosts/go | 13 +++++++++++++ krebs/Zhosts/gum | 14 ++++++++++++++ krebs/Zhosts/heidi | 11 +++++++++++ krebs/Zhosts/horisa | 12 ++++++++++++ krebs/Zhosts/horreum_magnus | 15 +++++++++++++++ krebs/Zhosts/incept | 13 +++++++++++++ krebs/Zhosts/ire | 12 ++++++++++++ krebs/Zhosts/ire2 | 9 +++++++++ krebs/Zhosts/irkel | 12 ++++++++++++ krebs/Zhosts/juhulian | 11 +++++++++++ krebs/Zhosts/k2 | 28 ++++++++++++++++++++++++++++ krebs/Zhosts/kabinett | 11 +++++++++++ krebs/Zhosts/kaepsele | 11 +++++++++++ krebs/Zhosts/kalle | 11 +++++++++++ krebs/Zhosts/karthus | 10 ++++++++++ krebs/Zhosts/khackplug | 11 +++++++++++ krebs/Zhosts/kheurop | 12 ++++++++++++ krebs/Zhosts/kiosk | 12 ++++++++++++ krebs/Zhosts/krebsplug | 10 ++++++++++ krebs/Zhosts/kvasir | 11 +++++++++++ krebs/Zhosts/laqueus | 11 +++++++++++ krebs/Zhosts/linuxatom | 11 +++++++++++ krebs/Zhosts/luminos | 11 +++++++++++ krebs/Zhosts/machine | 11 +++++++++++ krebs/Zhosts/makalu | 11 +++++++++++ krebs/Zhosts/mako | 11 +++++++++++ krebs/Zhosts/miefda0 | 10 ++++++++++ krebs/Zhosts/minikrebs | 10 ++++++++++ krebs/Zhosts/mkdir | 11 +++++++++++ krebs/Zhosts/monitor | 11 +++++++++++ krebs/Zhosts/mors | 10 ++++++++++ krebs/Zhosts/motor | 12 ++++++++++++ krebs/Zhosts/mu | 10 ++++++++++ krebs/Zhosts/muhbaasu | 13 +++++++++++++ krebs/Zhosts/nomic | 10 ++++++++++ krebs/Zhosts/nomic2 | 10 ++++++++++ krebs/Zhosts/nukular | 11 +++++++++++ krebs/Zhosts/omo | 9 +++++++++ krebs/Zhosts/pic | 11 +++++++++++ krebs/Zhosts/pigstarter | 13 +++++++++++++ krebs/Zhosts/pike | 11 +++++++++++ krebs/Zhosts/pnp | 11 +++++++++++ krebs/Zhosts/pornocauster | 10 ++++++++++ krebs/Zhosts/radiotuxmini | 11 +++++++++++ krebs/Zhosts/random | 10 ++++++++++ krebs/Zhosts/raspafari | 11 +++++++++++ krebs/Zhosts/reimae | 12 ++++++++++++ krebs/Zhosts/rmdir | 11 +++++++++++ krebs/Zhosts/robchina | 11 +++++++++++ krebs/Zhosts/rockit | 11 +++++++++++ krebs/Zhosts/rtjure_debian_oder_so | 11 +++++++++++ krebs/Zhosts/rtjure_ras