diff --git a/flake.nix b/flake.nix
index 8c57619..33d0698 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,64 +8,120 @@
   inputs.pnpm2nix.inputs.nixpkgs.follows = "nixpkgs";
 
   outputs = { self, nixpkgs, flake-utils, clicks-server, pnpm2nix }:
-    flake-utils.lib.eachDefaultSystem (system: let
-      pkgs = nixpkgs.legacyPackages.${system};
-      nodejs = pkgs.nodejs_20;
-      nodePackages = pkgs.nodePackages_latest;
-      lib = pkgs.lib;
-    in rec {
-      devShells.default = pkgs.mkShell {
-        packages = [ nodejs nodePackages.pnpm pkgs.pkg-config pkgs.fontconfig.dev ];
-        shellHook = ''
-          unset name
-          export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${lib.makeSearchPath "/lib/pkgconfig" [
-            pkgs.pixman
-            pkgs.cairo.dev
-            pkgs.libpng.dev
-            pkgs.gnome2.pango.dev
-            pkgs.glib.dev
-            pkgs.harfbuzz.dev
-            pkgs.freetype.dev
-          ]}
-        '';
-      };
+    flake-utils.lib.eachDefaultSystem
+      (system:
+        let
+          pkgs = nixpkgs.legacyPackages.${system};
+          nodejs = pkgs.nodejs_20;
+          nodePackages = pkgs.nodePackages_latest;
+          lib = pkgs.lib;
+        in
+        rec {
+          devShells.default = pkgs.mkShell {
+            packages = [ nodejs nodePackages.pnpm pkgs.pkg-config pkgs.fontconfig.dev ];
+            shellHook = ''
+              unset name
+              export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${lib.makeSearchPath "/lib/pkgconfig" [
+                pkgs.pixman
+                pkgs.cairo.dev
+                pkgs.libpng.dev
+                pkgs.gnome2.pango.dev
+                pkgs.glib.dev
+                pkgs.harfbuzz.dev
+                pkgs.freetype.dev
+              ]}
+            '';
+          };
+        }) // {
+      packages.x86_64-linux =
+        let
+          pkgs = nixpkgs.legacyPackages.x86_64-linux;
+          nodejs = pkgs.nodejs_20;
+          nodePackages = pkgs.nodePackages_latest;
+          lib = pkgs.lib;
+        in
+        rec {
+          node_modules = lib.pipe
+            {
+              src = ./.;
+              linkDevDependencies = true;
+              overrides = pnpm2nix.defaultPnpmOverrides.x86_64-linux // {
+                canvas = (drv: drv.overrideAttrs (oldAttrs: {
+                  nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.pkg-config ];
+                  buildInputs = oldAttrs.buildInputs ++ [
+                    pkgs.pixman
+                    pkgs.cairo.dev
+                    pkgs.libpng.dev
+                    pkgs.gnome2.pango.dev
+                    pkgs.glib.dev
+                    pkgs.harfbuzz.dev
+                    pkgs.freetype.dev
+                  ];
+                }));
 
-      packages.env = lib.pipe {
-        src = ./.;
-      } [
-        (pnpm2nix.mkPnpmPackage.${system})
-        (pnpm2nix.mkPnpmEnv.${system})
-      ];
+                "@tensorflow/tfjs-node" = (drv: drv.overrideAttrs (oldAttrs: {
+                  buildInputs = oldAttrs.buildInputs ++ [
+                    pkgs.libtensorflow
+                  ];
 
-      packages.default = let
-        packageJSON = (builtins.fromJSON (builtins.readFile ./package.json));
-      in pkgs.stdenv.mkDerivation {
-        pname = "nucleus";
-        version = packageJSON.version;
+                  preBuild = ''
+                    mkdir -p node_modules/@tensorflow/tfjs-node/deps/lib
+                    ln -s ${pkgs.libtensorflow}/lib/libtensorflow.so.2 node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so.2.9.1
+                  '';
+                }));
+              };
+            } [
+            (pnpm2nix.mkPnpmPackage.x86_64-linux)
+            (drv: builtins.readFile "${drv}/nix-support/propagated-build-inputs")
+            (path: "${path}/node_modules")
+          ];
 
-        src = ./.;
+          nucleus =
+            let
+              packageJSON = (builtins.fromJSON (builtins.readFile ./package.json));
+            in
+            pkgs.stdenv.mkDerivation {
+              pname = "nucleus";
+              version = packageJSON.version;
 
-        buildInputs = [ packages.env nodejs nodePackages.pnpm ];
-        nativeBuildInputs = [ packages.env nodePackages.pnpm ];
+              src = ./.;
 
-        buildPhase = ''
-          pnpm run build
-        '';
+              buildInputs = [ nodejs nodePackages.pnpm ];
+              nativeBuildInputs = [ nodePackages.pnpm nodePackages.typescript pkgs.python3 ];
 
-        installPhase = ''
-          cp dist $out
-          mkdir -p $out/bin
-          echo "#!/usr/bin/env bash\ncd $out\n${packageJSON.scripts.start}" > $out/bin/nucleus
-        '';
-      };
+              buildPhase = ''
+                ${pkgs.python3}/bin/python3 ${./scripts/fix-pnpm-bin.py} ${node_modules} ./bin
+                export PATH=$PATH:./bin
+                ln -s ${node_modules} node_modules
+                pnpm run build
+              '';
 
-      dockerImage = let
-        nucleus = packages.default;
-      in pkgs.dockerTools.streamLayeredImage {
-        name = "nucleus";
-        tag = "latest";
-        contents = [ nucleus ];
-        config.Cmd = [ "${nucleus}/bin/nucleus" ];
-      };
-    });
+              installPhase = ''
+                mkdir -p $out
+
+                cp dist $out -r
+                cp node_modules $out -r
+                cp bin $out/.bin -r
+                cp package.json $out
+                cp LICENSE $out
+
+                mkdir -p $out/bin
+                echo "#!/usr/bin/env bash" > $out/bin/nucleus
+                echo "cd $out" >> $out/bin/nucleus
+                echo "export PATH=$PATH:$out/node_modules/.bin" >> $out/bin/nucleus
+                echo "${packageJSON.scripts.start}" >> $out/bin/nucleus
+                chmod +x $out/bin/nucleus
+              '';
+            };
+
+          dockerImage = pkgs.dockerTools.streamLayeredImage {
+            name = "nucleus";
+            tag = "latest";
+            contents = [ nucleus ];
+            config.Cmd = [ "${nucleus}/bin/nucleus" ];
+          };
+
+          default = nucleus;
+        };
+    };
 }
