summaryrefslogtreecommitdiff
path: root/src/http/static/markov
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2023-08-13 22:06:32 +0200
committerBrian Picciano <mediocregopher@gmail.com>2023-08-13 22:06:32 +0200
commitc4ec9064063f3b15aeb25feb85a3afaaa02008ba (patch)
treec7e9878f69ecc4649024c57e3164b2337ba0fdf2 /src/http/static/markov
parent0bc9cd83b45df0a38c2944569603d6d9cf2e9edd (diff)
Remove leftover static assets specific to individual blog posts
Diffstat (limited to 'src/http/static/markov')
-rw-r--r--src/http/static/markov/Makefile3
-rw-r--r--src/http/static/markov/markov.nix63
2 files changed, 0 insertions, 66 deletions
diff --git a/src/http/static/markov/Makefile b/src/http/static/markov/Makefile
deleted file mode 100644
index 4195baf..0000000
--- a/src/http/static/markov/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-bundle:
- nix-build markov.nix -A nixBundle
- ./result/bin/nix-bundle '((import ./markov.nix) {}).entrypoint' '/bin/markov'
diff --git a/src/http/static/markov/markov.nix b/src/http/static/markov/markov.nix
deleted file mode 100644
index 042ab8d..0000000
--- a/src/http/static/markov/markov.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d50923ab2d308a1ddb21594ba6ae064cab65d8ae.tar.gz") {}
-}:
-
-rec {
-
- markov = pkgs.buildGoModule {
- pname = "markov";
- version = "618b666484566de71f2d59114d011ff4621cf375";
- src = pkgs.fetchFromGitHub {
- owner = "mediocregopher";
- repo = "markov";
- rev = "618b666484566de71f2d59114d011ff4621cf375";
- sha256 = "1sx9dr1q3vr3q8nyx3965x6259iyl85591vx815g1xacygv4i4fg";
- };
- vendorSha256 = "048wygrmv26fsnypsp6vxf89z3j0gs9f1w4i63khx7h134yxhbc6";
- };
-
- entrypoint = pkgs.writeScriptBin "markov" ''
- #!${pkgs.stdenv.shell}
-
- # On every run we create new, temporary, configuration files for redis and
- # circus. To do this we create a new config directory.
- markovCfgDir=$(${pkgs.coreutils}/bin/mktemp -d)
- echo "generating configuration to $markovCfgDir"
-
- ${pkgs.coreutils}/bin/cat >$markovCfgDir/redis.conf <<EOF
- save ""
- dir "''${MARKOV_DATA_DIR:-$(pwd)}"
- appendonly yes
- appendfilename "markov.data"
- EOF
-
- ${pkgs.coreutils}/bin/cat >$markovCfgDir/circus.ini <<EOF
-
- [circus]
-
- [watcher:markov]
- cmd = ${markov}/bin/markov \
- -listenAddr ''${MARKOV_LISTEN_ADDR:-localhost:8000} \
- -timeout ''${MARKOV_TIMEOUT:-720}
- numprocesses = 1
-
- [watcher:redis]
- cmd = ${pkgs.redis}/bin/redis-server $markovCfgDir/redis.conf
- numprocesses = 1
- EOF
-
- exec ${pkgs.circus}/bin/circusd $markovCfgDir/circus.ini
- '';
-
- nixBundleSrc = pkgs.fetchFromGitHub {
- owner = "matthewbauer";
- repo = "nix-bundle";
- rev = "8e396533ef8f3e8a769037476824d668409b4a74";
- sha256 = "1lrq0990p07av42xz203w64abv2rz9xd8jrzxyvzzwj7vjj7qwyw";
- };
-
- nixBundle = (import "${nixBundleSrc}/release.nix") {
- nixpkgs' = pkgs;
- };
-}
-