Merge pull request #224435 from hraban/utm-mainprogram

This commit is contained in:
Artturi 2023-04-08 00:33:49 +03:00 committed by GitHub
commit 1a7e2b80cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
{ lib { lib
, undmg , undmg
, makeWrapper
, fetchurl , fetchurl
, stdenvNoCC , stdenvNoCC
}: }:
@ -13,12 +14,23 @@ stdenvNoCC.mkDerivation rec {
hash = "sha256-YOmTf50UUvvh4noWnmV6WsoWSua0tpWTgLTg+Cdr3bQ="; hash = "sha256-YOmTf50UUvvh4noWnmV6WsoWSua0tpWTgLTg+Cdr3bQ=";
}; };
nativeBuildInputs = [ undmg ]; nativeBuildInputs = [ undmg makeWrapper ];
sourceRoot = "."; sourceRoot = ".";
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/Applications mkdir -p $out/Applications
cp -r *.app $out/Applications cp -r *.app $out/Applications
mkdir -p $out/bin
for bin in $out/Applications/UTM.app/Contents/MacOS/*; do
# Symlinking `UTM` doesn't work; seems to look for files in the wrong
# place
makeWrapper $bin "$out/bin/$(basename $bin)"
done
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {