nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, rustPlatform
4, fetchFromGitHub
5, openssl
6, pkg-config
7, glibc
8, libsoup
9, cairo
10, gtk3
11, webkitgtk
12, darwin
13}:
14
15let
16 inherit (darwin.apple_sdk.frameworks) CoreServices Security;
17in
18rustPlatform.buildRustPackage rec {
19 pname = "tauri";
20 version = "1.3.0";
21
22 src = fetchFromGitHub {
23 owner = "tauri-apps";
24 repo = pname;
25 rev = "tauri-v${version}";
26 hash = "sha256-+Zez3dxLtcPFzrPdi+yGucr+55GDmMsaLlUZcyqprtc=";
27 };
28
29 # Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at
30 # https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202
31 sourceRoot = "source/tooling/cli";
32
33 cargoHash = "sha256-ErUzhmPA2M1H4B4SrEt4FRWHcWLA1UzQqVA1gkrmdJQ=";
34
35 buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ glibc libsoup cairo gtk3 webkitgtk ]
36 ++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
37 nativeBuildInputs = [ pkg-config ];
38
39 meta = with lib; {
40 description = "Build smaller, faster, and more secure desktop applications with a web frontend";
41 homepage = "https://tauri.app/";
42 license = with licenses; [ asl20 /* or */ mit ];
43 maintainers = with maintainers; [ dit7ya ];
44 };
45}