From 0e608a0fdf90aea6e7b3adab4af8bf4c688165e1 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Sun, 18 Jul 2021 14:10:58 +0700 Subject: [PATCH] add discover --- flake.lock | 17 +++++++++++++++++ flake.nix | 6 +++++- modules/user/packages-rin.nix | 1 + packages/discover/default.nix | 26 ++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 packages/discover/default.nix diff --git a/flake.lock b/flake.lock index b8dc8fa..585cf1f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "discover": { + "flake": false, + "locked": { + "lastModified": 1619462451, + "narHash": "sha256-QR/Z0YGp1SLQTGUgL7NPWw2Sn4z9sYQeGqiTKyr6jV4=", + "owner": "trigg", + "repo": "Discover", + "rev": "4d917d30c8593f048423e834aa46121c59f635de", + "type": "github" + }, + "original": { + "owner": "trigg", + "repo": "Discover", + "type": "github" + } + }, "fast-syntax-highlighting": { "flake": false, "locked": { @@ -145,6 +161,7 @@ }, "root": { "inputs": { + "discover": "discover", "fast-syntax-highlighting": "fast-syntax-highlighting", "home-manager": "home-manager", "neovim-nightly": "neovim-nightly", diff --git a/flake.nix b/flake.nix index 085f257..adf0a23 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,9 @@ zsh-history-substring-search = { url = "github:zsh-users/zsh-history-substring-search"; flake = false; }; fast-syntax-highlighting = { url = "github:zdharma/fast-syntax-highlighting"; flake = false; }; pure = { url = "github:sindresorhus/pure"; flake = false; }; + + # overlays + discover = { url = "github:trigg/Discover"; flake = false; }; }; outputs = { self, nixpkgs, home-manager, secrets, ... } @ inputs: @@ -47,11 +50,12 @@ let callPackage = pkgs.callPackage; in { + discover-overlay = callPackage ./packages/discover {}; linux-lava = callPackage ./packages/linux-lava {}; wine-osu = callPackage ./packages/wine-osu { inherit getPaths; }; }; - overlays = (builtins.map + overlays = [ (self: super: { inherit inputs; }) ] ++ (builtins.map (path: import path) # Imports path (builtins.filter (path: lib.hasSuffix ".nix" path) # Checks file extension diff --git a/modules/user/packages-rin.nix b/modules/user/packages-rin.nix index a7282c8..de04c0e 100644 --- a/modules/user/packages-rin.nix +++ b/modules/user/packages-rin.nix @@ -16,6 +16,7 @@ ] ++ lib.optionals enableGUI [ brave discord-canary + discover-overlay element-desktop feh gnome.file-roller diff --git a/packages/discover/default.nix b/packages/discover/default.nix new file mode 100644 index 0000000..883fdf6 --- /dev/null +++ b/packages/discover/default.nix @@ -0,0 +1,26 @@ +{ inputs +, python3Packages +, gtk3 +, gobject-introspection +, wrapGAppsHook +, ... +}: +python3Packages.buildPythonApplication { + pname = "discover-overlay"; + version = "1.0"; + src = inputs.discover; + + nativeBuildInputs = [ + wrapGAppsHook + ]; + propagatedBuildInputs = with python3Packages; [ + gtk3 + gobject-introspection + pygobject3 + websocket-client + pyxdg + requests + python-pidfile + pillow + ]; +}