diff options
Diffstat (limited to 'pkgs/applications/misc/revanced-cli/default.nix')
-rw-r--r-- | pkgs/applications/misc/revanced-cli/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/misc/revanced-cli/default.nix b/pkgs/applications/misc/revanced-cli/default.nix new file mode 100644 index 000000000000..fbd1554ab924 --- /dev/null +++ b/pkgs/applications/misc/revanced-cli/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, makeWrapper, jre }: + +stdenv.mkDerivation rec { + pname = "revanced-cli"; + version = "2.22.0"; + + src = fetchurl { + url = "https://github.com/revanced/revanced-cli/releases/download/v${version}/revanced-cli-${version}-all.jar"; + hash = "sha256-jyaqkZL7aOc5WXjlomZThyaCUwKU7AyKKrgtKadUo5s="; + }; + + 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 ]; + }; +} |