cargo-tauri: 1.7.1-unstable-2024-08-16 -> 2.1.0 (#346277)

This commit is contained in:
Sefa Eyeoglu 2024-11-14 17:12:42 +01:00 committed by GitHub
commit b22d375301
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 11816 additions and 1487 deletions

View File

@ -311,6 +311,9 @@
- The `mautrix-signal` module was adapted to incorporate the configuration changes that resulted from the update to the mautrix bridgev2 architecture. Pre-0.7.0 configurations should continue to work.
In case you want to update your configuration, make sure to check the NixOS manual.
- `cargo-tauri` has been updated to major version 2. Please review [the migration guide](https://tauri.app/start/migrate/from-tauri-1/).
v1 of `cargo-tauri` is still available as `cargo-tauri_1`, but will be removed in future releases.
- The nvidia driver no longer defaults to the proprietary driver starting with version 560. You will need to manually set `hardware.nvidia.open` to select the proprietary or open driver.
- `postgresql` no longer accepts the `enableSystemd` override. Use `systemdSupport` instead.

View File

@ -1,7 +1,7 @@
{
buildDotnetModule,
cargo-about,
cargo-tauri,
cargo-tauri_1,
dotnetCorePackages,
fetchFromGitHub,
fetchNpmDeps,
@ -59,7 +59,7 @@ rustPlatform.buildRustPackage {
nativeBuildInputs = [
cargo-about
cargo-tauri.hook
cargo-tauri_1.hook
dotnetSdk
nodejs
npmHooks.npmConfigHook

View File

@ -11,7 +11,7 @@
fetchNpmDeps,
gtk3,
wrapGAppsHook3,
cargo-tauri,
cargo-tauri_1,
}:
rustPlatform.buildRustPackage rec {
@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec {
};
nativeBuildInputs = [
cargo-tauri.hook
cargo-tauri_1.hook
nodejs
npmHooks.npmConfigHook
pkg-config

11659
pkgs/by-name/ca/cargo-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,55 +4,59 @@
callPackage,
rustPlatform,
fetchFromGitHub,
darwin,
gtk3,
libsoup,
cargo-tauri,
gtk4,
nix-update-script,
openssl,
pkg-config,
webkitgtk_4_0,
testers,
webkitgtk_4_1,
}:
rustPlatform.buildRustPackage rec {
pname = "tauri";
version = "1.7.1-unstable-2024-08-16";
version = "2.1.0";
src = fetchFromGitHub {
owner = "tauri-apps";
repo = "tauri";
rev = "2b61447dfc167ec11724f99671bf9e2de0bf6768";
hash = "sha256-gKG7olZuTCkW+SKI3FVZqgS6Pp5hFemRJshdma8rpyg=";
rev = "refs/tags/tauri-v${version}";
hash = "sha256-n1rSffVef9G9qtLyheuK5k6anAHsZANSu0C73QDdg2o=";
};
# Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at
# https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202
sourceRoot = "${src.name}/tooling/cli";
cargoHash = "sha256-VXg/dAhwPTSrLwJm8HNzAi/sVF9RqgpHIF3PZe1LjSA=";
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 [
gtk3
libsoup
webkitgtk_4_0
]
++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
CoreServices
Security
SystemConfiguration
]
);
gtk4
webkitgtk_4_1
];
cargoBuildFlags = [ "--package tauri-cli" ];
cargoTestFlags = cargoBuildFlags;
passthru = {
# See ./doc/hooks/tauri.section.md
hook = callPackage ./hook.nix { };
tests = {
setupHooks = callPackage ./test-app.nix { };
hook = callPackage ./test-app.nix { };
version = testers.testVersion { package = cargo-tauri; };
};
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"tauri-v(.*)"
];
};
};

View File

@ -5,50 +5,67 @@
cargo-tauri,
darwin,
glib-networking,
libsoup,
libayatana-appindicator,
nodejs,
openssl,
pkg-config,
webkitgtk_4_0,
wrapGAppsHook3,
pnpm_9,
webkitgtk_4_1,
wrapGAppsHook4,
}:
rustPlatform.buildRustPackage rec {
pname = "test-app";
inherit (cargo-tauri) version src;
# Basic example provided by upstream
sourceRoot = "${src.name}/examples/workspace";
cargoLock = {
inherit (cargo-tauri.cargoDeps) lockFile;
outputHashes = {
"schemars_derive-0.8.21" = "sha256-AmxBKZXm2Eb+w8/hLQWTol5f22uP8UqaIh+LVLbS20g=";
};
};
cargoPatches = [
# https://github.com/NixOS/nixpkgs/issues/332957
./update-time-crate.patch
];
postPatch = ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
'';
cargoHash = "sha256-ull9BWzeKsnMi4wcH67FnKFzTjqEdiRlM3f+EKIPvvU=";
pnpmDeps = pnpm_9.fetchDeps {
inherit
pname
version
src
;
hash = "sha256-kTr61DFPIIYceB8tZrKFaMG65CZ//djGEOQBLRNPotk=";
};
nativeBuildInputs = [
cargo-tauri.hook
nodejs
pkg-config
wrapGAppsHook3
pnpm_9.configHook
wrapGAppsHook4
];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.isLinux [
glib-networking
libsoup
webkitgtk_4_0
libayatana-appindicator
webkitgtk_4_1
]
++ lib.optionals stdenv.isDarwin (
with darwin.apple_sdk.frameworks;
[
AppKit
CoreServices
Security
WebKit
]
);
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.WebKit
];
buildAndTestSubdir = "examples/api/src-tauri";
# This example depends on the actual `api` package to be built in-tree
preBuild = ''
pnpm --filter '@tauri-apps/api' build
'';
# No one should be actually running this, so lets save some time
buildType = "debug";

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
cargo-tauri,
cargo-tauri_1,
gtk3,
libsoup,
openssl,
webkitgtk_4_0,
}:
cargo-tauri.overrideAttrs (
newAttrs: oldAttrs: {
version = "1.8.1";
src = fetchFromGitHub {
owner = "tauri-apps";
repo = "tauri";
rev = "tauri-v${newAttrs.version}";
hash = "sha256-z8dfiLghN6m95PLCMDgpBMNo+YEvvsGN9F101fAcVF4=";
};
# Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at
# https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202
sourceRoot = "${newAttrs.src.name}/tooling/cli";
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (newAttrs)
pname
version
src
sourceRoot
;
hash = "sha256-OIXC4kwGIemIL8KaqK5SUDZZrOX3PX0w3h9bNiM/pCw=";
};
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux [
gtk3
libsoup
webkitgtk_4_0
];
passthru = {
hook = cargo-tauri.hook.override { cargo-tauri = cargo-tauri_1; };
};
meta = {
inherit (oldAttrs.meta)
description
homepage
changelog
license
maintainers
mainProgram
;
};
}
)

