Monorepo for Tangled
1{
2 runCommandLocal,
3 htmx-src,
4 htmx-ws-src,
5 lucide-src,
6 inter-fonts-src,
7 ibm-plex-mono-src,
8 actor-typeahead-src,
9 mermaid-src,
10 sqlite-lib,
11 tailwindcss,
12 dolly,
13 src,
14}:
15runCommandLocal "appview-static-files" {
16 # TOOD(winter): figure out why this is even required after
17 # changing the libraries that the tailwindcss binary loads
18 sandboxProfile = ''
19 (allow file-read* (subpath "/System/Library/OpenSSL"))
20 '';
21} ''
22 mkdir -p $out/{fonts,icons,logos} && cd $out
23 cp -f ${htmx-src} htmx.min.js
24 cp -f ${htmx-ws-src} htmx-ext-ws.min.js
25 cp -f ${mermaid-src} mermaid.min.js
26 cp -rf ${lucide-src}/*.svg icons/
27 cp -f ${inter-fonts-src}/web/InterVariable*.woff2 fonts/
28 cp -f ${inter-fonts-src}/web/InterDisplay*.woff2 fonts/
29 cp -f ${inter-fonts-src}/InterVariable*.ttf fonts/
30 cp -f ${ibm-plex-mono-src}/fonts/complete/woff2/IBMPlexMono*.woff2 fonts/
31 cp -f ${actor-typeahead-src}/actor-typeahead.js .
32
33 ${dolly}/bin/dolly -output logos/dolly.png -size 180x180
34 ${dolly}/bin/dolly -output logos/dolly.ico -size 48x48
35 ${dolly}/bin/dolly -output logos/dolly.svg -color currentColor
36 # tailwindcss -c $src/tailwind.config.js -i $src/input.css -o tw.css won't work
37 # for whatever reason (produces broken css), so we are doing this instead
38 cd ${src} && ${tailwindcss}/bin/tailwindcss -i input.css -o $out/tw.css
39''