# Make your own Racket 🥁

**URL:** <https://racket.discourse.group/t/make-your-own-racket/3485>\
**Category:** Show & Tell\
**Created:** [January 13, 2025, 12:56am UTC](https://racket.discourse.group/t/make-your-own-racket/3485 "2025-01-13T00:56:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [January 13, 2025, 12:56am UTC](https://racket.discourse.group/t/make-your-own-racket/3485/1 "2025-01-13T00:56:57Z")

</div>

Did you know you can make your own Racket installer?

Racket has _so many options_, and I have a habit of destroying my configuration file. As some point in the past I started thinking about creating an installer that installed Racket to **my specifications**. After all, there is a chapter that is enticingly titled [Distributing Racket Variants](https://docs.racket-lang.org/racket-build-guide/distribute.html):

> This chapter is about distributing variants of Racket

I can't remember what prompted me, but this weekend I set the terminal to green on black 👔, and posted all my failures to the #off-topic channel on the discord.

I have to thank Matthew for being incredibly kind with this process.

So with all this preamble you would think this is an incredibly difficult piece of 'rocket surgery' but it turns out to be quite simple in practice. Here goes:

1. make a clean checkout of [GitHub - racket/racket: The Racket repository](https://github.com/racket/racket)
2. put your `site.rkt` file in the checkout
3. run `make installers CONFIG=site.rkt`

You have to wait a bit but I find the Racket build process is a soothing experience, with an ASMR-like effect. YMMV.

While waiting consider the `site.rkt` file is written in [`#lang distro-build/config`](https://docs.racket-lang.org/distro-build/index.html)

Here is mine:

```scheme
#lang distro-build/config

(machine
 #:pkgs '("2d"
          "at-exp-lib"
          "compatibility"
          "contract-profile"
          "compiler"
          "data"
          "datalog"
          "db"
          "draw"
          "draw-doc"
          "draw-lib"
          "drracket"
          "drracket-tool"
          "expeditor"
          "errortrace"
          "future-visualizer"
          "future-visualizer-typed"
          "gui"
          "htdp"
          "html"
          "icons"
          "images"
          "lazy"
          "macro-debugger"
          "macro-debugger-text-lib"
          "make"
          "math"
          "mysterx"
          "mzcom"
          "mzscheme"
          "net"
          "net-cookies"
          "optimization-coach"
          "option-contract"
          "parser-tools"
          "pconvert-lib"
          "pict"
          "pict-snip"
          "plai"
          "planet"
          "plot"
          "preprocessor"
          "profile"
          "racket-doc"
          "distributed-places"
          "racket-cheat"
          "racket-index"
          "racket-lib"
          "racklog"
          "rackunit"
          "rackunit-typed"
          "readline"
          "realm"
          "redex"
          "rhombus"
          "quickscript-extra"
          "sandbox-lib"
          "sasl"
          "schemeunit"
          "scribble"
          "serialize-cstruct-lib"
          "sgl"
          "shell-completion"
          "simple-tree-text-markup"
          "slatex"
          "slideshow"
          "snip"
          "srfi"
          "string-constants"
          "syntax-color"
          "trace"
          "typed-racket"
          "typed-racket-more"
          "unix-socket"
          "web-server"
          "wxme"
          "xrepl"
          "ds-store"))

```

I removed a couple of things I don't use and added [The Rhombus programming language](https://github.com/racket/rhombus) and [Quickscript-extra](https://pkgs.racket-lang.org/package/quickscript-extra)

[site.rkt for making your own Racket. · GitHub](https://gist.github.com/spdegabrielle/cb0b8e0987730f6dc09867afcc76f718)

At the end it spits out an installer into the bundle folder. In my case it was called 'racket-8.15.0.12-aarch64-macosx.dmg', but I'm assuming it will work much the same on Windows or Linux.

I've made my 'racket-8.15.0.12-aarch64-macosx.dmg' installer available for download at [Releases · spdegabrielle/racket · GitHub](https://github.com/spdegabrielle/racket/releases) - but don't use mine - `make` your own Racket 🥁

* * *

## Lessons learnt:

1. Just ask questions. People are kind.
2. don't make checkout of spdegabrielle/racket because spdegabrielle is over 100 commits behind and it will fail.
3. Don't put the checkout in a folder mapped to iCloud Drive. It causes `make installers` to fail. (I should know from experiencing how both Google Drive for desktop and Microsoft OneDrive cause _unexpected behaviour_.)
4. You can just start with minimal-Racket and just install what you need. That is a valid approach. (Does it take far longer to do this? Yes.)

## What next?

1. Work out how to include my own default preferences file
  - White on black colour scheme
  - Disable 'Enable keybindings in menus'. (enable Emacs keybindings)
  - Enable automate parentheses, squar bracket, and quotes
  - Restore open files from previous session

2. remove the documentation and point to [https://docs.racket-lang.org/](https://docs.racket-lang.org/)
3. add some DrRacket plugins (add the packages to my sites.rkt)
  - [sauron](https://pkgs.racket-lang.org/package/sauron)
  - [todo-list](https://pkgs.racket-lang.org/package/todo-list)
  - forge [forge](https://pkgs.racket-lang.org/package/forge)

4. add more packages to my sites.rkt
  - [raco-static-web](https://pkgs.racket-lang.org/package/raco-static-web)
  - [https://pkgs.racket-lang.org/package/new](https://pkgs.racket-lang.org/package/new)

5. work out how to cross-compile to Windows and Linux so I can share with others
6. Do other minimal versions:
  - DrRacket only
  - Slideshow only
  - _scribble only_
  - Just the games package

**Will you `make' your own Racket?** [Geddit?](https://dictionary.cambridge.org/dictionary/english/geddit#google_vignette) ( I crack myself up.)

Love to you all  
Stephen :beetle:

PS: my installer: [https://github.com/spdegabrielle/racket/releases/tag/v7.7](https://github.com/spdegabrielle/racket/releases/tag/v7.7). ( Ignore the incorrect tag. )

PPS I forgot to add 'set rhombus as default `#lang` so I engage with it properly instead of reverting back to `#lang Racket`'

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [March 18, 2025, 5:34pm UTC](https://racket.discourse.group/t/make-your-own-racket/3485/2 "2025-03-18T17:34:35Z")

</div>

Update from @mflatt over discord

> You might be interested to try this again from Git sources. Robby has trimmed the dependencies of the `drracket` package (so it doesn't insist on `htdp-lib` , for example). And there's now a `drracket-core-lib` package that is DrRacket with minimal extensions and no documentation. The `drracket-core` package is in between and seems useful in principle, but its transitive closure of its dependencies turns out to be not much smaller than the (newly trimmed) `drracket` package. Documentation dependencies tend to pull in extra things, but sometimes those can be reduced by changing a document to use indirect cross-references. Meanwhile, I'm not sure it can work to use a release like 8.16 to build a different distribution; the intent is to work from original sources.

I have tried it and it does work for my mega-build, but I've got to try making it as small as possible, cause I've put too many things in and it is a monster now.

🧌

```scheme
#lang distro-build/config

(machine
 #:pkgs '("2d"
          "at-exp-lib"
          "compatibility"
          "contract-profile"
          "compiler"
          "data"
          "datalog"
          "db"
          "draw"
          "draw-doc"
          "draw-lib"
          "drracket-core-lib"
          "drracket-tool"
          "expeditor"
          "errortrace"
          "future-visualizer"
          "future-visualizer-typed"
          "gui"
          "html"
          "icons"
          "images"
          "lazy"
          "macro-debugger"
          "macro-debugger-text-lib"
          "make"
          "markdown"
          "math"
          "mysterx"
          "mzcom"
          "mzscheme"
          "net"
          "net-cookies"
          "optimization-coach"
          "option-contract"
          "parser-tools"
          "pconvert-lib"
          "pict"
          "pict-snip"
          "planet"
          "plot"
          "preprocessor"
          "profile"
          "qi"          
          "quickscript-extra"
          "racket-doc"
          "distributed-places"
          "racket-cheat"
          "racket-index"
          "racket-lib"
          "racklog"
          "rackunit"
          "rackunit-typed"
          "readline"
          "realm"
          "rebellion"
          "redex"
          "rhombus"
          "raco-static-web"
          "sandbox-lib"
          "sasl"
          "sauron"
          "schemeunit"
          "scribble"
          "serialize-cstruct-lib"
          "sgl"
          "shell-completion"
          "simple-tree-text-markup"
          "slatex"
          "slideshow"
          "snip"
          "srfi"
          "string-constants"
          "syntax-color"
          "todo-list"
          "trace"
          "typed-racket"
          "typed-racket-more"
          "unix-socket"
          "web-server"
          "wxme"
          "xrepl"
          "ds-store"))

```
