appium-inspector: init at 2024.3.1

This commit is contained in:
Marie Ramlow 2024-02-05 13:57:28 +01:00
parent e92b601588
commit 11a38e6cc5
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/app/main.js b/app/main.js
index a6607a8..b81c8cb 100644
--- a/app/main.js
+++ b/app/main.js
@@ -6,7 +6,7 @@ import {setupMainWindow} from './main/windows';
const isDev = process.env.NODE_ENV === 'development';
-export let openFilePath = getAppiumSessionFilePath(process.argv, app.isPackaged, isDev);
+export let openFilePath = getAppiumSessionFilePath(process.argv, false, isDev);
app.on('open-file', (event, filePath) => {
openFilePath = filePath;

View File

@ -0,0 +1,62 @@
{ fetchFromGitHub
, buildNpmPackage
, makeWrapper
, electron_13
, copyDesktopItems
, makeDesktopItem
, nix-update-script
, stdenv
, lib
}:
let
electron = electron_13;
in buildNpmPackage rec {
pname = "appium-inspector";
version = "2024.3.1";
patches = [ ./Fix-Open-File.patch ];
src = fetchFromGitHub {
owner = "appium";
repo = "appium-inspector";
rev = "v${version}";
hash = "sha256-X384CjAX3glsPpXqc6Rht6OqXB8imclwXv26tYaYfxk=";
};
npmDepsHash = "sha256-9/wf/psbn9uZ+9ZYTSV4IKjgprWYaMSYorVgStR9yVU=";
npmFlags = ["--ignore-scripts"];
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
installPhase = ''
mkdir -p "$out/share/appium-inspector"
cp -r './node_modules' "$out/share/appium-inspector/node_modules"
cp -r './dist' "$out/share/appium-inspector/"
cp './package.json' "$out/share/appium-inspector/package.json"
# executable wrapper
makeWrapper '${electron}/bin/electron' "$out/bin/appium-inspector" \
--add-flags "$out/share/appium-inspector/dist/main.js" \
--set NODE_ENV production
'';
desktopItem = makeDesktopItem {
name = "appium-inspector";
exec = "appium-inspector %u";
desktopName = "Appium Inspector";
comment = meta.description;
categories = [ "Development" ];
};
passthru.updateScript = nix-update-script { };
meta = {
description = "A GUI inspector for mobile apps and more, powered by a (separately installed) Appium server";
homepage = "https://appium.github.io/appium-inspector";
license = lib.licenses.asl20;
mainProgram = "appium-inspector";
maintainers = with lib.maintainers; [ marie ];
inherit (electron.meta) platforms;
};
}