about summary refs log tree commit diff
path: root/users/wpcarro/boilerplate/clojure
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-13T22·51+0300
committerVincent Ambo <mail@tazj.in>2021-12-13T23·15+0300
commit019f8fd2113df4c5247c3969c60fd4f0e08f91f7 (patch)
tree76a857f61aa88f62a30e854651e8439db77fd0ea /users/wpcarro/boilerplate/clojure
parent464bbcb15c09813172c79820bcf526bb10cf4208 (diff)
parent6123e976928ca3d8d93f0b2006b10b5f659eb74d (diff)
subtree(users/wpcarro): docking briefcase at '24f5a642' r/3226
git-subtree-dir: users/wpcarro
git-subtree-mainline: 464bbcb15c09813172c79820bcf526bb10cf4208
git-subtree-split: 24f5a642af3aa1627bbff977f0a101907a02c69f
Change-Id: I6105b3762b79126b3488359c95978cadb3efa789
Diffstat (limited to 'users/wpcarro/boilerplate/clojure')
-rw-r--r--users/wpcarro/boilerplate/clojure/.envrc2
-rw-r--r--users/wpcarro/boilerplate/clojure/.gitignore4
-rw-r--r--users/wpcarro/boilerplate/clojure/README.md33
-rw-r--r--users/wpcarro/boilerplate/clojure/project.clj2
-rw-r--r--users/wpcarro/boilerplate/clojure/shell.nix8
-rw-r--r--users/wpcarro/boilerplate/clojure/src/main.clj8
6 files changed, 57 insertions, 0 deletions
diff --git a/users/wpcarro/boilerplate/clojure/.envrc b/users/wpcarro/boilerplate/clojure/.envrc
new file mode 100644
index 000000000000..a4a62da526d3
--- /dev/null
+++ b/users/wpcarro/boilerplate/clojure/.envrc
@@ -0,0 +1,2 @@
+source_up
+use_nix
diff --git a/users/wpcarro/boilerplate/clojure/.gitignore b/users/wpcarro/boilerplate/clojure/.gitignore
new file mode 100644
index 000000000000..f24c5e393a28
--- /dev/null
+++ b/users/wpcarro/boilerplate/clojure/.gitignore
@@ -0,0 +1,4 @@
+/.lein-repl-history
+/target
+/?
+/.nrepl-port
\ No newline at end of file
diff --git a/users/wpcarro/boilerplate/clojure/README.md b/users/wpcarro/boilerplate/clojure/README.md
new file mode 100644
index 000000000000..2eec7f75e063
--- /dev/null
+++ b/users/wpcarro/boilerplate/clojure/README.md
@@ -0,0 +1,33 @@
+# Clojure Boilerplate
+
+This boilerplate uses `lein` to manage the project.
+
+## Files to change
+
+To use this boilerplate, run the following in a shell:
+
+```shell
+$ cp ~/briefcase/boilerplate/clojure path/to/new-project
+```
+
+After running the above command, change the following files to remove the
+placeholder values:
+
+- `README.md`: Change the title; change the description; drop "Files to change";
+  keep "Getting started"
+- `project.clj`: Change title
+- `src/main.clj`: Change `:doc`; drop `main/foo`
+
+## Getting started
+
+From a shell, run:
+
+```shell
+$ lein repl
+```
+
+From Emacs, navigate to a source code buffer and run:
+
+```
+M-x cider-jack-in
+```
diff --git a/users/wpcarro/boilerplate/clojure/project.clj b/users/wpcarro/boilerplate/clojure/project.clj
new file mode 100644
index 000000000000..54e34eab7a5d
--- /dev/null
+++ b/users/wpcarro/boilerplate/clojure/project.clj
@@ -0,0 +1,2 @@
+(defproject boilerplate "0.0.1"
+  :dependencies [[org.clojure/clojure "1.8.0"]])
diff --git a/users/wpcarro/boilerplate/clojure/shell.nix b/users/wpcarro/boilerplate/clojure/shell.nix
new file mode 100644
index 000000000000..efa854422eae
--- /dev/null
+++ b/users/wpcarro/boilerplate/clojure/shell.nix
@@ -0,0 +1,8 @@
+let
+  briefcase = import <briefcase> {};
+  pkgs = briefcase.third_party.pkgs;
+in pkgs.mkShell {
+  buildInputs = with pkgs; [
+    leiningen
+  ];
+}
diff --git a/users/wpcarro/boilerplate/clojure/src/main.clj b/users/wpcarro/boilerplate/clojure/src/main.clj
new file mode 100644
index 000000000000..f6b60dba404e
--- /dev/null
+++ b/users/wpcarro/boilerplate/clojure/src/main.clj
@@ -0,0 +1,8 @@
+(ns ^{:doc "Top-level module."
+      :author "William Carroll"}
+    main)
+
+(declare main)
+
+(defn foo [a b]
+  (+ a b))