From 7bcf151685b950a2a5a040f379ca23bfee279865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 30 Apr 2022 02:44:52 +0200 Subject: [PATCH] unityhub: fix nix-env version parsing --- pkgs/development/tools/unityhub/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/unityhub/default.nix b/pkgs/development/tools/unityhub/default.nix index ad0e2c998e6b..e52c38822160 100644 --- a/pkgs/development/tools/unityhub/default.nix +++ b/pkgs/development/tools/unityhub/default.nix @@ -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 '';