2024-12-13 20:22:25 +01:00

73 lines
1.7 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
makeDesktopItem,
callPackage,
yad,
...
}:
let
rev = "9f5fbcb57f2932b260202fb582f9adcf28df5f1c";
hash = "sha256-cShXlcFHTryxKLKxdoqZSge2oyGgeuFPW9Nxg+gSjB4=";
in
stdenv.mkDerivation rec {
pname = "winapps-launcher";
version = "0-unstable-2024-10-01";
src = fetchFromGitHub {
owner = "winapps-org";
repo = "WinApps-Launcher";
inherit rev hash;
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
yad
(callPackage ../winapps { })
];
patches = [ ./WinAppsLauncher.patch ];
postPatch = ''
substituteAllInPlace WinAppsLauncher.sh
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ./Icons $out/Icons
install -m755 -D WinAppsLauncher.sh $out/bin/winapps-launcher
install -Dm444 -T Icons/AppIcon.svg $out/share/pixmaps/winapps.svg
wrapProgram $out/bin/winapps-launcher \
--set LIBVIRT_DEFAULT_URI "qemu:///system" \
--prefix PATH : "${lib.makeBinPath buildInputs}"
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "winapps";
exec = "winapps-launcher";
icon = "winapps";
comment = meta.description;
desktopName = "WinApps";
categories = [ "Utility" ];
})
];
meta = with lib; {
homepage = "https://github.com/winapps-org/WinApps-Launcher";
description = "Graphical launcher for WinApps. Run Windows applications (including Microsoft 365 and Adobe Creative Cloud) on GNU/Linux with KDE, GNOME or XFCE, integrated seamlessly as if they were native to the OS. Wayland is currently unsupported.";
mainProgram = "winapps-launcher";
platforms = platforms.linux;
license = licenses.gpl3;
};
}