2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2024-10-04 16:56:33 +00:00
|
|
|
callPackage,
|
2024-09-19 14:19:46 +00:00
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
2024-10-04 16:56:33 +00:00
|
|
|
darwin,
|
|
|
|
gtk3,
|
|
|
|
libsoup,
|
2024-09-19 14:19:46 +00:00
|
|
|
openssl,
|
|
|
|
pkg-config,
|
2024-10-11 05:15:48 +00:00
|
|
|
webkitgtk_4_0,
|
2022-08-21 13:32:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tauri";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.7.1-unstable-2024-08-16";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tauri-apps";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "tauri";
|
|
|
|
rev = "2b61447dfc167ec11724f99671bf9e2de0bf6768";
|
|
|
|
hash = "sha256-gKG7olZuTCkW+SKI3FVZqgS6Pp5hFemRJshdma8rpyg=";
|
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-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-VXg/dAhwPTSrLwJm8HNzAi/sVF9RqgpHIF3PZe1LjSA=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs =
|
|
|
|
[ openssl ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
2024-09-19 14:19:46 +00:00
|
|
|
gtk3
|
2024-10-04 16:56:33 +00:00
|
|
|
libsoup
|
2024-10-11 05:15:48 +00:00
|
|
|
webkitgtk_4_0
|
2024-09-19 14:19:46 +00:00
|
|
|
]
|
2024-10-04 16:56:33 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
|
|
|
with darwin.apple_sdk.frameworks;
|
|
|
|
[
|
|
|
|
CoreServices
|
|
|
|
Security
|
|
|
|
SystemConfiguration
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
# See ./doc/hooks/tauri.section.md
|
|
|
|
hook = callPackage ./hook.nix { };
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
setupHooks = callPackage ./test-app.nix { };
|
|
|
|
};
|
|
|
|
};
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
meta = {
|
2022-08-21 13:32:41 +00:00
|
|
|
description = "Build smaller, faster, and more secure desktop applications with a web frontend";
|
|
|
|
homepage = "https://tauri.app/";
|
2024-10-04 16:56:33 +00:00
|
|
|
changelog = "https://github.com/tauri-apps/tauri/releases/tag/tauri-v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = with lib.licenses; [
|
|
|
|
asl20 # or
|
|
|
|
mit
|
|
|
|
];
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
dit7ya
|
2024-10-04 16:56:33 +00:00
|
|
|
getchoo
|
2024-09-19 14:19:46 +00:00
|
|
|
happysalada
|
|
|
|
];
|
2024-10-04 16:56:33 +00:00
|
|
|
mainProgram = "cargo-tauri";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
}
|