View File

@ -4,7 +4,7 @@
darwin,
fetchFromGitHub,
rustPlatform,
cargo-tauri,
cargo-tauri_1,
cinny,
desktop-file-utils,
wrapGAppsHook3,
@ -71,7 +71,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [
wrapGAppsHook3
pkg-config
cargo-tauri.hook
cargo-tauri_1.hook
desktop-file-utils
];

View File

@ -6,7 +6,7 @@
pnpm_9,
nodejs,
cargo-tauri,
cargo-tauri_1,
pkg-config,
wrapGAppsHook3,
makeBinaryWrapper,
@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec {
[
pnpm_9.configHook
nodejs
cargo-tauri.hook
cargo-tauri_1.hook
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ]

View File

@ -16,27 +16,6 @@
webkitgtk_4_1,
}:
let
cargo-tauri_2 =
let
pname = "cargo-tauri";
version = "2.0.0-rc.3";
src = fetchFromGitHub {
owner = "tauri-apps";
repo = "tauri";
rev = "tauri-v${version}";
hash = "sha256-PV8m/MzYgbY4Hv71dZrqVbrxmxrwFfOAraLJIaQk6FQ=";
};
in
cargo-tauri.overrideAttrs {
inherit src version;
cargoDeps = rustPlatform.fetchCargoTarball {
inherit pname version src;
sourceRoot = "${src.name}/tooling/cli";
hash = "sha256-JPlMaoPw6a7D20KQH7iuhHKfGT5oUKf55tMaMYEM/Z4=";
};
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "gale";
version = "0.8.11";
@ -68,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
npmHooks.npmConfigHook
nodejs
rustPlatform.cargoSetupHook
(cargo-tauri.hook.override { cargo-tauri = cargo-tauri_2; })
cargo-tauri.hook
rustPlatform.cargoCheckHook
pkg-config
wrapGAppsHook3

View File

@ -6,7 +6,7 @@
fetchFromGitHub,
pnpm_9,
wrapGAppsHook3,
cargo-tauri,
cargo-tauri_1,
darwin,
desktop-file-utils,
esbuild,
@ -55,7 +55,7 @@ rustPlatform.buildRustPackage rec {
};
nativeBuildInputs = [
cargo-tauri.hook
cargo-tauri_1.hook
desktop-file-utils
jq
moreutils

View File

@ -14,7 +14,7 @@
, stdenv
, yarnConfigHook
, nodejs-slim
, cargo-tauri
, cargo-tauri_1
, cargo
, rustPlatform
, rustc
@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
rustPlatform.cargoSetupHook
cargo
rustc
cargo-tauri.hook
cargo-tauri_1.hook
yarnConfigHook
nodejs-slim
cyrus_sasl

View File

@ -4,7 +4,7 @@
fetchFromGitHub,
rustPlatform,
cacert,
cargo-tauri,
cargo-tauri_1,
darwin,
desktop-file-utils,
libsoup,
@ -45,7 +45,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [
cacert # required for turbo
cargo-tauri.hook
cargo-tauri_1.hook
desktop-file-utils
nodejs
pkg-config

View File

@ -10,7 +10,7 @@
rustPlatform,
cargo,
rustc,
cargo-tauri,
cargo-tauri_1,
pkg-config,
wrapGAppsHook3,
@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
rustPlatform.cargoSetupHook
cargo
rustc
cargo-tauri.hook
cargo-tauri_1.hook
pkg-config
wrapGAppsHook3
];

View File

@ -8,7 +8,7 @@
wrapGAppsHook3,
cargo,
rustc,
cargo-tauri,
cargo-tauri_1,
pkg-config,
esbuild,
buildGoModule,
@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
rustPlatform.cargoSetupHook
cargo
rustc
cargo-tauri.hook
cargo-tauri_1.hook
nodejs
pnpm.configHook
wrapGAppsHook3

View File

@ -22,23 +22,6 @@
}:
let
cargo-tauri_2 = let
version = "2.0.0-rc.3";
src = fetchFromGitHub {
owner = "tauri-apps";
repo = "tauri";
rev = "tauri-v${version}";
hash = "sha256-PV8m/MzYgbY4Hv71dZrqVbrxmxrwFfOAraLJIaQk6FQ=";
};
in cargo-tauri.overrideAttrs (drv: {
inherit src version;
cargoDeps = drv.cargoDeps.overrideAttrs (lib.const {
inherit src;
name = "tauri-${version}-vendor.tar.gz";
outputHash = "sha256-BrIH0JkGMp68O+4B+0g7X3lSdNSPXo+otlBgslCzPZE=";
});
});
esbuild_21-5 = let
version = "0.21.5";
in esbuild.override {
@ -90,7 +73,7 @@ in stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cargo
(cargo-tauri.hook.override { cargo-tauri = cargo-tauri_2; })
cargo-tauri.hook
gobject-introspection
makeBinaryWrapper
nodejs

View File

@ -1,5 +1,5 @@
{ lib
, cargo-tauri
, cargo-tauri_1
, cmake
, dbus
, fetchgit
@ -87,7 +87,7 @@ rustPlatform.buildRustPackage {
nativeBuildInputs = [
cmake
pkg-config
cargo-tauri
cargo-tauri_1
wrapGAppsHook3
];

View File

@ -2,7 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
cargo-tauri,
cargo-tauri_1,
libsoup,
nodejs,
openssl,
@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
};
nativeBuildInputs = [
cargo-tauri.hook
cargo-tauri_1.hook
nodejs
pkg-config
pnpm.configHook