Repository: tauri
Issue: [bug] AppImage build fail with Nix Flake
Labels: type: bug,status: needs triage,platform: Nix/NixOS

### Describe the bug

Hello,
I'm on Ubuntu 22.04 but using Nix package manager.
After following your [prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites) for NixOS and attempting to build a tauri project with the below `flake.nix`, I got the following **error**:
```
-- Running input plugin: gtk --
[gtk/stderr] chmod: cannot access 'edgen-chat.AppDir/usr/lib64': No such file or directory
[gtk/stdout] Installing AppRun hook
[gtk/stderr] cp: cannot stat '/nix/store/2if9iy5cy0bicwafllpa2aiq30v26app-glib-2.78.1/share/glib-2.0/schemas': No such file or directory
[gtk/stdout] Installing GLib schemas
ERROR: Failed to run plugin: gtk (exit code: 1)
       Error [tauri_cli_node] failed to bundle project: error running appimage.sh
error Command failed with exit code 1.
```

Thanks in advance

### Reproduction

`flake.nix`:
```
{
    inputs = {
        nixpkgs.url = "nixpkgs";
        rust-overlay.url = "github:oxalica/rust-overlay";
        flake-utils.url = "github:numtide/flake-utils";
    };

    outputs = { self, nixpkgs, rust-overlay, flake-utils }:
        flake-utils.lib.eachDefaultSystem (system:
        let
            overlays = [ (import rust-overlay) ];
            pkgs = import nixpkgs {
                inherit system overlays;
            };

            rust-toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
                extensions = [ "rust-src" ];
                #targets = [ "wasm32-unknown-unknown" ];
            });

            nativeBuildInputs = with pkgs; [
                pkg-config
                rust-toolchain
            ];

            libraries = with pkgs;[
                webkitgtk
                gtk3
                cairo
                gdk-pixbuf
                glib
                dbus
                openssl_3
                librsvg
            ];

            packages = with pkgs; [
                curl
                wget
                dbus
                openssl_3
                glib
                gtk3
                gdk-pixbuf
                libsoup
                pango
                harfbuzz
                at-spi2-atk
                cairo
                webkitgtk
                librsvg
                yarn
                nodejs_18
            ];

            buildInputs = packages;
        in
        rec {
            # `nix develop`
            devShell = pkgs.mkShell {
                inherit buildInputs nativeBuildInputs;
                shellHook = ''
                # For rust-analyzer 'hover' tooltips to work.
                export RUST_SRC_PATH=${rust-toolchain}

                # add ~/.cargo/bin to PATH for crates installed with `cargo install`
                export PATH=$PATH:$HOME/.cargo/bin
                
                export RUST_BACKTRACE=1

                # tauri
                export WEBKIT_DISABLE_COMPOSITING_MODE=1
                export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH
                export XDG_DATA_DIRS=${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
                '';
            };
        });
}
```

### Expected behavior

Successful build with no issues.

### Full `tauri info` output

```text
[⚠] Environment
    - OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.0: 2.42.3
    ✔ rsvg2: 2.57.0
    ✔ rustc: 1.77.0-nightly (3d0e6bed6 2023-12-21)
    ✔ cargo: 1.77.0-nightly (1a2666ddd 2023-12-17)
    ⚠ rustup: not installed!
      If you have rust installed some other way, we recommend uninstalling it
      then use rustup instead. Visit https://rustup.rs/
    ⚠ Rust toolchain: couldn't be detected!
      Maybe you don't have rustup installed? if so, Visit https://rustup.rs/
    - node: 18.19.0
    - yarn: 1.22.19
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 1.5.4
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.5
    - tauri-cli [RUST]: 1.5.9
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.5.9

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../out
    - devPath: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack

```