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>
This commit is contained in:
Vaxry 2026-02-10 15:12:43 +00:00 committed by GitHub
parent 339661229d
commit 857a78ce4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 150 additions and 34 deletions

View file

@ -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;