forked from
tangled.org/core
Monorepo for Tangled
1.8 kB
54 lines
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 hls-src,
11 mathjax-src,
12 tailwindcss,
13 tailwindcss-animated-src,
14 dolly,
15 src,
16 linkFarm,
17}: let
18 tailwindcss-plugins = linkFarm "tailwindcss-plugins" [
19 {
20 name = "tailwindcss-animated";
21 path = tailwindcss-animated-src;
22 }
23 ];
24in
25 runCommandLocal "appview-static-files" {
26 # TODO(winter): figure out why this is even required after
27 # changing the libraries that the tailwindcss binary loads
28 sandboxProfile = ''
29 (allow file-read* (subpath "/System/Library/OpenSSL"))
30 '';
31 } ''
32 mkdir -p $out/{fonts,icons,logos} && cd $out
33 cp -f ${htmx-src} htmx.min.js
34 cp -f ${htmx-ws-src} htmx-ext-ws.min.js
35 cp -f ${mermaid-src} mermaid.min.js
36 cp -f ${hls-src} hls.min.js
37 cp -f ${mathjax-src} mathjax.min.js
38 cp -rf ${lucide-src}/*.svg icons/
39 cp -rf ${src}/icons/*.svg icons/
40 cp -f ${inter-fonts-src}/web/InterVariable*.woff2 fonts/
41 cp -f ${inter-fonts-src}/web/InterDisplay*.woff2 fonts/
42 cp -f ${inter-fonts-src}/InterVariable*.ttf fonts/
43 cp -f ${ibm-plex-mono-src}/fonts/complete/woff2/IBMPlexMono*.woff2 fonts/
44 cp -f ${actor-typeahead-src}/actor-typeahead.js .
45 cp -rf ${src}/appview/pages/profile-fx .
46
47 ${dolly}/bin/dolly -output logos/dolly.png -size 180
48 ${dolly}/bin/dolly -output logos/dolly.ico -size 48
49 ${dolly}/bin/dolly -output logos/dolly.svg -color currentColor -favicon
50 # tailwindcss -c $src/tailwind.config.js -i $src/input.css -o tw.css won't work
51 # for whatever reason (produces broken css), so we are doing this instead
52 export NODE_PATH=${tailwindcss-plugins}
53 cd ${src} && ${tailwindcss}/bin/tailwindcss -i input.css -o $out/tw.css
54 ''