2015-09-30 06:03:02 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, makeDesktopItem
|
2016-10-15 02:56:26 +01:00
|
|
|
, jdk, perl, python, unzip, which
|
2015-09-30 06:03:02 +01:00
|
|
|
}:
|
2012-10-09 10:40:06 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "netbeans";
|
|
|
|
exec = "netbeans";
|
|
|
|
comment = "Integrated Development Environment";
|
|
|
|
desktopName = "Netbeans IDE";
|
|
|
|
genericName = "Integrated Development Environment";
|
|
|
|
categories = "Application;Development;";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2016-10-15 02:56:26 +01:00
|
|
|
name = "netbeans-8.2";
|
2012-10-09 10:40:06 +01:00
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = https://download.netbeans.org/netbeans/8.2/final/zip/netbeans-8.2-201609300101.zip;
|
2016-10-15 02:56:26 +01:00
|
|
|
sha256 = "0j092qw7aqfc9vpnvr3ix1ii94p4ik6frcnw708iyv4s9crqi65d";
|
2012-10-09 10:40:06 +01:00
|
|
|
};
|
2015-09-30 06:03:02 +01:00
|
|
|
|
2012-10-09 10:40:06 +01:00
|
|
|
buildCommand = ''
|
2015-09-30 06:03:02 +01:00
|
|
|
# Unpack and perform some path patching.
|
2012-10-09 10:40:06 +01:00
|
|
|
unzip $src
|
2015-09-30 06:03:02 +01:00
|
|
|
patchShebangs .
|
|
|
|
|
|
|
|
# Copy to installation directory and create a wrapper capable of starting
|
|
|
|
# it.
|
2012-10-09 10:40:06 +01:00
|
|
|
mkdir -p $out/bin
|
2015-09-30 06:03:02 +01:00
|
|
|
cp -a netbeans $out
|
2012-10-09 10:40:06 +01:00
|
|
|
makeWrapper $out/netbeans/bin/netbeans $out/bin/netbeans \
|
2016-08-22 23:06:51 +01:00
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ jdk which ]} \
|
2015-01-01 23:49:20 +00:00
|
|
|
--prefix JAVA_HOME : ${jdk.home} \
|
|
|
|
--add-flags "--jdkhome ${jdk.home}"
|
2016-10-15 02:56:26 +01:00
|
|
|
|
2012-10-09 10:40:06 +01:00
|
|
|
# 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
|
|
|
|
'';
|
2016-10-15 02:56:26 +01:00
|
|
|
|
2015-09-30 06:03:02 +01:00
|
|
|
buildInputs = [ makeWrapper perl python unzip ];
|
2016-10-15 02:56:26 +01:00
|
|
|
|
2012-10-09 10:40:06 +01:00
|
|
|
meta = {
|
|
|
|
description = "An integrated development environment for Java, C, C++ and PHP";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2012-10-09 10:40:06 +01:00
|
|
|
};
|
|
|
|
}
|