|
1 | 1 | { |
2 | 2 | lib, |
3 | 3 | stdenv, |
4 | | - fetchurl, |
5 | | - appimageTools, |
| 4 | + callPackage, |
| 5 | + ... |
6 | 6 | }: |
7 | 7 | let |
8 | 8 | version = "5.5.229"; |
9 | 9 | pname = "gdevelop"; |
10 | | - |
11 | | - src = |
12 | | - if stdenv.hostPlatform.system == "x86_64-linux" then |
13 | | - fetchurl { |
14 | | - url = "https://github.com/4ian/GDevelop/releases/download/v${version}/GDevelop-5-${version}.AppImage"; |
15 | | - sha256 = "sha256-KV6gzPiu/45ibdzMG707vd10F6qLcm+afwJWa6WlywU="; |
16 | | - } |
17 | | - else |
18 | | - throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}"; |
19 | | - appimageContents = appimageTools.extractType2 { |
20 | | - inherit pname version src; |
21 | | - postExtract = '' |
22 | | - substituteInPlace $out/gdevelop.desktop --replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=gdevelop' |
23 | | - ''; |
24 | | - }; |
25 | | - dontPatchELF = true; |
26 | | -in |
27 | | -appimageTools.wrapType2 { |
28 | | - inherit pname version src; |
29 | | - |
30 | | - extraInstallCommands = '' |
31 | | - mkdir -p $out/share/applications |
32 | | - cp ${appimageContents}/gdevelop.desktop $out/share/applications |
33 | | - mkdir -p $out/share/icons |
34 | | - cp -r ${appimageContents}/usr/share/icons/hicolor $out/share/icons |
35 | | - ''; |
36 | | - |
37 | 10 | meta = { |
38 | 11 | description = "Graphical Game Development Studio"; |
39 | 12 | homepage = "https://gdevelop.io/"; |
40 | 13 | downloadPage = "https://github.com/4ian/GDevelop/releases"; |
41 | 14 | license = lib.licenses.mit; |
42 | 15 | sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; |
43 | | - maintainers = with lib.maintainers; [ tombert ]; |
| 16 | + maintainers = with lib.maintainers; [ |
| 17 | + tombert |
| 18 | + matteopacini |
| 19 | + ]; |
44 | 20 | mainProgram = "gdevelop"; |
45 | | - platforms = [ "x86_64-linux" ]; |
| 21 | + platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin; |
46 | 22 | }; |
47 | | -} |
| 23 | +in |
| 24 | +if stdenv.hostPlatform.isDarwin then |
| 25 | + callPackage ./darwin.nix { |
| 26 | + inherit |
| 27 | + pname |
| 28 | + version |
| 29 | + meta |
| 30 | + ; |
| 31 | + } |
| 32 | +else |
| 33 | + callPackage ./linux.nix { |
| 34 | + inherit |
| 35 | + pname |
| 36 | + version |
| 37 | + meta |
| 38 | + ; |
| 39 | + } |
0 commit comments