nixpkgs/pkgs/by-name/ca/cargo-tauri/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.5 KiB
Nix
Raw Permalink Normal View History

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