vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / by-name / mo / mouse-actions-gui / package.nix
blob5fcb4126cf87bb22d87a8952174f1d967193a2e9
2   lib,
3   stdenv,
4   fetchFromGitHub,
6   npmHooks,
7   fetchNpmDeps,
8   nodejs,
10   rustPlatform,
11   cargo,
12   rustc,
13   cargo-tauri,
15   pkg-config,
16   wrapGAppsHook3,
17   libXtst,
18   libevdev,
19   gtk3,
20   libsoup,
21   webkitgtk_4_0,
24 stdenv.mkDerivation (finalAttrs: {
25   pname = "mouse-actions-gui";
26   version = "0.4.5";
28   src = fetchFromGitHub {
29     owner = "jersou";
30     repo = "mouse-actions";
31     rev = "refs/tags/v${finalAttrs.version}";
32     hash = "sha256-44F4CdsDHuN2FuijnpfmoFy4a/eAbYOoBYijl9mOctg=";
33   };
35   sourceRoot = "${finalAttrs.src.name}/config-editor";
37   nativeBuildInputs = [
38     npmHooks.npmConfigHook
39     nodejs
40     rustPlatform.cargoSetupHook
41     cargo
42     rustc
43     cargo-tauri.hook
44     pkg-config
45     wrapGAppsHook3
46   ];
48   buildInputs = [
49     # Base deps
50     libXtst
51     libevdev
53     # Tauri deps
54     gtk3
55     libsoup
56     webkitgtk_4_0
57   ];
59   npmDeps = fetchNpmDeps {
60     inherit (finalAttrs) src sourceRoot;
61     hash = "sha256-amDTYAvEoDHb7+dg39+lUne0dv0M9vVe1vHoXk2agZA=";
62   };
64   cargoRoot = "src-tauri";
65   buildAndTestSubdir = finalAttrs.cargoRoot;
67   cargoDeps = rustPlatform.fetchCargoTarball {
68     inherit (finalAttrs) pname version src;
69     sourceRoot = "${finalAttrs.sourceRoot}/${finalAttrs.cargoRoot}";
70     hash = "sha256-H8TMpYFJWp227jPA5H2ZhSqTMiT/U6pT6eLyjibuoLU=";
71   };
73   postInstall = ''
74     install -Dm644 ${./80-mouse-actions.rules} $out/etc/udev/rules.d/80-mouse-actions.rules
75   '';
77   meta = {
78     changelog = "https://github.com/jersou/mouse-actions/blob/${finalAttrs.src.rev}/CHANGELOG.md";
79     description = "Mouse event based command executor, a mix between Easystroke and Comiz edge commands";
80     homepage = "https://github.com/jersou/mouse-actions";
81     license = lib.licenses.mit;
82     mainProgram = "mouse-actions-gui";
83     maintainers = with lib.maintainers; [ tomasajt ];
84     platforms = lib.platforms.linux;
85   };