2024-08-15 04:09:13 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2024-08-17 23:11:41 +00:00
|
|
|
callPackage,
|
2024-08-15 04:09:13 +00:00
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
2024-10-03 23:01:26 +00:00
|
|
|
cargo-tauri,
|
2024-10-03 23:00:00 +00:00
|
|
|
gtk4,
|
|
|
|
nix-update-script,
|
2024-08-15 04:09:13 +00:00
|
|
|
openssl,
|
|
|
|
pkg-config,
|
2024-10-03 23:00:00 +00:00
|
|
|
webkitgtk_4_1,
|
2022-08-19 12:11:48 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tauri";
|
2024-11-16 00:55:45 +00:00
|
|
|
version = "2.1.1";
|
2022-08-19 12:11:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tauri-apps";
|
2024-08-15 04:16:41 +00:00
|
|
|
repo = "tauri";
|
2024-10-03 23:00:00 +00:00
|
|
|
rev = "refs/tags/tauri-v${version}";
|
2024-11-16 00:55:45 +00:00
|
|
|
hash = "sha256-HPmViOowP1xAjDJ89YS0BTjNnKI1P0L777ywkqAhhc4=";
|
2022-08-19 12:11:48 +00:00
|
|
|
};
|
|
|
|
|
2024-10-03 23:00:00 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"schemars_derive-0.8.21" = "sha256-AmxBKZXm2Eb+w8/hLQWTol5f22uP8UqaIh+LVLbS20g=";
|
|
|
|
};
|
|
|
|
};
|
2022-08-19 12:11:48 +00:00
|
|
|
|
2024-08-17 22:09:48 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2024-08-15 04:09:13 +00:00
|
|
|
buildInputs =
|
|
|
|
[ openssl ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
2024-10-03 23:00:00 +00:00
|
|
|
gtk4
|
|
|
|
webkitgtk_4_1
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--package tauri-cli" ];
|
|
|
|
cargoTestFlags = cargoBuildFlags;
|
2022-08-19 12:11:48 +00:00
|
|
|
|
2024-08-17 23:11:41 +00:00
|
|
|
passthru = {
|
|
|
|
# See ./doc/hooks/tauri.section.md
|
|
|
|
hook = callPackage ./hook.nix { };
|
2024-08-17 23:31:20 +00:00
|
|
|
|
|
|
|
tests = {
|
2024-10-03 23:03:45 +00:00
|
|
|
hook = callPackage ./test-app.nix { };
|
2024-08-17 23:31:20 +00:00
|
|
|
};
|
2024-10-03 23:00:41 +00:00
|
|
|
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [
|
|
|
|
"--version-regex"
|
|
|
|
"tauri-v(.*)"
|
|
|
|
];
|
|
|
|
};
|
2024-08-17 23:11:41 +00:00
|
|
|
};
|
|
|
|
|
2024-08-15 04:16:41 +00:00
|
|
|
meta = {
|
2022-08-19 12:11:48 +00:00
|
|
|
description = "Build smaller, faster, and more secure desktop applications with a web frontend";
|
|
|
|
homepage = "https://tauri.app/";
|
2024-08-17 22:09:48 +00:00
|
|
|
changelog = "https://github.com/tauri-apps/tauri/releases/tag/tauri-v${version}";
|
2024-08-15 04:16:41 +00:00
|
|
|
license = with lib.licenses; [
|
2024-08-15 04:09:13 +00:00
|
|
|
asl20 # or
|
|
|
|
mit
|
|
|
|
];
|
2024-08-15 04:16:41 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
2024-08-15 04:09:13 +00:00
|
|
|
dit7ya
|
2024-08-17 22:12:57 +00:00
|
|
|
getchoo
|
2024-08-15 04:09:13 +00:00
|
|
|
happysalada
|
|
|
|
];
|
2024-08-17 22:09:48 +00:00
|
|
|
mainProgram = "cargo-tauri";
|
2022-08-19 12:11:48 +00:00
|
|
|
};
|
|
|
|
}
|