Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-tauri package can not be used to build appimages for tauri apps #295720

Open
yeus opened this issue Mar 13, 2024 · 7 comments
Open

cargo-tauri package can not be used to build appimages for tauri apps #295720

yeus opened this issue Mar 13, 2024 · 7 comments

Comments

@yeus
Copy link

yeus commented Mar 13, 2024

Describe the bug

cargo-tauri app can not be used to build appimage for tauri apps

Here are more explanations: tauri-apps/tauri#8535

Steps To Reproduce

Steps to reproduce the behavior:

  1. use the provided flake:
  2. create a tauri app
  3. [bug] AppImage build fail with Nix Flake tauri-apps/tauri#8535
  4. run tauri build -v

results in:

-- Running input plugin: gtk --
[gtk/stdout] Installing AppRun hook
[gtk/stderr] chmod: cannot access 'taskyon.AppDir/usr/lib64': No such file or directory
[gtk/stdout] Installing GLib schemas
[gtk/stderr] Package gio-2.0 was not found in the pkg-config search path.
[gtk/stderr] Perhaps you should add the directory containing `gio-2.0.pc'
[gtk/stderr] to the PKG_CONFIG_PATH environment variable
[gtk/stderr] No package 'gio-2.0' found
[gtk/stderr] cp: cannot stat '/usr/share/glib-2.0/schemas': No such file or directory

Expected behavior

It should work out-of-the-box

Screenshots

tauri-apps/tauri#8535

Notify maintainers

@dit7ya
@happysalada

Context

  description = "Nix Development Flake for Taskyon";

  inputs = {
    flake-utils.url = "github:numtide/flake-utils";
    #nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
  };

  outputs = { self, nixpkgs, flake-utils }:

    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };

        libraries = with pkgs; [
          cargo-tauri
        ];
        packages = with pkgs; [
          curl
          wget
          pkg-config

          # node
          yarn
          nodejs_21
        ];
      in {
        devShells.default = pkgs.mkShell rec {
          name = "xyntopia_gui";
          buildInputs = libraries ++ packages;
          shellHook = ''
            export PATH="$(pwd)/node_modules/.bin:$PATH"

            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
          '';
        };
      });
}

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.81, NixOS, 23.11 (Tapir), 23.11.20240312.51063ed`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

@happysalada
Copy link
Contributor

Hey thanks for reporting. Im wondering what we are doing wrong exactky. It could be just an env var that needs to be set or something. If you hear from upstream im interested!

@yeus
Copy link
Author

yeus commented Jun 3, 2024

hey, I have investigated a little further.

it seems that the missing https://nixos.wiki/wiki/Rust#Installation_via_rustup is part of the glib.dev package.

--> nix-locate --top-level /share/glib-2.0/schemas

--> I found this version here, configuring rust with rustup:

https://nixos.wiki/wiki/Rust#Installation_via_rustup

it sets some env variables and installes gib.dev. I tried several things with that, but still the same error.

@thedavidmeister
Copy link
Contributor

@Eveeifyeve
Copy link
Contributor

Fixed by the pr below, cargo-tauri doesn't require anymore glibc: #335751

@Eveeifyeve Eveeifyeve reopened this Oct 3, 2024
@Eveeifyeve
Copy link
Contributor

It turns out it still might be an issue.

@yeus
Copy link
Author

yeus commented Oct 4, 2024

I confirm, I still get the same error. I haven't tried the cargo-tauri.hook method from here tauri-apps/tauri#8535 yet, nor do i know if this solves my problem ;).

I have updated to the newest tauri version tauri-cli 2.0.0-rc.18 to test this.

can do all the rest debian packages, rpm, binaries eerythig no problem. Just the AppImage doesn't get build ;).

@Eveeifyeve
Copy link
Contributor

Eveeifyeve commented Oct 4, 2024

I confirm, I still get the same error. I haven't tried the cargo-tauri.hook method from here tauri-apps/tauri#8535 yet, nor do i know if this solves my problem ;).

I have updated to the newest tauri version tauri-cli 2.0.0-rc.18 to test this.

can do all the rest debian packages, rpm, binaries eerythig no problem. Just the AppImage doesn't get build ;).

A basic devshell documentation is in plans tauri-apps/tauri-docs#2413 if you have any issues please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants