From 6607ca0ec6565130aaec80cc750ce5d3cde15924 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Fri, 11 Aug 2023 19:47:15 -0400 Subject: cmd/yeet: revolutionize a few apps Signed-off-by: Xe Iaso --- cmd/within.website/config.ts | 37 +++++++++++++++++++++++++++++++++++++ cmd/within.website/yeetfile.js | 7 ++++--- 2 files changed, 41 insertions(+), 3 deletions(-) (limited to 'cmd/within.website') diff --git a/cmd/within.website/config.ts b/cmd/within.website/config.ts index e69de29..e79434d 100644 --- a/cmd/within.website/config.ts +++ b/cmd/within.website/config.ts @@ -0,0 +1,37 @@ +export interface Repo { + kind: "gitea" | "github"; + domain: string; + user: string; + repo: string; + description: string; +} + +const githubRepo = (name: string, description: string): Repo => { + return { + kind: "github", + domain: "github.com", + user: "Xe", + repo: name, + description, + }; +}; + +const giteaRepo = (name: string, description: string): Repo => { + return { + kind: "gitea", + domain: "tulpa.dev", + user: "cadey", + repo: name, + description, + }; +}; + +const repos: Repo[] = [ + githubRepo("derpigo", "A Derpibooru/Furbooru API client in Go. This is used to monitor Derpibooru/Furbooru for images by artists I care about and archive them."), + githubRepo("eclier", "A command router for Go programs that implements every command in Lua. This was an experiment for making extensible command-line applications with Lua for extending them."), + giteaRepo("gopher", "A Gopher (RFC 1436) client/server stack for Go applications. This allows users to write custom Gopher clients and servers."), + githubRepo("ln", "The natural log function for Go: an easy package for structured logging. This is the logging stack that I use for most of my personal projects."), + githubRepo("x", "Various experimental things. /x/ is my monorepo of side projects, hobby programming, and other explorations of how programming in Go can be."), +]; + +export default repos; diff --git a/cmd/within.website/yeetfile.js b/cmd/within.website/yeetfile.js index 676443e..b79868c 100644 --- a/cmd/within.website/yeetfile.js +++ b/cmd/within.website/yeetfile.js @@ -1,12 +1,13 @@ yeet.setenv("GOOS", "linux"); yeet.setenv("GOARCH", "amd64"); +yeet.setenv("CGO_ENABLED", "0"); go.build(); -slug.build("within.website", { +const fname = slug.build("within.website", { "config.ts": "config.ts" }); -const url = slug.push("within.website"); +const url = slug.push(fname); const hash = nix.hashURL(url); const expr = nix.expr`{ stdenv }: @@ -23,7 +24,7 @@ stdenv.mkDerivation { installPhase = '' tar xf $src mkdir -p $out/bin - cp web $out/bin/withinwebsite + cp bin/main $out/bin/withinwebsite cp config.ts $out/config.ts ''; } -- cgit v1.2.3