Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 109 lines 2.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 autoreconfHook, 6 pkg-config, 7 parallel, 8 sassc, 9 inkscape, 10 libxml2, 11 glib, 12 gtk_engines, 13 gtk-engine-murrine, 14 cinnamonSupport ? true, 15 gnomeFlashbackSupport ? true, 16 gnomeShellSupport ? true, 17 openboxSupport ? true, 18 xfceSupport ? true, 19 mateSupport ? true, 20 gtk3, 21 marco, 22 gtkNextSupport ? false, 23 plankSupport ? false, 24 steamSupport ? false, 25 telegramSupport ? false, 26 zip, 27 tweetdeckSupport ? false, 28 selectionColor ? null, # Primary color for 'selected-items' (Default: #3F51B5 = Indigo500) 29 accentColor ? null, # Secondary color for notifications and OSDs (Default: #7986CB = Indigo300) 30 suggestionColor ? null, # Secondary color for 'suggested' buttons (Default: #673AB7 = DPurple500) 31 destructionColor ? null, # Tertiary color for 'destructive' buttons (Default: #F44336 = Red500) 32}: 33 34stdenv.mkDerivation rec { 35 pname = "plata-theme"; 36 version = "0.9.9"; 37 38 src = fetchFromGitLab { 39 owner = "tista500"; 40 repo = "plata-theme"; 41 rev = version; 42 sha256 = "1iwvlv9qcrjyfbzab00vjqafmp3vdybz1hi02r6lwbgvwyfyrifk"; 43 }; 44 45 nativeBuildInputs = [ 46 autoreconfHook 47 pkg-config 48 parallel 49 sassc 50 inkscape 51 libxml2 52 glib 53 ] 54 ++ lib.optionals mateSupport [ 55 gtk3 56 marco 57 ] 58 ++ lib.optional telegramSupport zip; 59 60 buildInputs = [ gtk_engines ]; 61 62 propagatedUserEnvPkgs = [ 63 gtk-engine-murrine 64 ]; 65 66 postPatch = "patchShebangs ."; 67 68 configureFlags = 69 let 70 inherit (lib) enableFeature optional; 71 withOptional = value: feat: optional (value != null) "--with-${feat}=${value}"; 72 in 73 [ 74 "--enable-parallel" 75 (enableFeature cinnamonSupport "cinnamon") 76 (enableFeature gnomeFlashbackSupport "flashback") 77 (enableFeature gnomeShellSupport "gnome") 78 (enableFeature openboxSupport "openbox") 79 (enableFeature xfceSupport "xfce") 80 (enableFeature mateSupport "mate") 81 (enableFeature gtkNextSupport "gtk_next") 82 (enableFeature plankSupport "plank") 83 (enableFeature steamSupport "airforsteam") 84 (enableFeature telegramSupport "telegram") 85 (enableFeature tweetdeckSupport "tweetdeck") 86 ] 87 ++ (withOptional selectionColor "selection_color") 88 ++ (withOptional accentColor "accent_color") 89 ++ (withOptional suggestionColor "suggestion_color") 90 ++ (withOptional destructionColor "destruction_color"); 91 92 postInstall = '' 93 for dest in $out/share/gtksourceview-{3.0,4}/styles; do 94 mkdir -p $dest 95 cp $out/share/themes/Plata-{Noir,Lumine}/gtksourceview/*.xml $dest 96 done 97 ''; 98 99 meta = with lib; { 100 description = "GTK theme based on Material Design Refresh"; 101 homepage = "https://gitlab.com/tista500/plata-theme"; 102 license = with licenses; [ 103 gpl2 104 cc-by-sa-40 105 ]; 106 platforms = platforms.linux; 107 maintainers = [ maintainers.tadfisher ]; 108 }; 109}