nixpkgs/pkgs/development/mobile/maestro/default.nix
2023-04-14 17:06:31 +05:30

35 lines
946 B
Nix

{ lib, stdenv, fetchurl, unzip, makeWrapper, jre_headless }:
stdenv.mkDerivation rec {
pname = "maestro";
version = "1.26.1";
src = fetchurl {
url = "https://github.com/mobile-dev-inc/maestro/releases/download/cli-${version}/maestro.zip";
sha256 = "1hq4y8qwnw6mb962g2cp7a5qp8x95p6268d34hjpx0i2h40s9vrk";
};
dontUnpack = true;
nativeBuildInputs = [ unzip makeWrapper ];
installPhase = ''
mkdir $out
unzip $src -d $out
mv $out/maestro/* $out
rm -rf $out/maestro
'';
postFixup = ''
wrapProgram $out/bin/maestro --prefix PATH : "${lib.makeBinPath [ jre_headless ]}"
'';
meta = with lib; {
description = "Mobile UI Automation tool";
homepage = "https://maestro.mobile.dev/";
license = licenses.asl20;
platforms = lib.platforms.all;
changelog = "https://github.com/mobile-dev-inc/maestro/blob/main/CHANGELOG.md";
maintainers = with maintainers; [ SubhrajyotiSen ];
};
}