diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5f2edb..04d95f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,8 @@ ci: autoupdate_branch: "rewrite" +exclude: ^(.+)\.patch$ + repos: - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 diff --git a/packages/winapps/default.nix b/packages/winapps/default.nix index ea8ea8b..3f50ce9 100644 --- a/packages/winapps/default.nix +++ b/packages/winapps/default.nix @@ -11,8 +11,8 @@ ... }: let - rev = "7bae17e3a3607e6b93c7cfc4155dfbdca7bba005"; - hash = "sha256-PP4POMwHCsAdiCxZkjXlON84F0Mg3Pd5bHEI6tC+Sds="; + rev = "07817afe0c2cad15c4eb90b5c94261a2b4d365d4"; + hash = "sha256-4KxssnSw1Xk6huKRpbRFw6NXIhjCoZYBzu/HYA1ngDM="; in stdenv.mkDerivation rec { pname = "winapps"; diff --git a/packages/winapps/setup.patch b/packages/winapps/setup.patch index 98aaece..cb2c22b 100644 --- a/packages/winapps/setup.patch +++ b/packages/winapps/setup.patch @@ -4,8 +4,8 @@ readonly USER_BIN_PATH="${HOME}/.local/bin" # UNIX path to 'bin' directory for a '--user' WinApps installation. readonly USER_BIN_PATH_WIN='\\tsclient\home\.local\bin' # WINDOWS path to 'bin' directory for a '--user' WinApps installation. # 'SOURCE' --readonly SYS_SOURCE_PATH="${SYS_BIN_PATH}/winapps" # UNIX path to WinApps source directory for a '--system' WinApps installation. --readonly USER_SOURCE_PATH="${USER_BIN_PATH}/winapps" # UNIX path to WinApps source directory for a '--system' WinApps installation. +-readonly SYS_SOURCE_PATH="${SYS_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--system' WinApps installation. +-readonly USER_SOURCE_PATH="${USER_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--system' WinApps installation. +readonly SYS_SOURCE_PATH="@out@/src" # UNIX path to WinApps source directory for a '--system' WinApps installation. +readonly USER_SOURCE_PATH="@out@/src" # UNIX path to WinApps source directory for a '--system' WinApps installation. # 'APP' @@ -17,7 +17,7 @@ # 'Inquirer Bash Script' -readonly INQUIRER_PATH="./install/inquirer.sh" # UNIX path to the 'inquirer' script, which is used to produce selection menus. +readonly INQUIRER_PATH="@out@/src/install/inquirer.sh" # UNIX path to the 'inquirer' script, which is used to produce selection menus. - + # REMOTE DESKTOP CONFIGURATION readonly VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY). @@ -129,13 +129,13 @@ function waTerminateScript() { @@ -39,50 +39,52 @@ + ${COMMAND_TEXT}winapps-setup --system --uninstall${CLEAR_TEXT} # Uninstall everything in /usr + ${COMMAND_TEXT}winapps-setup --help${CLEAR_TEXT} # Display this usage message." } - + # Name: 'waGetSourceCode' @@ -158,7 +158,7 @@ function waGetSourceCode() { $SUDO git clone --recurse-submodules --remote-submodules https://github.com/winapps-org/winapps.git "$SOURCE_PATH" else echo -e "${INFO_TEXT}WinApps installation already present at ${CLEAR_TEXT}${COMMAND_TEXT}${SOURCE_PATH}${CLEAR_TEXT}${INFO_TEXT}. Updating...${CLEAR_TEXT}" - $SUDO git -C "$SOURCE_PATH" pull --no-rebase -+ ++ fi - + # Silently change the working directory. @@ -385,7 +385,7 @@ function waCheckExistingInstall() { - + # Display the suggested action(s). echo "--------------------------------------------------------------------------------" - echo -e "Please remove the existing WinApps installation using ${COMMAND_TEXT}./setup.sh --user --uninstall${CLEAR_TEXT}." + echo -e "Please remove the existing WinApps installation using ${COMMAND_TEXT}winapps-setup --user --uninstall${CLEAR_TEXT}." echo "--------------------------------------------------------------------------------" - + # Terminate the script. @@ -405,7 +405,7 @@ function waCheckExistingInstall() { - + # Display the suggested action(s). echo "--------------------------------------------------------------------------------" - echo -e "Please remove the existing WinApps installation using ${COMMAND_TEXT}./setup.sh --system --uninstall${CLEAR_TEXT}." + echo -e "Please remove the existing WinApps installation using ${COMMAND_TEXT}winapps-setup --system --uninstall${CLEAR_TEXT}." echo "--------------------------------------------------------------------------------" - + # Terminate the script. @@ -800,7 +800,7 @@ function waCheckGroupMembership() { # Identify groups the current user belongs to. USER_GROUPS=$(groups "$(whoami)") - + - if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirt\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then + if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirtd\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then # Complete the previous line. echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n" - + @@ -1621,8 +1621,8 @@ function waInstall() { waFindInstalled - + # Install the WinApps bash scripts. -- $SUDO ln -s "./bin/winapps" "${BIN_PATH}/winapps" -- $SUDO ln -s "./setup.sh" "${BIN_PATH}/winapps-setup" - +- $SUDO ln -sf "${SOURCE_PATH}/bin/winapps" "${BIN_PATH}/winapps" +- $SUDO ln -sf "${SOURCE_PATH}/setup.sh" "${BIN_PATH}/winapps-setup" ++ ++ + # Configure the Windows RDP session application launcher. waConfigureWindows