nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchurl, appimageTools, gsettings-desktop-schemas, gtk3 }:
2
3let
4 version = "2.3.2";
5 src = fetchurl {
6 # mirror of https://public-cdn.cloud.unity3d.com/hub/prod/UnityHub.AppImage
7 url = "https://archive.org/download/unity-hub-${version}/UnityHub.AppImage";
8 sha256 = "07nfyfp9apshqarc6pgshsczila6x4943hiyyizc55kp85aw0imn";
9 };
10 name = "unityhub";
11in appimageTools.wrapType2 rec {
12 inherit name src;
13
14 extraPkgs = (pkgs: with pkgs; with xorg; [ gtk2 gdk-pixbuf glib libGL libGLU nss nspr
15 alsa-lib cups gnome2.GConf libcap fontconfig freetype pango
16 cairo dbus dbus-glib libdbusmenu libdbusmenu-gtk2 expat zlib libpng12 udev tbb
17 libpqxx gtk3 libsecret lsb-release openssl nodejs ncurses5
18
19 libX11 libXcursor libXdamage libXfixes libXrender libXi
20 libXcomposite libXext libXrandr libXtst libSM libICE libxcb
21
22 libselinux pciutils libpulseaudio libxml2 icu clang cacert
23 ]);
24
25 extraInstallCommands =
26 let appimageContents = appimageTools.extractType2 { inherit name src; }; in
27 ''
28 install -Dm444 ${appimageContents}/unityhub.desktop -t $out/share/applications
29 substituteInPlace $out/share/applications/unityhub.desktop \
30 --replace 'Exec=AppRun' 'Exec=${name}'
31 install -m 444 -D ${appimageContents}/unityhub.png \
32 $out/share/icons/hicolor/64x64/apps/unityhub.png
33 '';
34
35 profile = ''
36 export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
37 '';
38
39 meta = with lib; {
40 homepage = "https://unity3d.com/";
41 description = "Game development tool";
42 longDescription = ''
43 Popular development platform for creating 2D and 3D multiplatform games
44 and interactive experiences.
45 '';
46 license = licenses.unfree;
47 platforms = [ "x86_64-linux" ];
48 maintainers = with maintainers; [ tesq0 ];
49 };
50}