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