Files
nixpkgs/pkgs/by-name/rh/rhino/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

50 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gradle,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rhino";
version = "1.8.0";
src = fetchFromGitHub {
owner = "mozilla";
repo = "rhino";
tag = "Rhino1_8_0_Release";
hash = "sha256-H8DbcRPMm4SKmGf40dXnjGeEbbj9COzdHgUIkcCimTM=";
};
nativeBuildInputs = [ gradle ];
mitmCache = gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
};
installPhase = ''
mkdir -p "$out/share/java"
cp -v rhino-all/build/libs/rhino-all-*.jar "$out/share/java/js-$pkgver.jar"
ln -s "js-$pkgver.jar" "$out/share/java/js.jar"
'';
meta = {
description = "Implementation of JavaScript written in Java";
longDescription = ''
Rhino is an open-source implementation of JavaScript written
entirely in Java. It is typically embedded into Java applications
to provide scripting to end users.
'';
homepage = "https://rhino.github.io/";
license = with lib.licenses; [
mpl11 # or
gpl2Plus
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})