summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-03-05 21:03:13 -0500
committerseth <[email protected]>2023-03-05 21:03:13 -0500
commita430e3115c4b02297fef614d957981cb3bb25b2b (patch)
treeba37d3b60e5a398e5c3aa0f88259ecd3bf71733b
parent46a9e8fe282b847f8afa6e5a4ff6e021948485db (diff)
add gradience
-rw-r--r--flake.nix4
-rw-r--r--pkgs/gradience.nix83
-rw-r--r--pkgs/material-color-utilities.nix14
3 files changed, 100 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index d310195..eebf6e8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,8 +20,10 @@
aarch64-darwin
];
packageSet = pkgs:
- with pkgs; {
+ with pkgs; rec {
treefetch = callPackage ./pkgs/treefetch.nix {inherit naersk;};
+ material-color-utilities = callPackage ./pkgs/material-color-utilities.nix {};
+ gradience = callPackage ./pkgs/gradience.nix {inherit material-color-utilities;};
};
overrides = prev: {
discord-canary = import ./pkgs/discord-canary.nix prev;
diff --git a/pkgs/gradience.nix b/pkgs/gradience.nix
new file mode 100644
index 0000000..0ea72da
--- /dev/null
+++ b/pkgs/gradience.nix
@@ -0,0 +1,83 @@
+{
+ lib,
+ fetchFromGitHub,
+ python3Packages,
+ wrapGAppsHook,
+ blueprint-compiler,
+ desktop-file-utils,
+ gobject-introspection,
+ libadwaita,
+ libsoup_3,
+ libportal-gtk4,
+ meson,
+ ninja,
+ pkg-config,
+ material-color-utilities,
+ sassc,
+}: let
+ pythonDeps = with python3Packages; [
+ pygobject3
+ anyascii
+ cssutils
+ jinja2
+ lxml
+ material-color-utilities
+ pillow
+ pluggy
+ regex
+ svglib
+ Yapsy
+ ];
+in
+ python3Packages.buildPythonApplication rec {
+ pname = "gradience";
+ version = "0.4.1";
+ format = "other";
+
+ src = fetchFromGitHub {
+ owner = "GradienceTeam";
+ repo = "Gradience";
+ rev = version;
+ sha256 = "sha256-xR3wPU0ax9U4995GckC8UGJqrUErd+jS5z3D/jWCdXQ=";
+ };
+
+ nativeBuildInputs =
+ [
+ meson
+ ninja
+ blueprint-compiler
+ desktop-file-utils
+ gobject-introspection
+ libsoup_3
+ pkg-config
+ sassc
+ wrapGAppsHook
+ ]
+ ++ pythonDeps;
+
+ buildInputs = [
+ libadwaita
+ libportal-gtk4
+ libsoup_3
+ ];
+
+ pythonPath = pythonDeps;
+
+ dontWrapGApps = true;
+
+ preFixup = ''
+ makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+ '';
+
+ postFixup = ''
+ wrapPythonProgramsIn "$out/bin" "$out/lib $pythonPath"
+ '';
+
+ meta = with lib; {
+ description = "A tool for customizing Libadwaita applications and the adw-gtk3 theme.";
+ homepage = "https://gradienceteam.github.io/";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [getchoo];
+ platforms = platforms.linux;
+ };
+ }
diff --git a/pkgs/material-color-utilities.nix b/pkgs/material-color-utilities.nix
new file mode 100644
index 0000000..0bbb4f2
--- /dev/null
+++ b/pkgs/material-color-utilities.nix
@@ -0,0 +1,14 @@
+{
+ fetchPypi,
+ python3Packages,
+}:
+python3Packages.buildPythonPackage rec {
+ pname = "material-color-utilities";
+ version = "0.1.5";
+ src = fetchPypi {
+ pname = "${pname}-python";
+ inherit version;
+ sha256 = "sha256-PG8C585wWViFRHve83z3b9NijHyV+iGY2BdMJpyVH64=";
+ };
+ propagatedBuildInputs = with python3Packages; [pillow regex poetry-core];
+}