8 # The subdirectory of `target/` from which to copy the build artifacts
9 targetSubdirectory ? stdenv.hostPlatform.rust.cargoShortTarget,
13 kernelName = stdenv.hostPlatform.parsed.kernel.name;
18 propagatedBuildInputs = [
24 inherit targetSubdirectory;
25 inherit (rust.envVars) rustHostPlatformSpec setEnv;
27 # A map of the bundles used for Tauri's different supported platforms
28 # https://github.com/tauri-apps/tauri/blob/23a912bb84d7c6088301e1ffc59adfa8a799beab/README.md#platforms
29 defaultTauriBundleType =
34 .${kernelName} or (throw "${kernelName} is not supported by cargo-tauri.hook");
36 # $targetDir is the path to the build artifacts (i.e., `./target/release`)
41 mv "$targetDir"/bundle/macos $out/Applications
45 mv "$targetDir"/bundle/deb/*/data/usr $out
48 .${kernelName} or (throw "${kernelName} is not supported by cargo-tauri.hook");
52 inherit (cargo-tauri.meta) maintainers broken;
53 # Platforms that Tauri supports bundles for
54 platforms = lib.platforms.darwin ++ lib.platforms.linux;