2017-06-27 09:51:06 +02:00
|
|
|
{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, language ? "en_US" }:
|
2016-07-31 14:23:05 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "geogebra";
|
2019-04-29 11:25:37 +02:00
|
|
|
version = "5-0-535-0";
|
2016-07-31 14:23:05 +02:00
|
|
|
|
2016-08-10 15:35:14 +02:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2016-07-31 14:23:05 +02:00
|
|
|
src = fetchurl {
|
2018-03-25 10:08:43 +02:00
|
|
|
urls = [
|
|
|
|
"https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
|
2018-06-17 18:04:14 +02:00
|
|
|
"http://web.archive.org/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
|
2018-03-25 10:08:43 +02:00
|
|
|
];
|
2019-04-29 11:25:37 +02:00
|
|
|
sha256 = "1mbjwa9isw390i0k1yh6r9wmh8zkczian0v25w2vxb2a8vv0hjk0";
|
2016-07-31 14:23:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
srcIcon = fetchurl {
|
|
|
|
url = "http://static.geogebra.org/images/geogebra-logo.svg";
|
2017-01-28 17:33:20 +01:00
|
|
|
sha256 = "01sy7ggfvck350hwv0cla9ynrvghvssqm3c59x4q5lwsxjsxdpjm";
|
2016-07-31 14:23:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "geogebra";
|
|
|
|
exec = "geogebra";
|
|
|
|
icon = "geogebra";
|
|
|
|
desktopName = "Geogebra";
|
|
|
|
genericName = "Geogebra";
|
|
|
|
comment = meta.description;
|
|
|
|
categories = "Education;Science;Math;";
|
|
|
|
mimeType = "application/vnd.geogebra.file;application/vnd.geogebra.tool;";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D geogebra/* -t "$out/libexec/geogebra/"
|
|
|
|
|
|
|
|
makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \
|
|
|
|
--set JAVACMD "${jre}/bin/java" \
|
2017-06-27 09:51:06 +02:00
|
|
|
--set GG_PATH "$out/libexec/geogebra" \
|
|
|
|
--add-flags "--language=${language}"
|
2016-07-31 14:23:05 +02:00
|
|
|
|
|
|
|
install -Dm644 "${desktopItem}/share/applications/"* \
|
|
|
|
-t $out/share/applications/
|
|
|
|
|
|
|
|
install -Dm644 "${srcIcon}" \
|
|
|
|
"$out/share/icons/hicolor/scalable/apps/geogebra.svg"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Dynamic mathematics software with graphics, algebra and spreadsheets";
|
|
|
|
longDescription = ''
|
|
|
|
Dynamic mathematics software for all levels of education that brings
|
|
|
|
together geometry, algebra, spreadsheets, graphing, statistics and
|
|
|
|
calculus in one easy-to-use package.
|
|
|
|
'';
|
|
|
|
homepage = https://www.geogebra.org/;
|
2017-02-19 16:51:01 +01:00
|
|
|
maintainers = with maintainers; [ ma27 ];
|
2016-07-31 14:23:05 +02:00
|
|
|
license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ];
|
|
|
|
platforms = platforms.all;
|
2016-08-10 15:35:14 +02:00
|
|
|
hydraPlatforms = [];
|
2016-07-31 14:23:05 +02:00
|
|
|
};
|
|
|
|
}
|