cargo-tauri*: cleanup dependencies; cargo-tauri_1: 1.8.1 -> 1.6.6 (#435717)

authored by Seth Flynn and committed by GitHub f4366b49 c58ada2e

+52 -41
+28 -18
pkgs/by-name/ca/cargo-tauri/package.nix
··· 1 1 { 2 2 lib, 3 3 stdenv, 4 + bzip2, 4 5 callPackage, 5 6 rustPlatform, 6 7 fetchFromGitHub, 7 - gtk4, 8 8 nix-update-script, 9 - openssl, 10 9 pkg-config, 11 - webkitgtk_4_1, 10 + testers, 11 + xz, 12 + zstd, 12 13 }: 13 14 14 - rustPlatform.buildRustPackage rec { 15 + rustPlatform.buildRustPackage (finalAttrs: { 15 16 pname = "tauri"; 16 17 version = "2.7.1"; 17 18 18 19 src = fetchFromGitHub { 19 20 owner = "tauri-apps"; 20 21 repo = "tauri"; 21 - tag = "tauri-cli-v${version}"; 22 + tag = "tauri-cli-v${finalAttrs.version}"; 22 23 hash = "sha256-0J55AvAvvqTVls4474GcgLPBtSC+rh8cXVKluMjAVBE="; 23 24 }; 24 25 25 26 cargoHash = "sha256-nkY1ydc2VewRwY+B5nR68mz8Ff3FK1KoHE4dLzNtPkY="; 26 27 27 - nativeBuildInputs = [ pkg-config ]; 28 - 29 - buildInputs = [ 30 - openssl 31 - ] 32 - ++ lib.optionals stdenv.hostPlatform.isLinux [ 33 - gtk4 34 - webkitgtk_4_1 28 + nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isLinux) [ 29 + pkg-config 35 30 ]; 36 31 32 + buildInputs = 33 + # Required for tauri-macos-sign and RPM support in tauri-bundler 34 + lib.optionals (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isLinux) [ 35 + bzip2 36 + xz 37 + ] 38 + ++ lib.optionals stdenv.hostPlatform.isLinux [ 39 + zstd 40 + ]; 41 + 37 42 cargoBuildFlags = [ "--package tauri-cli" ]; 38 - cargoTestFlags = cargoBuildFlags; 43 + cargoTestFlags = finalAttrs.cargoBuildFlags; 44 + 45 + env = lib.optionalAttrs stdenv.hostPlatform.isLinux { 46 + ZSTD_SYS_USE_PKG_CONFIG = true; 47 + }; 39 48 40 49 passthru = { 41 50 # See ./doc/hooks/tauri.section.md 42 - hook = callPackage ./hook.nix { }; 51 + hook = callPackage ./hook.nix { cargo-tauri = finalAttrs.finalPackage; }; 43 52 44 53 tests = { 45 - hook = callPackage ./test-app.nix { }; 54 + hook = callPackage ./test-app.nix { cargo-tauri = finalAttrs.finalPackage; }; 55 + version = testers.testVersion { package = finalAttrs.finalPackage; }; 46 56 }; 47 57 48 58 updateScript = nix-update-script { ··· 56 66 meta = { 57 67 description = "Build smaller, faster, and more secure desktop applications with a web frontend"; 58 68 homepage = "https://tauri.app/"; 59 - changelog = "https://github.com/tauri-apps/tauri/releases/tag/${src.tag}"; 69 + changelog = "https://github.com/tauri-apps/tauri/releases/tag/tauri-cli-v${finalAttrs.version}"; 60 70 license = with lib.licenses; [ 61 71 asl20 # or 62 72 mit ··· 68 78 ]; 69 79 mainProgram = "cargo-tauri"; 70 80 }; 71 - } 81 + })
+24 -23
pkgs/by-name/ca/cargo-tauri_1/package.nix
··· 1 1 { 2 2 lib, 3 3 stdenv, 4 + bzip2, 5 + pkg-config, 4 6 rustPlatform, 5 - fetchFromGitHub, 7 + xz, 8 + zstd, 6 9 cargo-tauri, 7 - cargo-tauri_1, 8 - gtk3, 9 - libsoup_2_4, 10 - openssl, 11 - webkitgtk_4_0, 12 10 }: 13 11 14 12 cargo-tauri.overrideAttrs ( 15 - newAttrs: oldAttrs: { 16 - version = "1.8.1"; 13 + finalAttrs: oldAttrs: { 14 + version = "1.6.6"; 17 15 18 - src = fetchFromGitHub { 19 - owner = "tauri-apps"; 20 - repo = "tauri"; 21 - rev = "tauri-v${newAttrs.version}"; 22 - hash = "sha256-z8dfiLghN6m95PLCMDgpBMNo+YEvvsGN9F101fAcVF4="; 16 + src = oldAttrs.src.override { 17 + hash = "sha256-UE/mJ0WdbVT4E1YuUCtu80UB+1WR+KRWs+4Emy3Nclc="; 23 18 }; 24 19 25 20 # Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at 26 21 # https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202 27 - sourceRoot = "${newAttrs.src.name}/tooling/cli"; 22 + sourceRoot = "${finalAttrs.src.name}/tooling/cli"; 28 23 29 24 cargoDeps = rustPlatform.fetchCargoVendor { 30 - inherit (newAttrs) 25 + inherit (finalAttrs) 31 26 pname 32 27 version 33 28 src 34 29 sourceRoot 35 30 ; 36 - hash = "sha256-t5sR02qC06H7A2vukwyZYKA2XMVUzJrgIOYuNSf42mE="; 31 + hash = "sha256-kAaq6Kam3e5n8569Y4zdFEiClI8q97XFX1hBD7NkUqw="; 37 32 }; 38 33 34 + nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ pkg-config ]; 35 + 39 36 buildInputs = [ 40 - openssl 37 + # Required by `zip` in `tauri-bundler` 38 + bzip2 39 + zstd 41 40 ] 42 - ++ lib.optionals stdenv.hostPlatform.isLinux [ 43 - gtk3 44 - libsoup_2_4 45 - webkitgtk_4_0 46 - ]; 41 + # Required by `rpm` in `tauri-bundler` 42 + ++ lib.optionals stdenv.hostPlatform.isLinux [ xz ]; 43 + 44 + env = { 45 + ZSTD_SYS_USE_PKG_CONFIG = true; 46 + }; 47 47 48 48 passthru = { 49 - hook = cargo-tauri.hook.override { cargo-tauri = cargo-tauri_1; }; 49 + inherit (oldAttrs.passthru) hook; 50 + tests = { inherit (oldAttrs.passthru.tests) version; }; 50 51 }; 51 52 52 53 meta = {