diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-02-10 15:12:43 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-10 15:12:43 +0000 |
| commit | 857a78ce4ebd7b397d6f56d1436c4f06a99be9fc (patch) | |
| tree | 78d70a20b4d64bfd2fabd25834091932002b1786 /hyprpm/src/core/PluginManager.hpp | |
| parent | 339661229dd65161ec904fdc73390316a095bd46 (diff) | |
hyprpm: add full nix integration (#13189)
Adds nix integration to hyprpm: hyprpm will now detect nix'd hyprland and use nix develop instead
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'hyprpm/src/core/PluginManager.hpp')
| -rw-r--r-- | hyprpm/src/core/PluginManager.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/hyprpm/src/core/PluginManager.hpp b/hyprpm/src/core/PluginManager.hpp index 95177e3e..4bbbc5ca 100644 --- a/hyprpm/src/core/PluginManager.hpp +++ b/hyprpm/src/core/PluginManager.hpp @@ -4,7 +4,7 @@ #include <memory> #include <optional> #include <string> -#include <utility> +#include <expected> #include "Plugin.hpp" enum eHeadersErrors { @@ -41,6 +41,7 @@ struct SHyprlandVersion { std::string date; std::string abiHash; int commits = 0; + bool isNix = false; }; class CPluginManager { @@ -71,16 +72,19 @@ class CPluginManager { bool m_bVerbose = false; bool m_bNoShallow = false; - std::string m_szCustomHlUrl, m_szUsername; + bool m_bNoNix = false; + std::string m_szCustomHlUrl, m_szUsername, m_szArgv0; // will delete recursively if exists!! bool createSafeDirectory(const std::string& path); private: - std::string headerError(const eHeadersErrors err); - std::string headerErrorShort(const eHeadersErrors err); + std::string headerError(const eHeadersErrors err); + std::string headerErrorShort(const eHeadersErrors err); - std::string m_szWorkingPluginDirectory; + std::expected<std::string, std::string> nixDevelopIfNeeded(const std::string& cmd, const SHyprlandVersion& ver); + + std::string m_szWorkingPluginDirectory; }; inline std::unique_ptr<CPluginManager> g_pPluginManager; |
