depot/third_party/nixpkgs/pkgs/applications/misc/revanced-cli/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

36 lines
955 B
Nix

{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "revanced-cli";
version = "4.4.0";
src = fetchurl {
url = "https://github.com/revanced/revanced-cli/releases/download/v${version}/revanced-cli-${version}-all.jar";
hash = "sha256-ydP9iPClWNKlbBhsNC1bzqfJYRyit1WsxIgwbQQbgi8=";
};
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 ];
};
}