mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-18 22:51:21 +00:00
[Backport release-26.05] appium-inspector: 2026.2.1 -> 2026.5.1 (#542536)
This commit is contained in:
@@ -2,19 +2,23 @@
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
copyDesktopItems,
|
||||
electron_40,
|
||||
electron_41,
|
||||
fetchFromGitHub,
|
||||
makeDesktopItem,
|
||||
makeWrapper,
|
||||
nix-update-script,
|
||||
_experimental-update-script-combinators,
|
||||
writeShellApplication,
|
||||
nix,
|
||||
jq,
|
||||
}:
|
||||
|
||||
let
|
||||
electron = electron_40;
|
||||
version = "2026.2.1";
|
||||
electron = electron_41;
|
||||
version = "2026.5.1";
|
||||
in
|
||||
|
||||
buildNpmPackage {
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "appium-inspector";
|
||||
inherit version;
|
||||
|
||||
@@ -22,10 +26,10 @@ buildNpmPackage {
|
||||
owner = "appium";
|
||||
repo = "appium-inspector";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-89u8MifBPh5AwaMFp+aGSzsiwp75Skca/t6OyDSzrGo=";
|
||||
hash = "sha256-SJlTTVTZ/zGIK7Nf35cZ62tdhevXC95MsbiQJCLiVtk=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-mwNn7TllWCtr4sif9Wc3FDtK2Icu72/iI+IllhBswHQ=";
|
||||
npmDepsHash = "sha256-2rjgKS1mIrjOg+YXuMaqKyEQt0utLA4DGxOs0oI4BaQ=";
|
||||
npmFlags = [ "--ignore-scripts" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -75,7 +79,25 @@ buildNpmPackage {
|
||||
})
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
passthru.updateScript = _experimental-update-script-combinators.sequence [
|
||||
(nix-update-script { })
|
||||
(lib.getExe (writeShellApplication {
|
||||
name = "${finalAttrs.pname}-electron-updater";
|
||||
runtimeInputs = [
|
||||
nix
|
||||
jq
|
||||
];
|
||||
runtimeEnv = {
|
||||
PNAME = finalAttrs.pname;
|
||||
PKG_FILE = toString ./package.nix;
|
||||
};
|
||||
text = ''
|
||||
new_src="$(nix-build --attr "pkgs.$PNAME.src" --no-out-link)"
|
||||
new_electron_major="$(jq -r '.devDependencies.electron | split(".")[0] | tonumber' "$new_src/package.json")"
|
||||
sed -i -E "s/electron_[0-9]+/electron_$new_electron_major/g" "$PKG_FILE"
|
||||
'';
|
||||
}))
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "GUI inspector for the appium UI automation tool";
|
||||
@@ -86,4 +108,4 @@ buildNpmPackage {
|
||||
maintainers = with lib.maintainers; [ marie ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user