doerg-parser

This commit is contained in:
2026-01-31 04:18:24 -07:00
parent 39c13c764b
commit 262a5f680c
13 changed files with 287 additions and 24 deletions
+11
View File
@@ -0,0 +1,11 @@
((nil
. ((cider-clojure-cli-aliases . ":dev")
(eval
. (progn
(defun start-deertopia-server ()
(let ((n (cider-format-connection-params "%j" cider-launch-params)))
(when (equal n "deertopia.net")
(cider-interactive-eval
"(do (require '[net.deertopia.publish.server :as server])
(server/start!))"))))
(add-hook 'cider-connected-hook #'start-deertopia-server))))))
+28 -5
View File
@@ -1,13 +1,21 @@
;; -*- mode:clojure -*-
;;; -*- mode:clojure -*-
;;;
;;; USAGE:
;;;
;;; bb -cp . -m override-deps -- [DEP-NAME INFO]…
;;;
;;; This script takes a series of deps substitutions on the command
;;; line, applies them to a deps.edn file (read on stdin), and spits
;;; the result to stdout.
;;;
;;; It is used to build the Doerg server with Nix, since Clj-nix does
;;; not resolve the local deps itself.
(ns override-deps
(:require [rewrite-clj.zip :as z]
[babashka.fs :as fs]
[clojure.edn :as edn]))
#_
(def overrides '{net.deertopia/doerg "blah!!!!"
ring/ring-defaults {:mvn/version "xxxxx"}})
(defn apply-overrides [zloc overrides]
(loop [os (seq overrides)
loc zloc]
@@ -28,3 +36,18 @@
(apply-overrides overrides)
z/root-string
print)))
(comment
"Example overrides"
(def overrides '{net.deertopia/doerg "blah!!!!"
ring/ring-defaults {:mvn/version "xxxxx"}}))
(comment
"Behaviour of `args->overrides`."
(= (args->overrides ["net.deertopia/doerg" "{:mvn/version \"abc\"}"
"ring/ring-defaults" "{:local/root \"/path/to/jar\"}"])
'{ring/ring-defaults {:local/root "/path/to/jar"}
net.deertopia/doerg {:mvn/version "abc"}}))
+1 -1
View File
@@ -5,7 +5,7 @@
mkCljBin {
name = "net.deertopia/server";
version = "1.0.0";
version = "0.1.0";
projectSrc = ./.;
lockfile = ../deps-lock.json;
main-ns = "net.deertopia.server.main";