From 8dee1963ca9b710cde44a377e48117789d9ce3c4 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 28 Aug 2021 16:49:14 +0200 Subject: [PATCH] packages: Add superpaper --- hosts/miku.nix | 11 +++++ .../desktop/superpaper/default.nix | 41 +++++++++++++++++++ packages/default.nix | 5 +++ .../python/system_hotkey/default.nix | 26 ++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 packages/applications/desktop/superpaper/default.nix create mode 100644 packages/development/python/system_hotkey/default.nix diff --git a/hosts/miku.nix b/hosts/miku.nix index 71e37c7..8744979 100644 --- a/hosts/miku.nix +++ b/hosts/miku.nix @@ -93,6 +93,7 @@ steam discord-system-electron-wrapped # Custom package discord-wrapper # Custom package + superpaper # Custom package mumble ]; }; @@ -224,6 +225,16 @@ Restart = "always"; }; }; + superpaper = { + description = "A cross-platform multi monitor wallpaper manager."; + wantedBy = [ "default.target" ]; + path = [ pkgs.glib ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.superpaper}/bin/superpaper"; + Restart = "always"; + }; + }; }; }; diff --git a/packages/applications/desktop/superpaper/default.nix b/packages/applications/desktop/superpaper/default.nix new file mode 100644 index 0000000..a5152a8 --- /dev/null +++ b/packages/applications/desktop/superpaper/default.nix @@ -0,0 +1,41 @@ +{ + pkgs, lib, + python3Packages, python3, + fetchFromGitHub, + system_hotkey +}: + +python3Packages.buildPythonApplication rec { + pname = "superpaper"; + version = "2.1.0"; + + #buildInputs = [ gobject-introspection gtk3 gnome.adwaita-icon-theme ]; + + #nativeBuildInputs = [ wrapGAppsHook ]; + + propagatedBuildInputs = with python3.pkgs; [ setuptools pillow screeninfo numpy xcffib xpybutil system_hotkey wxPython_4_0 ]; + + src = fetchFromGitHub { + owner = "hhannine"; + repo = pname; + rev = "v${version}"; + sha256 = "064bpzfnhj3nk7hv13rzgb8fq6ddrxaqnkqm4mnymrsniv1im7rl"; + }; + + doCheck = false; + + # Required as we otherwise don't get the dbus policy installed + # correctly + preInstall = '' + # see https://github.com/pypa/setuptools/issues/130 + ${python3}/bin/${python3.executable} setup.py install_data --install-dir=$out --root=$out + ''; + + meta = with lib; { + homepage = "https://github.com/hhannine/Superpaper"; + description = "A cross-platform multi monitor wallpaper manager."; + license = licenses.mit; + maintainers = [ ]; + platforms = lib.platforms.linux; + }; +} diff --git a/packages/default.nix b/packages/default.nix index 4a059ca..ba959e5 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -3,6 +3,7 @@ let pySmartDL = pkgs.callPackage ./development/python/pySmartDL {}; cfscrape = pkgs.callPackage ./development/python/cfscrape {}; + system_hotkey = pkgs.callPackage ./development/python/system_hotkey {}; buildFHSUserEnvBubblewrap = pkgs.callPackage ./build-support/build-fhs-userenv-bubblewrap {}; discord-system-electron = pkgs.callPackage ./applications/networking/instant-messengers/discord { # Wayland @@ -26,6 +27,7 @@ in { python3Packages = pkgs.python3Packages // { pySmartDL = pySmartDL; cfscrape = cfscrape; + system_hotkey = system_hotkey; }; replaysorcery = pkgs.callPackage ./tools/games/replaysorcery {}; evdev-proxy = pkgs.callPackage ./tools/virtualisation/evdev-proxy {}; @@ -34,6 +36,9 @@ in { pySmartDL = pySmartDL; cfscrape = cfscrape; }; + superpaper = pkgs.callPackage ./applications/desktop/superpaper { + system_hotkey = system_hotkey; + }; discord-system-electron = discord-system-electron; discord-system-electron-wrapped = discord-system-electron-wrapped; discord-wrapper = pkgs.callPackage ./applications/networking/instant-messengers/discord/desktop.nix { diff --git a/packages/development/python/system_hotkey/default.nix b/packages/development/python/system_hotkey/default.nix new file mode 100644 index 0000000..c1c5e47 --- /dev/null +++ b/packages/development/python/system_hotkey/default.nix @@ -0,0 +1,26 @@ +{ + lib +, fetchgit +, python3Packages +}: + +python3Packages.buildPythonApplication rec { + pname = "system_hotkey"; + version = "1.0.0"; + + src = fetchgit { + url = "https://github.com/timeyyy/system_hotkey.git"; + rev = "37073bb04bdf78f8d3af909a9da3d3c30c7b8854"; + sha256 = "1d8n3783dblv04zlnky4h7xdgm5ay2bb6zxi3shk1f56621pf3qz"; + }; + + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/timeyyy/system_hotkey"; + description = "system wide hotkeys"; + license = licenses.bsd3; + maintainers = []; + platforms = platforms.linux; + }; +}