1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 sassc,
6 meson,
7 ninja,
8 glib,
9 gnome-shell,
10 gnome-themes-extra,
11 gtk-engine-murrine,
12 inkscape,
13 cinnamon-common,
14 makeFontsConf,
15 python3,
16}:
17
18stdenv.mkDerivation rec {
19 pname = "arc-theme";
20 version = "20221218";
21
22 src = fetchFromGitHub {
23 owner = "jnsh";
24 repo = "arc-theme";
25 rev = version;
26 sha256 = "sha256-7VmqsUCeG5GwmrVdt9BJj0eZ/1v+no/05KwGFb7E9ns=";
27 };
28
29 nativeBuildInputs = [
30 meson
31 ninja
32 sassc
33 inkscape
34 glib # for glib-compile-resources
35 python3
36 ];
37
38 propagatedUserEnvPkgs = [
39 gnome-themes-extra
40 gtk-engine-murrine
41 ];
42
43 postPatch = ''
44 patchShebangs meson/install-file.py
45 '';
46
47 preBuild = ''
48 # Shut up inkscape's warnings about creating profile directory
49 export HOME="$TMPDIR"
50 '';
51
52 # Fontconfig error: Cannot load default config file: No such file: (null)
53 FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
54
55 mesonFlags = [
56 # "-Dthemes=cinnamon,gnome-shell,gtk2,gtk3,plank,xfwm,metacity"
57 # "-Dvariants=light,darker,dark,lighter"
58 "-Dcinnamon_version=${cinnamon-common.version}"
59 "-Dgnome_shell_version=${gnome-shell.version}"
60 # You will need to patch gdm to make use of this.
61 "-Dgnome_shell_gresource=true"
62 ];
63
64 meta = with lib; {
65 description = "Flat theme with transparent elements for GTK 3, GTK 2 and Gnome Shell";
66 homepage = "https://github.com/jnsh/arc-theme";
67 license = licenses.gpl3Only;
68 platforms = platforms.linux;
69 maintainers = with maintainers; [
70 simonvandel
71 romildo
72 ];
73 };
74}