mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
Merge pull request #286487 from NyCodeGHG/nixpkgs-appium-inspector
appium-inspector: init at 2024.3.1
This commit is contained in:
commit
03e5c55bdf
13
pkgs/by-name/ap/appium-inspector/Fix-Open-File.patch
Normal file
13
pkgs/by-name/ap/appium-inspector/Fix-Open-File.patch
Normal 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;
|
62
pkgs/by-name/ap/appium-inspector/package.nix
Normal file
62
pkgs/by-name/ap/appium-inspector/package.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user