1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 23:52:33 +00:00
nixpkgs/pkgs/data/themes/plata/default.nix

93 lines
2.8 KiB
Nix
Raw Normal View History

2018-12-17 04:17:02 +00:00
{ stdenv, fetchFromGitLab, autoreconfHook, pkgconfig, parallel
, sassc, inkscape, libxml2, gnome2, gdk_pixbuf, librsvg, gtk-engine-murrine
, cinnamonSupport ? true
, gnomeFlashbackSupport ? true
, gnomeShellSupport ? true
, mateSupport ? true
, openboxSupport ? true
, xfceSupport ? true
, gtkNextSupport ? false
, plankSupport ? false
2019-05-22 01:26:00 +01:00
, steamSupport ? false
2018-12-17 04:17:02 +00:00
, telegramSupport ? false
2019-05-22 01:26:00 +01:00
, tweetdeckSupport ? false, zip ? null
2018-12-17 04:17:02 +00:00
, selectionColor ? null # Primary color for 'selected-items' (Default: #3F51B5 = Indigo500)
, accentColor ? null # Secondary color for notifications and OSDs (Default: #7986CB = Indigo300)
, suggestionColor ? null # Secondary color for 'suggested' buttons (Default: #673AB7 = DPurple500)
, destructionColor ? null # Tertiary color for 'destructive' buttons (Default: #F44336 = Red500)
}:
2019-05-22 01:26:00 +01:00
assert tweetdeckSupport -> zip != null;
2018-12-17 04:17:02 +00:00
stdenv.mkDerivation rec {
name = "plata-theme-${version}";
2019-05-22 01:26:00 +01:00
version = "0.8.0";
2018-12-17 04:17:02 +00:00
src = fetchFromGitLab {
owner = "tista500";
repo = "plata-theme";
rev = version;
2019-05-22 01:26:00 +01:00
sha256 = "10xvfrc945zqlgzlx8zjyg0gnkwmq9vfjk0yqjy3gg62i65s8sch";
2018-12-17 04:17:02 +00:00
};
preferLocalBuild = true;
nativeBuildInputs = [
autoreconfHook
pkgconfig
parallel
sassc
inkscape
libxml2
gnome2.glib.dev
2019-05-22 01:26:00 +01:00
]
++ stdenv.lib.optional tweetdeckSupport zip;
2018-12-17 04:17:02 +00:00
buildInputs = [
gdk_pixbuf
librsvg
];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
postPatch = "patchShebangs .";
configureFlags =
let
inherit (stdenv.lib) enableFeature optional;
withOptional = value: feat: optional (value != null) "--with-${feat}=${value}";
in [
"--enable-parallel"
(enableFeature cinnamonSupport "cinnamon")
(enableFeature gnomeFlashbackSupport "flashback")
(enableFeature gnomeShellSupport "gnome")
(enableFeature mateSupport "mate")
(enableFeature openboxSupport "openbox")
(enableFeature xfceSupport "xfce")
(enableFeature gtkNextSupport "gtk_next")
(enableFeature plankSupport "plank")
2019-05-22 01:26:00 +01:00
(enableFeature steamSupport "airforsteam")
2018-12-17 04:17:02 +00:00
(enableFeature telegramSupport "telegram")
(enableFeature tweetdeckSupport "tweetdeck")
]
++ (withOptional selectionColor "selection_color")
++ (withOptional accentColor "accent_color")
++ (withOptional suggestionColor "suggestion_color")
++ (withOptional destructionColor "destruction_color");
2019-05-22 01:26:00 +01:00
postInstall = ''
for dest in $out/share/gtksourceview-{3.0,4}/styles; do
mkdir -p $dest
cp $out/share/themes/Plata-{Noir,Lumine}/gtksourceview/*.xml $dest
done
'';
2018-12-17 04:17:02 +00:00
meta = with stdenv.lib; {
description = "A Gtk+ theme based on Material Design Refresh";
homepage = https://gitlab.com/tista500/plata-theme;
license = with licenses; [ gpl2 cc-by-sa-40 ];
platforms = platforms.linux;
maintainers = [ maintainers.tadfisher ];
};
}