git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #101421 from sikmir/geogebra

geogebra: 5-0-593-0 -> 5-0-609-0, geogebra6: 6-0-600-0 -> 6-0-609-0

commit952dc5c7ff1f541bf047e881278e8db8b119ac2e authorMaximilian Bosch <maximilian@mbosch.me> dateFri 30 Oct 2020, 23:39 (6 years ago) parent5a22c6fa2472eb
2 files changed+117−67
pkgs/applications/science/math/geogebra/default.nix+59−33 pkgs/applications/science/math/geogebra/geogebra6.nix+58−34
pkgs/applications/science/math/geogebra/default.nix+59−33
@@ -1,18 +1,7 @@
1−{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, language ? "en_US" }:
2−
3−stdenv.mkDerivation rec {
1+{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }:
2+let
43 pname = "geogebra";
5− version = "5-0-593-0";
6−
7− preferLocalBuild = true;
8−
9− src = fetchurl {
10− urls = [
11− "https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
12− "http://web.archive.org/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
13− ];
14− sha256 = "d84c27a3299e6df08881733d22215a18decedcba4c2d97a9e5424c39cd57db35";
15− };
4+ version = "5-0-609-0";
165
176 srcIcon = fetchurl {
187 url = "http://static.geogebra.org/images/geogebra-logo.svg";
@@ -30,23 +19,6 @@ stdenv.mkDerivation rec {
3019 mimeType = "application/vnd.geogebra.file;application/vnd.geogebra.tool;";
3120 };
3221
33− buildInputs = [ makeWrapper ];
34−
35− installPhase = ''
36− install -D geogebra/* -t "$out/libexec/geogebra/"
37−
38− makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \
39− --set JAVACMD "${jre}/bin/java" \
40− --set GG_PATH "$out/libexec/geogebra" \
41− --add-flags "--language=${language}"
42−
43− install -Dm644 "${desktopItem}/share/applications/"* \
44− -t $out/share/applications/
45−
46− install -Dm644 "${srcIcon}" \
47− "$out/share/icons/hicolor/scalable/apps/geogebra.svg"
48− '';
49−
5022 meta = with stdenv.lib; {
5123 description = "Dynamic mathematics software with graphics, algebra and spreadsheets";
5224 longDescription = ''
@@ -57,7 +29,61 @@ stdenv.mkDerivation rec {
5729 homepage = "https://www.geogebra.org/";
5830 maintainers = with maintainers; [ ma27 ];
5931 license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ];
60− platforms = platforms.all;
32+ platforms = with platforms; linux ++ darwin;
6133 hydraPlatforms = [];
6234 };
63−}
35+
36+ linuxPkg = stdenv.mkDerivation {
37+ inherit pname version meta srcIcon desktopItem;
38+
39+ preferLocalBuild = true;
40+
41+ src = fetchurl {
42+ urls = [
43+ "https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
44+ "http://web.archive.org/web/20201022200454/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
45+ ];
46+ sha256 = "0xbhg8hm3dqm3qkraj48pqwslrnjyxpq9mcgylr2m8i1gmqw7xwf";
47+ };
48+
49+ nativeBuildInputs = [ makeWrapper ];
50+
51+ installPhase = ''
52+ install -D geogebra/* -t "$out/libexec/geogebra/"
53+
54+ makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \
55+ --set JAVACMD "${jre}/bin/java" \
56+ --set GG_PATH "$out/libexec/geogebra" \
57+ --add-flags "--language=${language}"
58+
59+ install -Dm644 "${desktopItem}/share/applications/"* \
60+ -t $out/share/applications/
61+
62+ install -Dm644 "${srcIcon}" \
63+ "$out/share/icons/hicolor/scalable/apps/geogebra.svg"
64+ '';
65+ };
66+
67+ darwinPkg = stdenv.mkDerivation {
68+ inherit pname version meta;
69+
70+ preferLocalBuild = true;
71+
72+ src = fetchurl {
73+ url = "https://download.geogebra.org/installers/5.0/GeoGebra-MacOS-Installer-withJava-${version}.zip";
74+ sha256 = "16fgqwxz31cfmia0pyzpk05aqzrqr11sjbw37q9zb3xfh3p1r4gz";
75+ };
76+
77+ dontUnpack = true;
78+
79+ nativeBuildInputs = [ unzip ];
80+
81+ installPhase = ''
82+ install -dm755 $out/Applications
83+ unzip $src -d $out/Applications
84+ '';
85+ };
86+in
87+if stdenv.isDarwin
88+then darwinPkg
89+else linuxPkg
pkgs/applications/science/math/geogebra/geogebra6.nix+58−34
@@ -1,46 +1,70 @@
11{ stdenv, unzip, fetchurl, electron_6, makeWrapper, geogebra }:
2−stdenv.mkDerivation rec{
2+let
3+ pname = "geogebra";
4+ version = "6-0-609-0";
35
4− name = "geogebra-${version}";
5− version = "6-0-600-0";
6+ srcIcon = geogebra.srcIcon;
7+ desktopItem = geogebra.desktopItem;
68
7− src = fetchurl {
8− urls = [
9− "https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
10− "https://web.archive.org/web/20200904093945/https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
11− ];
12− sha256 = "1l49rvfkil2cz6r7sa2mi0p6hvb6p66jv3x6xj8hjqls4l3sfhkm";
9+ meta = with stdenv.lib; geogebra.meta // {
10+ license = licenses.geogebra;
11+ maintainers = with maintainers; [ voidless ];
12+ platforms = with platforms; linux ++ darwin;
1313 };
1414
15− dontConfigure = true;
16− dontBuild = true;
15+ linuxPkg = stdenv.mkDerivation {
16+ inherit pname version meta;
1717
18− nativeBuildInputs = [
19− unzip
20− makeWrapper
21− ];
18+ src = fetchurl {
19+ urls = [
20+ "https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
21+ "https://web.archive.org/web/20201022200156/https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
22+ ];
23+ sha256 = "0rzcbq587x8827g9v03awa9hz27vyfjc0cz45ymbchqp31lsx49b";
24+ };
2225
23− unpackPhase = ''
24− unzip $src
25− '';
26+ dontConfigure = true;
27+ dontBuild = true;
2628
27− installPhase = ''
28− mkdir -p $out/libexec/geogebra/ $out/bin
29− cp -r GeoGebra-linux-x64/{resources,locales} "$out/"
30− makeWrapper ${stdenv.lib.getBin electron_6}/bin/electron $out/bin/geogebra --add-flags "$out/resources/app"
31− install -Dm644 "${desktopItem}/share/applications/"* \
32− -t $out/share/applications/
29+ nativeBuildInputs = [
30+ unzip
31+ makeWrapper
32+ ];
3333
34− install -Dm644 "${srcIcon}" \
35− "$out/share/icons/hicolor/scalable/apps/geogebra.svg"
36− '';
34+ unpackPhase = ''
35+ unzip $src
36+ '';
3737
38− srcIcon = geogebra.srcIcon;
38+ installPhase = ''
39+ mkdir -p $out/libexec/geogebra/ $out/bin
40+ cp -r GeoGebra-linux-x64/{resources,locales} "$out/"
41+ makeWrapper ${stdenv.lib.getBin electron_6}/bin/electron $out/bin/geogebra --add-flags "$out/resources/app"
42+ install -Dm644 "${desktopItem}/share/applications/"* \
43+ -t $out/share/applications/
3944
40− desktopItem = geogebra.desktopItem;
41− meta = with stdenv.lib; geogebra.meta // {
42− license = licenses.geogebra;
43− maintainers = with maintainers; [ voidless ];
44− platforms = platforms.linux;
45+ install -Dm644 "${srcIcon}" \
46+ "$out/share/icons/hicolor/scalable/apps/geogebra.svg"
47+ '';
48+ };
49+
50+ darwinPkg = stdenv.mkDerivation {
51+ inherit pname version meta;
52+
53+ src = fetchurl {
54+ url = "https://download.geogebra.org/installers/6.0/GeoGebra-Classic-6-MacOS-Portable-${version}.zip";
55+ sha256 = "0275869zgwbl1qjj593q6629hnxbwk9c15rkm29a3lh10pinb099";
56+ };
57+
58+ dontUnpack = true;
59+
60+ nativeBuildInputs = [ unzip ];
61+
62+ installPhase = ''
63+ install -dm755 $out/Applications
64+ unzip $src -d $out/Applications
65+ '';
4566 };
46−}
67+in
68+if stdenv.isDarwin
69+then darwinPkg
70+else linuxPkg