Merge pull request #170972 from SuperSandro2000/unityhub

unityhub: fix nix-env version parsing
This commit is contained in:
Sandro 2022-05-03 17:52:17 +02:00 committed by GitHub
commit 5bab1af40b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,15 +1,14 @@
{ lib, fetchurl, appimageTools, gsettings-desktop-schemas, gtk3 }:
let
appimageTools.wrapType2 rec {
pname = "unityhub";
version = "2.3.2";
src = fetchurl {
# mirror of https://public-cdn.cloud.unity3d.com/hub/prod/UnityHub.AppImage
url = "https://archive.org/download/unity-hub-${version}/UnityHub.AppImage";
sha256 = "07nfyfp9apshqarc6pgshsczila6x4943hiyyizc55kp85aw0imn";
};
name = "unityhub";
in appimageTools.wrapType2 rec {
inherit name src;
extraPkgs = (pkgs: with pkgs; with xorg; [ gtk2 gdk-pixbuf glib libGL libGLU nss nspr
alsa-lib cups libcap fontconfig freetype pango
@ -23,11 +22,11 @@ in appimageTools.wrapType2 rec {
]);
extraInstallCommands =
let appimageContents = appimageTools.extractType2 { inherit name src; }; in
let appimageContents = appimageTools.extractType2 { inherit pname version src; }; in
''
install -Dm444 ${appimageContents}/unityhub.desktop -t $out/share/applications
substituteInPlace $out/share/applications/unityhub.desktop \
--replace 'Exec=AppRun' 'Exec=${name}'
--replace 'Exec=AppRun' 'Exec=${pname}'
install -m 444 -D ${appimageContents}/unityhub.png \
$out/share/icons/hicolor/64x64/apps/unityhub.png
'';