From e73a4d4de527458ae4c41613bb31d0dc5b55617c Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 26 Sep 2024 21:10:11 -0400 Subject: [PATCH] en-croissant: use cargo-tauri.hook --- pkgs/by-name/en/en-croissant/package.nix | 29 +----------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/pkgs/by-name/en/en-croissant/package.nix b/pkgs/by-name/en/en-croissant/package.nix index 72019cbcb9c9127..81489925d19f82a 100644 --- a/pkgs/by-name/en/en-croissant/package.nix +++ b/pkgs/by-name/en/en-croissant/package.nix @@ -56,7 +56,7 @@ buildRustPackage rec { [ pnpm_9.configHook nodejs - cargo-tauri + cargo-tauri.hook pkg-config ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ] @@ -77,35 +77,8 @@ buildRustPackage rec { darwin.apple_sdk_11_0.frameworks.WebKit ]; - # remove once cargo-tauri.hook becomes available - # https://github.com/NixOS/nixpkgs/pull/335751 - buildPhase = '' - runHook preBuild - - cargo tauri build --bundles ${if stdenv.hostPlatform.isDarwin then "app" else "deb"} - - runHook postBuild - ''; - doCheck = false; # many scoring tests fail - # remove once cargo-tauri.hook becomes available - installPhase = '' - runHook preInstall - - ${lib.optionalString stdenv.hostPlatform.isDarwin '' - mkdir -p "$out"/Applications - cp -r src-tauri/target/release/bundle/macos/* "$out"/Applications - ''} - - ${lib.optionalString stdenv.hostPlatform.isLinux '' - mkdir -p "$out" - cp -r src-tauri/target/release/bundle/deb/*/data/usr/* "$out" - ''} - - runHook postInstall - ''; - postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' makeWrapper "$out"/Applications/en-croissant.app/Contents/MacOS/en-croissant $out/bin/en-croissant '';