2012-10-11 09:31:42 +01:00
|
|
|
{stdenv, fetchurl, jdk, unzip, which, makeWrapper, makeDesktopItem}:
|
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 {
|
2014-02-07 12:20:52 +00:00
|
|
|
name = "netbeans-7.4";
|
2012-10-09 10:40:06 +01:00
|
|
|
src = fetchurl {
|
2014-02-07 12:20:52 +00:00
|
|
|
url = http://download.netbeans.org/netbeans/7.4/final/zip/netbeans-7.4-201310111528.zip;
|
|
|
|
sha256 = "0nrnghnsdix5cmp86xi1gmvarhjk2k8mlbld3dfa9impm8gpv6mx";
|
2012-10-09 10:40:06 +01:00
|
|
|
};
|
|
|
|
buildCommand = ''
|
|
|
|
# Unpack and copy the stuff
|
|
|
|
unzip $src
|
|
|
|
mkdir -p $out
|
|
|
|
cp -a netbeans $out
|
|
|
|
|
|
|
|
# Create a wrapper capable of starting it
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper $out/netbeans/bin/netbeans $out/bin/netbeans \
|
2014-02-07 12:20:52 +00:00
|
|
|
--prefix PATH : ${jdk}/bin:${which}/bin \
|
2015-01-01 23:49:20 +00:00
|
|
|
--prefix JAVA_HOME : ${jdk.home} \
|
|
|
|
--add-flags "--jdkhome ${jdk.home}"
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ unzip makeWrapper ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An integrated development environment for Java, C, C++ and PHP";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
|
|
};
|
|
|
|
}
|