summaryrefslogtreecommitdiff
path: root/pkgs/gradience.nix
blob: 0ea72da8b911936b247f8a2ce117c8641aa1a6ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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;
    };
  }