unityhub: drop 2019 support to fix build, 3.12.1 -> 3.13.1 (#422785)

authored by Sandro and committed by GitHub f9228dbf 6eeeb0f8

+34 -37
+13
pkgs/by-name/un/unityhub/update.sh
···
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl common-updater-scripts 3 + # set -euo pipefail 4 + 5 + new_version="$(curl https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local/dists/stable/main/binary-amd64/Packages --silent | sed -nE "s/^Version: ([0-9]+\.[0-9]+\.[0-9]+)$/\1/p" | sort -V | tail -n 1)" 6 + old_version="$(sed -nE 's/^\s*version = "([0-9]+\.[0-9]+\.[0-9]+)";$/\1/p' ./package.nix)" 7 + 8 + if [[ "$new_version" == "$old_version" ]]; then 9 + echo "Up to date" 10 + exit 0 11 + fi 12 + 13 + update-source-version unityhub "$new_version"
+21 -22
pkgs/development/tools/unityhub/default.nix pkgs/by-name/un/unityhub/package.nix
··· 11 12 stdenv.mkDerivation rec { 13 pname = "unityhub"; 14 - version = "3.12.1"; 15 16 src = fetchurl { 17 url = "https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local/pool/main/u/unity/unityhub_amd64/unityhub-amd64-${version}.deb"; 18 - sha256 = "sha256-Zpzl3H8cgVmPqpRAakL3m12OZ04Ddzpm+2krkuEkwrk="; 19 }; 20 21 nativeBuildInputs = [ ··· 96 xorg.libXcursor 97 glib 98 gdk-pixbuf 99 - libxml2 100 zlib 101 clang 102 git # for git-based packages in unity package manager 103 - 104 - # Unity Editor 2019 specific dependencies 105 - xorg.libXi 106 - xorg.libXrender 107 - gnome2.GConf 108 - libcap 109 110 # Unity Editor 6000 specific dependencies 111 harfbuzz ··· 123 ++ extraLibs pkgs; 124 }; 125 126 - unpackCmd = "dpkg -x $curSrc src"; 127 - 128 dontConfigure = true; 129 dontBuild = true; 130 ··· 135 mv opt/ usr/share/ $out 136 137 # `/opt/unityhub/unityhub` is a shell wrapper that runs `/opt/unityhub/unityhub-bin` 138 - # Which we don't need and overwrite with our own custom wrapper 139 makeWrapper ${fhsEnv}/bin/${pname}-fhs-env $out/opt/unityhub/unityhub \ 140 --add-flags $out/opt/unityhub/unityhub-bin \ 141 --argv0 unityhub 142 143 - # Link binary 144 mkdir -p $out/bin 145 ln -s $out/opt/unityhub/unityhub $out/bin/unityhub 146 147 # Replace absolute path in desktop file to correctly point to nix store 148 substituteInPlace $out/share/applications/unityhub.desktop \ 149 - --replace /opt/unityhub/unityhub $out/opt/unityhub/unityhub 150 151 runHook postInstall 152 ''; 153 154 passthru.updateScript = ./update.sh; 155 156 - meta = with lib; { 157 description = "Official Unity3D app to download and manage Unity Projects and installations"; 158 homepage = "https://unity.com/"; 159 downloadPage = "https://unity.com/unity-hub"; 160 - changelog = "https://unity.com/unity-hub/release-notes"; 161 - license = licenses.unfree; 162 - maintainers = with maintainers; [ 163 - tesq0 164 - huantian 165 - ]; 166 platforms = [ "x86_64-linux" ]; 167 - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 168 }; 169 }
··· 11 12 stdenv.mkDerivation rec { 13 pname = "unityhub"; 14 + version = "3.13.1"; 15 16 src = fetchurl { 17 url = "https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local/pool/main/u/unity/unityhub_amd64/unityhub-amd64-${version}.deb"; 18 + hash = "sha256-gBQrz6CNlUyhxeLmY6tNtxpaQJSEW00r7MGyIDtYdiY="; 19 }; 20 21 nativeBuildInputs = [ ··· 96 xorg.libXcursor 97 glib 98 gdk-pixbuf 99 + (libxml2.overrideAttrs (oldAttrs: rec { 100 + version = "2.13.8"; 101 + src = fetchurl { 102 + url = "mirror://gnome/sources/libxml2/${lib.versions.majorMinor version}/libxml2-${version}.tar.xz"; 103 + hash = "sha256-J3KUyzMRmrcbK8gfL0Rem8lDW4k60VuyzSsOhZoO6Eo="; 104 + }; 105 + meta = oldAttrs.meta // { 106 + knownVulnerabilities = oldAttrs.meta.knownVulnerabilities or [ ] ++ [ 107 + "CVE-2025-6021" 108 + ]; 109 + }; 110 + })) 111 zlib 112 clang 113 git # for git-based packages in unity package manager 114 115 # Unity Editor 6000 specific dependencies 116 harfbuzz ··· 128 ++ extraLibs pkgs; 129 }; 130 131 dontConfigure = true; 132 dontBuild = true; 133 ··· 138 mv opt/ usr/share/ $out 139 140 # `/opt/unityhub/unityhub` is a shell wrapper that runs `/opt/unityhub/unityhub-bin` 141 + # which we don't need and overwrite with our own wrapper that uses the fhs env. 142 makeWrapper ${fhsEnv}/bin/${pname}-fhs-env $out/opt/unityhub/unityhub \ 143 --add-flags $out/opt/unityhub/unityhub-bin \ 144 --argv0 unityhub 145 146 mkdir -p $out/bin 147 ln -s $out/opt/unityhub/unityhub $out/bin/unityhub 148 149 # Replace absolute path in desktop file to correctly point to nix store 150 substituteInPlace $out/share/applications/unityhub.desktop \ 151 + --replace-fail /opt/unityhub/unityhub $out/opt/unityhub/unityhub 152 153 runHook postInstall 154 ''; 155 156 passthru.updateScript = ./update.sh; 157 158 + meta = { 159 description = "Official Unity3D app to download and manage Unity Projects and installations"; 160 homepage = "https://unity.com/"; 161 downloadPage = "https://unity.com/unity-hub"; 162 + changelog = "https://unity.com/unity-hub/release-notes#${version}"; 163 + license = lib.licenses.unfree; 164 + maintainers = with lib.maintainers; [ huantian ]; 165 platforms = [ "x86_64-linux" ]; 166 + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 167 }; 168 }
-13
pkgs/development/tools/unityhub/update.sh
··· 1 - #!/usr/bin/env nix-shell 2 - #!nix-shell -i bash -p curl common-updater-scripts 3 - # set -euo pipefail 4 - 5 - new_version="$(curl https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local/dists/stable/main/binary-amd64/Packages --silent | sed -nE "s/^Version: ([0-9]+\.[0-9]+\.[0-9]+)$/\1/p" | sort -V | tail -n 1)" 6 - old_version="$(sed -nE 's/^\s*version = "([0-9]+\.[0-9]+\.[0-9]+)";$/\1/p' ./default.nix)" 7 - 8 - if [[ "$new_version" == "$old_version" ]]; then 9 - echo "Up to date" 10 - exit 0 11 - fi 12 - 13 - update-source-version unityhub "$new_version"
···
-2
pkgs/top-level/all-packages.nix
··· 16064 16065 terraform-landscape = callPackage ../applications/networking/cluster/terraform-landscape { }; 16066 16067 - unityhub = callPackage ../development/tools/unityhub { }; 16068 - 16069 vaultenv = haskell.lib.justStaticExecutables haskellPackages.vaultenv; 16070 16071 vaultwarden-sqlite = vaultwarden;
··· 16064 16065 terraform-landscape = callPackage ../applications/networking/cluster/terraform-landscape { }; 16066 16067 vaultenv = haskell.lib.justStaticExecutables haskellPackages.vaultenv; 16068 16069 vaultwarden-sqlite = vaultwarden;