7 , extraPkgs ? pkgs: [ ]
8 , extraLibs ? pkgs: [ ]
11 stdenv.mkDerivation rec {
16 url = "https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local/pool/main/u/unity/unityhub_amd64/unityhub-amd64-${version}.deb";
17 sha256 = "sha256-cFHcfpsHSDlR82PtZ0leRDpvCD6nw0Qdb3PsYKMnosA=";
25 fhsEnv = buildFHSEnv {
26 name = "${pname}-fhs-env";
29 targetPkgs = pkgs: with pkgs; [
30 # Unity Hub binary dependencies
35 gsettings-desktop-schemas
38 # Bug Reporter dependencies
44 multiPkgs = pkgs: with pkgs; [
45 # Unity Hub ldd dependencies
70 # Unity Hub additional dependencies
84 # Unity Editor dependencies
85 libglvnd # provides ligbl
93 git # for git-based packages in unity package manager
95 # Unity Editor 2019 specific dependencies
103 unpackCmd = "dpkg -x $curSrc src";
105 dontConfigure = true;
112 mv opt/ usr/share/ $out
114 # `/opt/unityhub/unityhub` is a shell wrapper that runs `/opt/unityhub/unityhub-bin`
115 # Which we don't need and overwrite with our own custom wrapper
116 makeWrapper ${fhsEnv}/bin/${pname}-fhs-env $out/opt/unityhub/unityhub \
117 --add-flags $out/opt/unityhub/unityhub-bin \
122 ln -s $out/opt/unityhub/unityhub $out/bin/unityhub
124 # Replace absolute path in desktop file to correctly point to nix store
125 substituteInPlace $out/share/applications/unityhub.desktop \
126 --replace /opt/unityhub/unityhub $out/opt/unityhub/unityhub
131 passthru.updateScript = ./update.sh;
134 description = "Official Unity3D app to download and manage Unity Projects and installations";
135 homepage = "https://unity.com/";
136 downloadPage = "https://unity.com/unity-hub";
137 changelog = "https://unity.com/unity-hub/release-notes";
138 license = licenses.unfree;
139 maintainers = with maintainers; [ tesq0 huantian ];
140 platforms = [ "x86_64-linux" ];
141 sourceProvenance = with sourceTypes; [ binaryNativeCode ];