diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/cargo-tauri/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/rust/cargo-tauri/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-tauri/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-tauri/default.nix new file mode 100644 index 000000000000..a8d959db555d --- /dev/null +++ b/nixpkgs/pkgs/development/tools/rust/cargo-tauri/default.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, openssl +, pkg-config +, glibc +, libsoup +, cairo +, gtk3 +, webkitgtk +, darwin +}: + +let + inherit (darwin.apple_sdk.frameworks) CoreServices Security; +in +rustPlatform.buildRustPackage rec { + pname = "tauri"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "tauri-apps"; + repo = pname; + rev = "tauri-v${version}"; + hash = "sha256-+Zez3dxLtcPFzrPdi+yGucr+55GDmMsaLlUZcyqprtc="; + }; + + # Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at + # https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202 + sourceRoot = "${src.name}/tooling/cli"; + + cargoHash = "sha256-ErUzhmPA2M1H4B4SrEt4FRWHcWLA1UzQqVA1gkrmdJQ="; + + buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ glibc libsoup cairo gtk3 webkitgtk ] + ++ lib.optionals stdenv.isDarwin [ CoreServices Security ]; + nativeBuildInputs = [ pkg-config ]; + + meta = with lib; { + description = "Build smaller, faster, and more secure desktop applications with a web frontend"; + homepage = "https://tauri.app/"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ dit7ya ]; + }; +} |