{ lib, stdenv, fetchurl, unzip, jre, jre8, genericUpdater, writeShellScript, common-updater-scripts, gnused, }: let inherit (lib.versions) major majorMinor splitVersion; inherit (lib.strings) concatStringsSep versionAtLeast; common = { pname, version, src, description, java ? jre, prog ? null, jar ? null, license ? lib.licenses.mpl20, updateScript ? null, }: stdenv.mkDerivation ( finalAttrs: let mainProgram = if prog == null then pname else prog; jar' = if jar == null then pname else jar; in { inherit pname version src; nativeBuildInputs = [ unzip ]; buildCommand = '' unzip $src -d $out mkdir -p $out/bin $out/share $out/share/java cp -s "$out"/*.jar "$out/share/java/" # */ rm -rf $out/notices mv $out/doc $out/share cat > $out/bin/${mainProgram} <