-
Notifications
You must be signed in to change notification settings - Fork 100
Package WinApps (and the Launcher) with Nix #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
da35923
00141f1
26a2f13
b7b5b34
f4c0a45
b0f2830
7d5cce3
28e958e
b044cb4
60b3e80
7f3cdce
509a782
64478a8
d248abc
e8dc55a
9d455ba
e8fbc95
e630b5a
7277f71
df54d08
2dafe2d
b18efc4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: "Update Flake Packages" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 10 * * 0" # https://crontab.guru/#0_10_*_*_0 | ||
|
||
jobs: | ||
updateFlakePackages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@v20 | ||
|
||
- name: Update flake packages | ||
uses: selfuryon/nix-update-action@v1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2024 Oskar Manhart | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
(import ( | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
in | ||
fetchTarball { | ||
url = | ||
lock.nodes.flake-compat.locked.url | ||
or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) { src = ./.; }).defaultNix |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (c) 2024 Oskar Manhart | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
{ | ||
description = "WinApps Nix packages & NixOS module"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
|
||
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = | ||
{ | ||
nixpkgs, | ||
flake-utils, | ||
... | ||
}: | ||
flake-utils.lib.eachDefaultSystem ( | ||
system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
in | ||
{ | ||
formatter = pkgs.nixfmt-rfc-style; | ||
|
||
packages.winapps = pkgs.callPackage ./packages/winapps { }; | ||
packages.winapps-launcher = pkgs.callPackage ./packages/winapps-launcher { }; | ||
} | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/WinAppsLauncher.sh | ||
+++ b/WinAppsLauncher.sh | ||
@@ -19,7 +19,7 @@ declare -rx EC_WIN_NOT_SPEC=6 | ||
declare -rx EC_NO_WIN_FOUND=7 | ||
|
||
# Paths | ||
-declare -rx ICONS_PATH="./Icons" | ||
+declare -rx ICONS_PATH="@out@/Icons" | ||
declare -rx APPDATA_PATH="${HOME}/.local/share/winapps" | ||
declare -rx CONFIG_PATH="${HOME}/.config/winapps" | ||
declare -rx CONFIG_FILE="${CONFIG_PATH}/winapps.conf" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright (c) 2024 Oskar Manhart | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
{ | ||
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."; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested under KDE Plasma 6 Wayland, however it did automatically use xWayland I presume hence worked out of the box, maybe we should try on GNOME Wayland as well and one last that's heavily used, I'm not sure which, Sway may definitely have issues, Hyprland no clue, never used before. |
||
mainProgram = "winapps-launcher"; | ||
platforms = platforms.linux; | ||
license = licenses.gpl3; | ||
}; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.