2020-08-06 15:35:49 +00:00
|
|
|
# Lisp is great, easy to learn, and weird.
|
|
|
|
# I've been using it to study creating languages and the famous SICP book.
|
|
|
|
# FUN FACT: Lisp is a family of languages with those parenthesis representing the mouth lisp, demonstrating how genetics work.
|
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.modules.dev.lisp;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.modules.dev.lisp =
|
|
|
|
let mkBoolDefault = bool: mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = bool;
|
|
|
|
}; in {
|
|
|
|
clojure.enable = mkBoolDefault false;
|
|
|
|
guile.enable = mkBoolDefault false;
|
|
|
|
racket.enable = mkBoolDefault false;
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
2020-08-16 08:33:44 +00:00
|
|
|
my.packages = with pkgs;
|
2020-08-06 15:35:49 +00:00
|
|
|
(if cfg.clojure.enable then [
|
|
|
|
clojure # Improved Java version.
|
2020-09-07 10:36:02 +00:00
|
|
|
leiningen # Install Clojure projects without pulling your hair.
|
2020-08-06 15:35:49 +00:00
|
|
|
] else []) ++
|
|
|
|
|
|
|
|
(if cfg.guile.enable then [
|
2020-09-07 10:36:02 +00:00
|
|
|
guile # A general-purpose language for stuff, named after a certain pop culture icon from an iconic fighting game.
|
2020-08-06 15:35:49 +00:00
|
|
|
] else []) ++
|
|
|
|
|
|
|
|
(if cfg.racket.enable then [
|
|
|
|
racket # A DSL for DSLs.
|
|
|
|
] else []);
|
|
|
|
};
|
|
|
|
}
|