It's now possible to build eko and eko-server with flake.nix

This commit is contained in:
2025-07-21 16:22:11 +03:00
parent 7d5ce5721b
commit 15cc391221
6 changed files with 167 additions and 26 deletions

View File

@@ -17,13 +17,22 @@
package main
import (
"fmt"
"log"
"os"
"github.com/kyren223/eko/embeds"
"github.com/kyren223/eko/internal/client"
)
func main() {
if len(os.Args) > 1 && os.Args[1] == "-v" {
fmt.Println("version:", embeds.Version)
fmt.Println("commit:", embeds.Commit)
fmt.Println("build date:", embeds.BuildDate)
return
}
logFile, err := os.OpenFile("client.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600)
if err != nil {
log.Fatalln(err)

View File

@@ -48,6 +48,13 @@ const (
var prod = true
func main() {
if len(os.Args) > 1 && os.Args[1] == "-v" {
fmt.Println("version:", embeds.Version)
fmt.Println("commit:", embeds.Commit)
fmt.Println("build date:", embeds.BuildDate)
return
}
prodFlag := flag.Bool("prod", true, "true for production mode, false for dev mode")
flag.Parse()
prod = *prodFlag