Tauri: Difference between revisions

Simplified buildInputs and added a shellHook for wayland environments
A section is added for crane-tauri.
 
(2 intermediate revisions by 2 users not shown)
Line 18: Line 18:
     cargo-tauri # Optional, Only needed if Tauri doesn't work through the traditional way.
     cargo-tauri # Optional, Only needed if Tauri doesn't work through the traditional way.
     nodejs # Optional, this is for if you have a js frontend
     nodejs # Optional, this is for if you have a js frontend
    rustc # Needed for dev server (npm tauri dev)
   ];
   ];


Line 25: Line 26:
   ];
   ];


   shellHook = "
   shellHook = ''
     export XDG_DATA_DIRS="$GSETTINGS_SCHEMAS_PATH" # Needed on Wayland to report the correct display scale
     export XDG_DATA_DIRS="$GSETTINGS_SCHEMAS_PATH" # Needed on Wayland to report the correct display scale
   ";
   '';
}
}


Line 35: Line 36:
A distribution mechanism has been implemented for Tauri applications within Nixpkgs. Refer to the Nixpkgs documentation for implementation details. [https://nixos.org/manual/nixpkgs/unstable/#tauri-hook here]
A distribution mechanism has been implemented for Tauri applications within Nixpkgs. Refer to the Nixpkgs documentation for implementation details. [https://nixos.org/manual/nixpkgs/unstable/#tauri-hook here]


== Building a Tauri app with crane ==
The [https://github.com/JPHutchins/crane-tauri crane-tauri] flake uses [https://github.com/ipetkov/crane crane] to cache <code>cargoArtifacts</code>, so changes to your app source rebuild at near-incremental speed. Refer to the [https://github.com/JPHutchins/crane-tauri source code repository] for implementation details and documentation.
[[Category:Development]]
[[Category:Development]]