2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, jre }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "revanced-cli";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.6.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/revanced/revanced-cli/releases/download/v${version}/revanced-cli-${version}-all.jar";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-QQH7aEkfBULqAvJ0FsKFxrraFjg1m1JJnuDtyvLJXEk=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p "$prefix/bin"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/revanced-cli \
|
|
|
|
--add-flags "-jar $src" \
|
|
|
|
--prefix PATH : "$PATH"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command line application as an alternative to the ReVanced Manager";
|
|
|
|
homepage = "https://github.com/revanced/revanced-cli";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
|
|
maintainers = with maintainers; [ jopejoe1 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "revanced-cli";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|