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-9dm6tVQ5nsDC8X2clrT4cAl8jg4wLwcihE4bnFgdU+A=";
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
101 # Unity Editor 6000 specific dependencies
106 unpackCmd = "dpkg -x $curSrc src";
108 dontConfigure = true;
115 mv opt/ usr/share/ $out
117 # `/opt/unityhub/unityhub` is a shell wrapper that runs `/opt/unityhub/unityhub-bin`
118 # Which we don't need and overwrite with our own custom wrapper
119 makeWrapper ${fhsEnv}/bin/${pname}-fhs-env $out/opt/unityhub/unityhub \
120 --add-flags $out/opt/unityhub/unityhub-bin \
125 ln -s $out/opt/unityhub/unityhub $out/bin/unityhub
127 # Replace absolute path in desktop file to correctly point to nix store
128 substituteInPlace $out/share/applications/unityhub.desktop \
129 --replace /opt/unityhub/unityhub $out/opt/unityhub/unityhub
134 passthru.updateScript = ./update.sh;
137 description = "Official Unity3D app to download and manage Unity Projects and installations";
138 homepage = "https://unity.com/";
139 downloadPage = "https://unity.com/unity-hub";
140 changelog = "https://unity.com/unity-hub/release-notes";
141 license = licenses.unfree;
142 maintainers = with maintainers; [ tesq0 huantian ];
143 platforms = [ "x86_64-linux" ];
144 sourceProvenance = with sourceTypes; [ binaryNativeCode ];