diff options
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/simple/ergo/default.nix | 23 | ||||
-rw-r--r-- | krebs/5pkgs/simple/hashPassword/default.nix | 2 | ||||
-rw-r--r-- | krebs/5pkgs/simple/htgen/default.nix | 7 | ||||
-rw-r--r-- | krebs/5pkgs/simple/nix-prefetch-github.nix | 25 | ||||
-rw-r--r-- | krebs/5pkgs/simple/stable-generate/default.nix | 64 | ||||
-rw-r--r-- | krebs/5pkgs/simple/weechat-declarative/default.nix | 5 |
6 files changed, 71 insertions, 55 deletions
diff --git a/krebs/5pkgs/simple/ergo/default.nix b/krebs/5pkgs/simple/ergo/default.nix deleted file mode 100644 index 2c9223eed..000000000 --- a/krebs/5pkgs/simple/ergo/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ buildGo117Module , fetchFromGitHub, lib }: - -buildGo117Module rec { - pname = "ergo"; - version = "2.9.1"; - - src = fetchFromGitHub { - owner = "ergochat"; - repo = "ergo"; - rev = "v${version}"; - sha256 = "sha256-RxsmkTfHymferS/FRW0sLnstKfvGXkW6cEb/JbeS4lc="; - }; - - vendorSha256 = null; - - meta = { - description = "A modern IRC server (daemon/ircd) written in Go"; - homepage = "https://github.com/ergochat/ergo"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ lassulus tv ]; - platforms = lib.platforms.linux; - }; -} diff --git a/krebs/5pkgs/simple/hashPassword/default.nix b/krebs/5pkgs/simple/hashPassword/default.nix index 3c604be80..8d3ba2525 100644 --- a/krebs/5pkgs/simple/hashPassword/default.nix +++ b/krebs/5pkgs/simple/hashPassword/default.nix @@ -1,6 +1,6 @@ { lib, pkgs, ... }: -pkgs.writeDashBin "hashPassword" '' +pkgs.writers.writeDashBin "hashPassword" '' # usage: hashPassword [...] set -euf diff --git a/krebs/5pkgs/simple/htgen/default.nix b/krebs/5pkgs/simple/htgen/default.nix index 14b6f4c58..1ee13783b 100644 --- a/krebs/5pkgs/simple/htgen/default.nix +++ b/krebs/5pkgs/simple/htgen/default.nix @@ -1,13 +1,12 @@ { fetchgit, lib, pkgs, stdenv }: stdenv.mkDerivation rec { pname = "htgen"; - version = "1.3.1"; + version = "1.4.0"; - #src = <htgen>; src = fetchgit { - url = "http://cgit.krebsco.de/htgen"; + url = "https://cgit.krebsco.de/htgen"; rev = "refs/tags/${version}"; - sha256 = "0ml8kp89bwkrwy6iqclzyhxgv2qn9dcpwaafbmsr4mgcl70zx22r"; + sha256 = "1k6xdr4g1p2wjiyizwh33ihw3azbar7kmhyxywcq0whpip9inpmj"; }; installPhase = '' diff --git a/krebs/5pkgs/simple/nix-prefetch-github.nix b/krebs/5pkgs/simple/nix-prefetch-github.nix deleted file mode 100644 index 14096c33f..000000000 --- a/krebs/5pkgs/simple/nix-prefetch-github.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ curl, jq, nix, writeDashBin }: - -writeDashBin "nix-prefetch-github" '' - # usage: nix-prefetch-github OWNER REPO [REF] - set -efu - - owner=$1 - repo=$2 - ref=''${3-master} - - info_url=https://api.github.com/repos/$owner/$repo/commits/$ref - info=$(${curl}/bin/curl -fsS "$info_url") - rev=$(printf %s "$info" | ${jq}/bin/jq -r .sha) - - name=$owner-$repo-$ref - url=https://github.com/$owner/$repo/tarball/$rev - sha256=$(${nix}/bin/nix-prefetch-url --name "$name" --unpack "$url") - - export owner repo rev sha256 - ${jq}/bin/jq -n ' - env | { - owner, repo, rev, sha256 - } - ' -'' diff --git a/krebs/5pkgs/simple/stable-generate/default.nix b/krebs/5pkgs/simple/stable-generate/default.nix new file mode 100644 index 000000000..fac261613 --- /dev/null +++ b/krebs/5pkgs/simple/stable-generate/default.nix @@ -0,0 +1,64 @@ +{ pkgs, lib, ... }: + +pkgs.writers.writeDashBin "stable-generate" '' + set -efu + + export PATH=${lib.makeBinPath [ + pkgs.curl + pkgs.jq + ]} + + STABLE_URL=''${STABLE_URL:-http://stable-confusion.r} + + PAYLOAD=$(jq -cn --arg query "$*" '{fn_index: 51, data: [ + $query, + "", + "None", + "None", + 20, # sampling steps + "Euler a", # sampling method + false, # restore faces + false, + 1, + 1, + 7, + -1, + -1, + 0, + 0, + 0, + false, + 512, #probably resolution + 512, #probably resolution + false, + 0.7, + 0, + 0, + "None", + "", + false, + false, + false, + "", + "Seed", + "", + "Nothing", + "", + true, + false, + false, + null, + "", + ""], session_hash: "hello_this_is_dog"}') + + data=$(curl -Ssf "$STABLE_URL/run/predict/" \ + -X POST \ + --Header 'Content-Type: application/json' \ + --data "$PAYLOAD" + ) + export data + + filename=$(jq -rn 'env.data | fromjson.data[0][0].name') + + echo "$STABLE_URL/file=$filename" +'' diff --git a/krebs/5pkgs/simple/weechat-declarative/default.nix b/krebs/5pkgs/simple/weechat-declarative/default.nix index 5f9c8635b..93c73761c 100644 --- a/krebs/5pkgs/simple/weechat-declarative/default.nix +++ b/krebs/5pkgs/simple/weechat-declarative/default.nix @@ -33,7 +33,7 @@ let eval = lib.evalModules { modules = lib.singleton { - _file = toString ./weechat-declarative.nix; + _file = toString ./default.nix; imports = lib.singleton config; options = { scripts = lib.mkOption { @@ -148,7 +148,8 @@ let ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: target: /* sh */ '' - ${pkgs.coreutils}/bin/ln -s ${lib.escapeShellArg target} "$CONFDIR"/${lib.escapeShellArg name} + ${pkgs.coreutils}/bin/cp ${lib.escapeShellArg target} "$CONFDIR"/${lib.escapeShellArg name} + ${pkgs.coreutils}/bin/chmod +w "$CONFDIR"/${lib.escapeShellArg name} '') cfg.files ) |