nandi/freeqsay-nimpublic Fork 0
b248dcf49f97f0bc4ec74cdc78dfe62d9bf11257
Commits
Clone
git clone https://git.rickub.com/nandi/freeqsay-nim.git
git clone ssh://git@rickub.com/nandi/freeqsay-nim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

justfile · 53 lines · 1.8 KBMakefile Blame HistoryRaw
freeqsay: Nim port of the Clojure implementation fa53aa2 nandi 21h ago1# freeqsay recipes. Everything here assumes nim on PATH.
2
just install: put the static binary on PATH b248dcf nandi 12h ago3bindir := env_var_or_default("PREFIX", env_var("HOME") / ".local/bin")
4
freeqsay: Nim port of the Clojure implementation fa53aa2 nandi 21h ago5# Show the recipes.
6default:
7 @just --list
8
9# Compile the standalone binary (optimized).
10build:
11 nim c -d:release -d:ssl --hints:off -o:freeqsay src/freeqsay.nim
12
just install: put the static binary on PATH b248dcf nandi 12h ago13# Compile a fully static binary → ./freeqsay-static (no glibc, no dlopen'd TLS).
just static: fully static builds through a pinned nimstatic 078b24d nandi 18h ago14static:
just install: put the static binary on PATH b248dcf nandi 12h ago15 # tools/nimstatic is a DotSlash file: the first run fetches the pinned
16 # nimstatic release, verifies its hash and caches it.
just static: fully static builds through a pinned nimstatic 078b24d nandi 18h ago17 ./tools/nimstatic src/freeqsay.nim -o freeqsay-static -- -d:ssl
18
just install: put the static binary on PATH b248dcf nandi 12h ago19# Install the static binary as `freeqsay` (default ~/.local/bin, or `just install ~/bin`).
20install dir=bindir: static
21 #!/usr/bin/env bash
22 set -euo pipefail
23 mkdir -p "{{dir}}"
24 install -m755 freeqsay-static "{{dir}}/freeqsay"
25 echo "installed {{dir}}/freeqsay"
26 # An install nobody can run is not an install: say so now rather than let
27 # it be discovered later.
28 case ":$PATH:" in
29 *":{{dir}}:"*) "{{dir}}/freeqsay" did:plc:ewvi7nmzuoqusbcablsm7c4h "on your PATH" ;;
30 *) echo "note: {{dir}} is not on your PATH. Add to your shell profile:"
31 echo " export PATH=\"{{dir}}:\$PATH\"" ;;
32 esac
33
34# Remove an installed freeqsay.
35uninstall dir=bindir:
36 rm -f "{{dir}}/freeqsay"
37 @echo "removed {{dir}}/freeqsay"
38
freeqsay: Nim port of the Clojure implementation fa53aa2 nandi 21h ago39# Run the test suite.
40test:
41 nim c -d:ssl --hints:off -r tests/test_avatar.nim
42
43# Run from source, without an optimized build: `just run jay.bsky.team hello`.
44run *args:
45 nim r -d:ssl --hints:off src/freeqsay.nim {{args}}
46
just install: put the static binary on PATH b248dcf nandi 12h ago47# Screenshot the output, gapless: `just shot jay.bsky.team hello`.
freeqsay: Nim port of the Clojure implementation fa53aa2 nandi 21h ago48shot *args:
49 termshot -c -C 80 -f freeqsay.png -- nim r -d:ssl --hints:off src/freeqsay.nim {{args}}
50
51# Remove build output and caches.
52clean:
just install: put the static binary on PATH b248dcf nandi 12h ago53 rm -rf freeqsay freeqsay-static tests/test_avatar nimcache tests/nimcache