mirror of
https://github.com/winapps-org/winapps.git
synced 2025-08-12 05:25:15 +02:00
feat: package winapps & the winapps launcher using nix
doc: document installation using Nix fix: explicitely specify path to inquirer fix: libvirt group is called libvirtd on nix fix: set libvirturl for winapps-launcher fix: refine group change sed expr feat: add desktop file fix: do not use source derivation fix: use install instead of cp fix: ensure exists
This commit is contained in:
66
packages/winapps-launcher/default.nix
Normal file
66
packages/winapps-launcher/default.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
callPackage,
|
||||
yad,
|
||||
...
|
||||
}: let
|
||||
rev = "eaa660d39bf3f49b136c98c87c35e3e12f118f8f";
|
||||
hash = "sha256-7lkx/O4dOdVqAPX6s2IkkM6Ggbzmz9sm++20BBeoUQ4=";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "winapps-launcher";
|
||||
version = "git+${rev}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "winapps-org";
|
||||
repo = "WinApps-Launcher";
|
||||
|
||||
inherit rev hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
buildInputs = [yad (callPackage ../winapps {})];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r ./Icons $out/Icons
|
||||
|
||||
sed -E -i \
|
||||
-e "$(printf "%s$out%s" 's|^declare -rx ICONS_PATH="./Icons"|declare -rx ICONS_PATH="' '/Icons"|')" \
|
||||
WinAppsLauncher.sh
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user