depot/third_party/nixpkgs/pkgs/applications/virtualization/quickgui/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

67 lines
1.4 KiB
Nix

{ stdenvNoCC
, lib
, fetchurl
, autoPatchelfHook
, dpkg
, wrapGAppsHook3
, quickemu
, zenity
}:
stdenvNoCC.mkDerivation rec {
pname = "quickgui";
version = "1.2.8";
src = fetchurl {
url = "https://github.com/quickemu-project/quickgui/releases/download/v${version}/quickgui_${version}-1_lunar1.0_amd64.deb";
sha256 = "sha256-crnV7OWH5UbkMM/TxTIOlXmvqBgjFmQG7RxameMOjH0=";
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
wrapGAppsHook3
];
buildInputs = [
quickemu
zenity
];
strictDeps = true;
unpackCmd = "dpkg-deb -x $curSrc source";
installPhase = ''
runHook preInstall
mv usr $out
runHook postInstall
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath [ quickemu zenity ]}
)
'';
postFixup = ''
substituteInPlace $out/share/applications/quickgui.desktop \
--replace "/usr" $out
# quickgui PR 88
echo "Categories=System;" >> $out/share/applications/quickgui.desktop
'';
meta = with lib; {
description = "Flutter frontend for quickemu";
homepage = "https://github.com/quickemu-project/quickgui";
changelog = "https://github.com/quickemu-project/quickgui/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ heyimnova ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ sourceTypes.binaryNativeCode ];
mainProgram = "quickgui";
};
}