From 585cbc4a09b5d0a15a103c408429de8f67b7fc57 Mon Sep 17 00:00:00 2001 From: heyimnova Date: Sat, 18 Nov 2023 12:12:47 +0000 Subject: [PATCH] quickgui: add quickemu to PATH --- .../virtualization/quickgui/default.nix | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/virtualization/quickgui/default.nix b/pkgs/applications/virtualization/quickgui/default.nix index 9c4de021f2560..572ee4a0c0823 100644 --- a/pkgs/applications/virtualization/quickgui/default.nix +++ b/pkgs/applications/virtualization/quickgui/default.nix @@ -1,12 +1,14 @@ -{ stdenv +{ stdenvNoCC , lib , fetchurl , autoPatchelfHook , dpkg , wrapGAppsHook +, quickemu +, gnome }: -stdenv.mkDerivation rec { +stdenvNoCC.mkDerivation rec { pname = "quickgui"; version = "1.2.8"; @@ -18,31 +20,48 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoPatchelfHook dpkg + wrapGAppsHook ]; buildInputs = [ - wrapGAppsHook + quickemu + gnome.zenity ]; + strictDeps = true; + unpackCmd = "dpkg-deb -x $curSrc source"; installPhase = '' runHook preInstall mv usr $out + + runHook postInstall + ''; + + preFixup = '' + gappsWrapperArgs+=( + --prefix PATH : ${lib.makeBinPath [ quickemu gnome.zenity ]} + ) + ''; + + postFixup = '' substituteInPlace $out/share/applications/quickgui.desktop \ --replace "/usr" $out - runHook postInstall + # quickgui PR 88 + echo "Categories=System;" >> $out/share/applications/quickgui.desktop ''; - meta = { + meta = with lib; { description = "A Flutter frontend for quickemu"; homepage = "https://github.com/quickemu-project/quickgui"; changelog = "https://github.com/quickemu-project/quickgui/releases/tag/v${version}"; - maintainers = [ lib.maintainers.heyimnova ]; - platforms = lib.platforms.linux; - sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + license = licenses.mit; + maintainers = with maintainers; [ heyimnova ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = [ sourceTypes.binaryNativeCode ]; mainProgram = "quickgui"; }; }