Unverified Commit 4a78651e authored by seth's avatar seth
Browse files

cargo-tauri: refactor

Specifically:

- Tighten dependencies by only listing what's needed to build
- Better sorting things
- Adding `meta.changelog`
parent e4efc386
Loading
Loading
Loading
Loading
+16 −18
Original line number Diff line number Diff line
@@ -3,19 +3,14 @@
  stdenv,
  rustPlatform,
  fetchFromGitHub,
  darwin,
  gtk3,
  libsoup,
  openssl,
  pkg-config,
  glibc,
  libsoup,
  cairo,
  gtk3,
  webkitgtk,
  darwin,
}:

let
  inherit (darwin.apple_sdk.frameworks) CoreServices Security SystemConfiguration;
in
rustPlatform.buildRustPackage rec {
  pname = "tauri";
  version = "1.7.1-unstable-2024-08-16";
@@ -33,26 +28,28 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-VXg/dAhwPTSrLwJm8HNzAi/sVF9RqgpHIF3PZe1LjSA=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs =
    [ openssl ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
      glibc
      libsoup
      cairo
      gtk3
      libsoup
      webkitgtk
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
    ++ lib.optionals stdenv.hostPlatform.isDarwin (
      with darwin.apple_sdk.frameworks;
      [
        CoreServices
        Security
        SystemConfiguration
    ];
  nativeBuildInputs = [ pkg-config ];
      ]
    );

  meta = {
    description = "Build smaller, faster, and more secure desktop applications with a web frontend";
    mainProgram = "cargo-tauri";
    homepage = "https://tauri.app/";
    changelog = "https://github.com/tauri-apps/tauri/releases/tag/tauri-v${version}";
    license = with lib.licenses; [
      asl20 # or
      mit
@@ -61,5 +58,6 @@ rustPlatform.buildRustPackage rec {
      dit7ya
      happysalada
    ];
    mainProgram = "cargo-tauri";
  };
}