jetbrains: useFetchCargoVendor (#377020)
[NixPkgs.git] / pkgs / by-name / sw / sweet / package.nix
blob51763fb1b974f47e9cf61e315dd42c37b0010d64
2   lib,
3   stdenvNoCC,
4   fetchurl,
5   unzip,
6   gtk-engine-murrine,
7   colorVariants ? [ ], # default: install all icons
8 }:
10 let
11   pname = "sweet";
12   colorVariantList = [
13     "Sweet-Ambar-Blue-Dark-v40"
14     "Sweet-Ambar-Blue-Dark"
15     "Sweet-Ambar-Blue-v40"
16     "Sweet-Ambar-Blue"
17     "Sweet-Ambar-v40"
18     "Sweet-Ambar"
19     "Sweet-Dark-v40"
20     "Sweet-Dark"
21     "Sweet-mars-v40"
22     "Sweet-mars"
23     "Sweet-v40"
24     "Sweet"
25   ];
28 lib.checkListOfEnum "${pname}: color variants" colorVariantList colorVariants
30   stdenvNoCC.mkDerivation
31   (finalAttrs: {
32     inherit pname;
33     version = "5.0";
35     srcs = [
36       (fetchurl {
37         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Ambar-Blue-Dark-v40.tar.xz";
38         hash = "sha256-fCCkkEYr4XPnP5aPrs3HAwIwM/Qb0NFY8Rf1ABu0ygY=";
39       })
40       (fetchurl {
41         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Ambar-Blue-Dark.tar.xz";
42         hash = "sha256-xMAqUsol1FPeFoq8KLTmKCeZMF34FDAjhiagsRmjGT8=";
43       })
44       (fetchurl {
45         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Ambar-Blue-v40.tar.xz";
46         hash = "sha256-JlpomJ8Ao4bJFJbCDliRtxNckEG3LzINBqhWzfTARJs=";
47       })
48       (fetchurl {
49         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Ambar-Blue.tar.xz";
50         hash = "sha256-HKJ/Ca5cy91kJZVEETyMcOcrgLliHF/S2rdBmWfKi08=";
51       })
52       (fetchurl {
53         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Ambar-v40.tar.xz";
54         hash = "sha256-0LjARDbSPyQWN5nT97k2c//eebxhgStGYsebpNQn9+w=";
55       })
56       (fetchurl {
57         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Ambar.tar.xz";
58         hash = "sha256-UjH4popJCqQ18HZUngsO6cE4axSAM7/EXwM8nHAdVS4=";
59       })
60       (fetchurl {
61         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Dark-v40.tar.xz";
62         hash = "sha256-4/e81slrkcO3WdrQ2atGHdZsErlzme4mRImfLvmGJnQ=";
63       })
64       (fetchurl {
65         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-Dark.tar.xz";
66         hash = "sha256-Tv+xtUee1TIdRLlnP84aVfk+V6xgeeeICRZCdeSSjE8=";
67       })
68       (fetchurl {
69         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-mars-v40.tar.xz";
70         hash = "sha256-FmJoPeQ8iLA6X6lFawBqG8lviQXWBHG5lgQsZvU68BM=";
71       })
72       (fetchurl {
73         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-mars.tar.xz";
74         hash = "sha256-bqL9jR8yPF9ZnEZ1O+P3/e6E59m+MY7mQNT3BhYVhu4=";
75       })
76       (fetchurl {
77         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet-v40.tar.xz";
78         hash = "sha256-Oesx/McKmTlqwJX8u6RrV3AtOIB73BQveD8slbD14js=";
79       })
80       (fetchurl {
81         url = "https://github.com/EliverLara/Sweet/releases/download/v${finalAttrs.version}/Sweet.tar.xz";
82         hash = "sha256-m0tQHV/3UkDoOAmBZF6Nvugj6fEkmLbeLPdQ/IFkHOo=";
83       })
84     ];
86     nativeBuildInputs = [ unzip ];
88     propagatedUserEnvPkgs = [ gtk-engine-murrine ];
90     sourceRoot = ".";
92     installPhase = ''
93       runHook preInstall
94       mkdir -p $out/share/themes/
95       cp -r ${
96         lib.concatStringsSep " " (if colorVariants != [ ] then colorVariants else colorVariantList)
97       } $out/share/themes/
98       runHook postInstall
99     '';
101     meta = with lib; {
102       description = "Light and dark colorful Gtk3.20+ theme";
103       homepage = "https://github.com/EliverLara/Sweet";
104       license = licenses.gpl3Plus;
105       maintainers = with maintainers; [
106         fuzen
107         d3vil0p3r
108       ];
109       platforms = platforms.unix;
110     };
111   })