mirror of
https://github.com/winapps-org/winapps.git
synced 2025-08-05 18:28:26 +02:00
feat: use patches
This commit is contained in:
11
packages/winapps-launcher/WinAppsLauncher.diff
Normal file
11
packages/winapps-launcher/WinAppsLauncher.diff
Normal file
@@ -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"
|
@@ -29,16 +29,18 @@ stdenv.mkDerivation rec {
|
||||
(callPackage ../winapps { })
|
||||
];
|
||||
|
||||
patches = [ ./WinAppsLauncher.diff ];
|
||||
|
||||
postPatch = ''
|
||||
substituteAllInPlace WinAppsLauncher.sh
|
||||
'';
|
||||
|
||||
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
|
||||
|
||||
|
Reference in New Issue
Block a user