3
0
Fork 0
forked from mirrors/nixpkgs

netbeans: 8.1 -> 8.2

This commit is contained in:
Tim Steinbach 2016-10-14 21:56:26 -04:00
parent d2238cc9f0
commit 405f241e6e
No known key found for this signature in database
GPG key ID: 83FF2ACAEB6C2D24
2 changed files with 7 additions and 21 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, makeWrapper, makeDesktopItem
, gawk, jdk, perl, python, unzip, which
, jdk, perl, python, unzip, which
}:
let
@ -13,18 +13,15 @@ let
};
in
stdenv.mkDerivation {
name = "netbeans-8.1";
name = "netbeans-8.2";
src = fetchurl {
url = http://download.netbeans.org/netbeans/8.1/final/zip/netbeans-8.1-201510222201.zip;
sha256 = "1aaf132mndpgfbd5v8izqzp37hjs5gwqwd6zrb519fx0viz9aq5r";
url = http://download.netbeans.org/netbeans/8.2/final/zip/netbeans-8.2-201609300101.zip;
sha256 = "0j092qw7aqfc9vpnvr3ix1ii94p4ik6frcnw708iyv4s9crqi65d";
};
buildCommand = ''
# Unpack and perform some path patching.
unzip $src
patch -p1 <${./path.patch}
substituteInPlace netbeans/platform/lib/nbexec \
--subst-var-by AWK ${gawk}/bin/awk
patchShebangs .
# Copy to installation directory and create a wrapper capable of starting
@ -35,14 +32,14 @@ stdenv.mkDerivation {
--prefix PATH : ${stdenv.lib.makeBinPath [ jdk which ]} \
--prefix JAVA_HOME : ${jdk.home} \
--add-flags "--jdkhome ${jdk.home}"
# Create desktop item, so we can pick it from the KDE/GNOME menu
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
'';
buildInputs = [ makeWrapper perl python unzip ];
meta = {
description = "An integrated development environment for Java, C, C++ and PHP";
maintainers = [ stdenv.lib.maintainers.sander ];

View file

@ -1,11 +0,0 @@
--- a/netbeans/platform/lib/nbexec 2015-09-29 21:26:39.282600903 -0700
+++ b/netbeans/platform/lib/nbexec 2015-09-29 21:26:58.977697858 -0700
@@ -198,7 +198,7 @@
SunOS*) awk=nawk ;;
*) awk=awk ;;
esac
- jdk_version=$("${jdkhome}/bin/java" -version 2>&1 | "/usr/bin/${awk}" -F '"' '/version/ {print substr($2, 1, 3)}')
+ jdk_version=$("${jdkhome}/bin/java" -version 2>&1 | "@AWK@" -F '"' '/version/ {print substr($2, 1, 3)}')
if [ "$jdk_version" = "1.7" ] ; then
jargs="$jargs $launcher_args"
fi