2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
2023-01-11 07:51:40 +00:00
|
|
|
, stdenv
|
2022-08-21 13:32:41 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, openssl
|
2022-08-21 13:32:41 +00:00
|
|
|
, pkg-config
|
|
|
|
, glibc
|
|
|
|
, libsoup
|
|
|
|
, cairo
|
|
|
|
, gtk3
|
|
|
|
, webkitgtk
|
2023-01-11 07:51:40 +00:00
|
|
|
, darwin
|
2022-08-21 13:32:41 +00:00
|
|
|
}:
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks) CoreServices Security;
|
|
|
|
in
|
2022-08-21 13:32:41 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tauri";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.5.4";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tauri-apps";
|
|
|
|
repo = pname;
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "tauri-v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-1rhdvTjA53Zxx3qm/Im2uQBWbYU/HlPPUQ3txq0uLps=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# 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
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/tooling/cli";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-CHX4fesnqxoeplqXGFrn4RSfGdrkhKNANvXIwMkWXDs=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ glibc libsoup cairo gtk3 webkitgtk ]
|
2023-01-11 07:51:40 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
|
2022-08-21 13:32:41 +00:00
|
|
|
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 ];
|
2023-10-19 13:55:26 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya happysalada ];
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
}
|