about summary refs log tree commit diff
path: root/web/tvl
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-04-21T02·38+0100
committerVincent Ambo <tazjin@google.com>2020-04-21T02·38+0100
commit1faf44b3b325fe81f0d69b804778ae5d8f92dcd7 (patch)
treefeacdf10ab3159fb9169a5885260ad90c327aff3 /web/tvl
parent4683b24e14c03f6f8fec5dc588fd9777bb663ff1 (diff)
feat(web/tvl): Add rendered graphviz graph to the page r/654
Diffstat (limited to 'web/tvl')
-rw-r--r--web/tvl/default.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/web/tvl/default.nix b/web/tvl/default.nix
index 17936599fd00..2b2d2df211cb 100644
--- a/web/tvl/default.nix
+++ b/web/tvl/default.nix
@@ -1,7 +1,13 @@
 { depot, pkgs, ... }:
 
 let
-  inherit (pkgs) writeText runCommandNoCC;
+  inherit (pkgs) graphviz runCommandNoCC writeText;
+
+  tvlGraph = runCommandNoCC "tvl.png" {
+    nativeBuildInputs = with pkgs; [ fontconfig freetype cairo jetbrains-mono ];
+  } ''
+    ${graphviz}/bin/neato -Tpng ${./tvl.dot} > $out
+  '';
 
   homepage = writeText "index.html" ''
     <!DOCTYPE html>
@@ -44,6 +50,14 @@ let
       </p>
 
       <hr>
+      <h2>Where did all these people come from?</h2>
+
+      <p>
+        It's pretty straightforward.
+      </p>
+      <img src="/static/tvl.png" alt="Who's who?">
+
+      <hr>
       <footer>
         <p class="footer">
           <a class="uncoloured-link" href="https://tazj.in">homepage</a>
@@ -60,6 +74,7 @@ in runCommandNoCC "website" {} ''
   mkdir -p $out/static
   cp ${homepage} $out/index.html
   cp -r ${./static}/* $out/static
+  cp ${tvlGraph} $out/static/tvl.png
 
   # Some assets are stolen from the blog
   cp ${depot.web.homepage}/static/jetbrains-* $out/static