Skip to content

Commit

Permalink
mouse-actions-gui: use cargo-tauri.hook
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Sep 27, 2024
1 parent e73a4d4 commit 6043d53
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions pkgs/by-name/mo/mouse-actions-gui/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
rustPlatform.cargoSetupHook
cargo
rustc
cargo-tauri
cargo-tauri.hook
pkg-config
wrapGAppsHook3
];
Expand All @@ -62,26 +62,16 @@ stdenv.mkDerivation (finalAttrs: {
};

cargoRoot = "src-tauri";
buildAndTestSubdir = finalAttrs.cargoRoot;

cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) pname version src;
sourceRoot = "${finalAttrs.sourceRoot}/${finalAttrs.cargoRoot}";
hash = "sha256-H8TMpYFJWp227jPA5H2ZhSqTMiT/U6pT6eLyjibuoLU=";
};

buildPhase = ''
runHook preBuild
cargo-tauri build -b deb
runHook postBuild
'';

installPhase = ''
runHook preInstall
postInstall = ''
install -Dm644 ${./80-mouse-actions.rules} $out/etc/udev/rules.d/80-mouse-actions.rules
cp -r src-tauri/target/release/bundle/deb/*/data/usr/* $out
runHook postInstall
'';

meta = {
Expand Down

0 comments on commit 6043d53

Please sign in to comment.