summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r--krebs/5pkgs/simple/rss-bridge/default.nix33
-rw-r--r--krebs/5pkgs/simple/vicuna-chat/default.nix33
2 files changed, 0 insertions, 66 deletions
diff --git a/krebs/5pkgs/simple/rss-bridge/default.nix b/krebs/5pkgs/simple/rss-bridge/default.nix
deleted file mode 100644
index 2ad322d48..000000000
--- a/krebs/5pkgs/simple/rss-bridge/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ config, lib, pkgs, fetchFromGitHub, stdenv, ... }:
-
-stdenv.mkDerivation rec {
- pname = "rss-bridge";
- version = "unstable-2021-12-02";
-
- src = fetchFromGitHub {
- owner = "RSS-Bridge";
- repo = "rss-bridge";
- rev = "f469489b569d22fb5edbd13c6e5f5abf2a4ee186";
- sha256 = "sha256-LyxcycXbOFZR0mMDMUqAOjWrHIE2ftxkAYUGBbcQF5k==";
- };
-
- patchPhase = ''
- substituteInPlace lib/rssbridge.php \
- --replace "define('PATH_CACHE', PATH_ROOT . 'cache/');" "define('PATH_CACHE', getenv('RSSBRIDGE_DATA') . '/cache/');" \
- --replace "define('FILE_CONFIG', PATH_ROOT . 'config.ini.php');" "define('FILE_CONFIG', getenv('RSSBRIDGE_DATA') . '/config.ini.php');" \
- --replace "define('WHITELIST', PATH_ROOT . 'whitelist.txt');" "define('WHITELIST', getenv('RSSBRIDGE_DATA') . '/whitelist.txt');"
- '';
-
- installPhase = ''
- mkdir $out/
- cp -R ./* $out
- '';
-
- meta = with lib; {
- description = "The RSS feed for websites missing it";
- homepage = "https://github.com/RSS-Bridge/rss-bridge";
- license = licenses.unlicense;
- maintainers = with maintainers; [ dawidsowa ];
- platforms = platforms.all;
- };
-}
diff --git a/krebs/5pkgs/simple/vicuna-chat/default.nix b/krebs/5pkgs/simple/vicuna-chat/default.nix
deleted file mode 100644
index db15899d6..000000000
--- a/krebs/5pkgs/simple/vicuna-chat/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ pkgs, ... }:
-pkgs.writers.writeDashBin "vicuna-chat" ''
- set -efu
-
- export PATH=${with pkgs; lib.makeBinPath [
- coreutils
- curl
- jq
- ]}
-
- CONTEXT=''${CONTEXT:-$(date -Id)}
- PROMPT=$*
-
- if ! test -e "$CONTEXT"; then
- echo -n 'null' > "$CONTEXT"
- fi
-
- add_to_context() {
- jq -rc --argjson message "$1" '. + [$message]' "$CONTEXT" > "$CONTEXT.tmp"
- mv "$CONTEXT.tmp" "$CONTEXT"
- }
-
- add_to_context "{\"role\": \"user\", \"content\": \"$PROMPT\"}"
- response=$(
- jq -nc --slurpfile context "$CONTEXT" '{
- model: "vicuna-13b-v1.5-16k",
- messages: $context[0],
- }' |
- curl -Ss http://vicuna.r/v1/chat/completions -H 'Content-Type: application/json' -d @-
- )
- add_to_context "$(jq -rcn --argjson response "$response" '$response.choices[0].message')"
- jq -rcn --argjson response "$response" '$response.choices[0].message.content'
-''