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 pname = "${pname}-fhs-env";
30 targetPkgs = pkgs: with pkgs; [
31 # Unity Hub binary dependencies
36 gsettings-desktop-schemas
39 # Bug Reporter dependencies
45 multiPkgs = pkgs: with pkgs; [
46 # Unity Hub ldd dependencies
71 # Unity Hub additional dependencies
85 # Unity Editor dependencies
86 libglvnd # provides ligbl
94 git # for git-based packages in unity package manager
96 # Unity Editor 2019 specific dependencies
102 # Unity Editor 6000 specific dependencies
107 unpackCmd = "dpkg -x $curSrc src";
109 dontConfigure = true;
116 mv opt/ usr/share/ $out
118 # `/opt/unityhub/unityhub` is a shell wrapper that runs `/opt/unityhub/unityhub-bin`
119 # Which we don't need and overwrite with our own custom wrapper
120 makeWrapper ${fhsEnv}/bin/${pname}-fhs-env $out/opt/unityhub/unityhub \
121 --add-flags $out/opt/unityhub/unityhub-bin \
126 ln -s $out/opt/unityhub/unityhub $out/bin/unityhub
128 # Replace absolute path in desktop file to correctly point to nix store
129 substituteInPlace $out/share/applications/unityhub.desktop \
130 --replace /opt/unityhub/unityhub $out/opt/unityhub/unityhub
135 passthru.updateScript = ./update.sh;
138 description = "Official Unity3D app to download and manage Unity Projects and installations";
139 homepage = "https://unity.com/";
140 downloadPage = "https://unity.com/unity-hub";
141 changelog = "https://unity.com/unity-hub/release-notes";
142 license = licenses.unfree;
143 maintainers = with maintainers; [ tesq0 huantian ];
144 platforms = [ "x86_64-linux" ];
145 sourceProvenance = with sourceTypes; [ binaryNativeCode ];