Tauri program is just white when packaged via nix

I am currently trying to package my tauri app I am writing with a few of my friends. Recently my friend switched to using rust workspaces and since than I wasn’t able to get the nix package working. The window is always simply white when trying to run the binary that was built by nix.

When running tauri dev via pnpm, npm or cargo it always works fine, only in the actual release build by nix it doesn’t work.

This is my nix package (nix/package.nix)

{
  lib,
  stdenv,
  rustPlatform,
  fetchPnpmDeps,
  cargo-tauri,
  glib-networking,
  nodejs,
  pnpm,
  pnpmConfigHook,
  openssl,
  pkg-config,
  webkitgtk_4_1,
  wrapGAppsHook4,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "notiz";
  version = "0.1.0";
  src = ../.;
  cargoLock.lockFile = ../Cargo.lock;

  # cargoRoot = ".";
  buildAndTestSubdir = "src-tauri";

  pnpmDeps = fetchPnpmDeps {
    pname = finalAttrs.pname;
    version = finalAttrs.version;
    inherit (finalAttrs) src;
    fetcherVersion = 3;
    hash = "sha256-fsfSQjKHIZBJcSymxTth0vjeiarRghtrNgkaXc/45DM=";
  };

  nativeBuildInputs = [
    cargo-tauri.hook
    nodejs
    pnpm
    pnpmConfigHook
    pkg-config
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook4 ];

  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
    glib-networking
    openssl
    webkitgtk_4_1
  ];
})

This is how the project is structured:

.
├── Cargo.lock
├── Cargo.toml
├── crates
│   └── mylib
│       ├── Cargo.toml
│       └── src
├── flake.lock
├── flake.nix
├── messages
│   ├── de.json
│   └── en.json
├── nix
│   ├── package.nix
│   └── shell.nix
├── node_modules
│   └── ...
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── project.inlang
│   ├── cache
│   │   └── plugins
│   ├── README.md
│   └── settings.json
├── README.md
├── src
│   ├── app.html
│   ├── paraglide
│   │   └── ...
│   └── routes
│       ├── +layout.ts
│       └── +page.svelte
├── src-tauri
│   ├── build.rs
│   ├── capabilities
│   │   └── default.json
│   ├── Cargo.lock
│   ├── Cargo.toml
│   ├── gen
│   │   └── schemas
│   ├── icons
│   │   └── ...
│   ├── src
│   │   ├── lib.rs
│   │   └── main.rs
│   ├── target
│   │   ├── CACHEDIR.TAG
│   │   ├── debug
│   │   ├── flycheck0
│   │   └── release
│   └── tauri.conf.json
├── static
│   ├── favicon.png
│   ├── svelte.svg
│   ├── tauri.svg
│   └── vite.svg
├── svelte.config.js
├── target
│   ├── CACHEDIR.TAG
│   └── debug
│       └── ...
├── tsconfig.json
└── vite.config.js

nix run .

pnpm tauri dev