about summary refs log tree commit diff
path: root/pkgs/data/icons/fluent-icon-theme
diff options
context:
space:
mode:
authorIcy-Thought <icy-thought@pm.me>2022-08-28 12:15:49 +0200
committerIcy-Thought <icy-thought@pm.me>2022-08-30 08:47:48 +0200
commit96f44883129e91c903e83fd92e5ede0de69b2791 (patch)
tree699832a10882936bf7d561e7cedef15ba6cdb79c /pkgs/data/icons/fluent-icon-theme
parent7517de391d12a21cd6f6f86df2c42f9ea90237e8 (diff)
fluent-icon-theme: init at 2022-02-28
Diffstat (limited to 'pkgs/data/icons/fluent-icon-theme')
-rw-r--r--pkgs/data/icons/fluent-icon-theme/default.nix73
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/data/icons/fluent-icon-theme/default.nix b/pkgs/data/icons/fluent-icon-theme/default.nix
new file mode 100644
index 0000000000000..c3e4f71e6cdcb
--- /dev/null
+++ b/pkgs/data/icons/fluent-icon-theme/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+, gtk3
+, hicolor-icon-theme
+, jdupes
+, roundedIcons ? false
+, blackPanelIcons ? false
+, colorVariants ? []
+,
+}:
+let
+  pname = "Fluent-icon-theme";
+in
+lib.checkListOfEnum "${pname}: available color variants" [
+  "standard"
+  "green"
+  "grey"
+  "orange"
+  "pink"
+  "purple"
+  "red"
+  "yellow"
+  "teal"
+  "all"
+] colorVariants
+
+stdenvNoCC.mkDerivation rec {
+  inherit pname;
+  version = "2022-02-28";
+
+  src = fetchFromGitHub {
+    owner = "vinceliuice";
+    repo = pname;
+    rev = version;
+    sha256 = "UMj3qF9lhd9kM7J/3RtG3AiWlBontrowfsFOb3yr0tQ=";
+  };
+
+  nativeBuildInputs = [ gtk3 jdupes ];
+
+  buildInputs = [ hicolor-icon-theme ];
+
+  # Unnecessary & slow fixup's
+  dontPatchELF = true;
+  dontRewriteSymlinks = true;
+  dontDropIconThemeCache = true;
+
+  postPatch = ''
+    patchShebangs install.sh
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    ./install.sh --dest $out/share/icons \
+      --name Fluent \
+      ${builtins.toString colorVariants} \
+      ${lib.optionalString roundedIcons "--round"} \
+      ${lib.optionalString blackPanelIcons "--black"}
+
+    jdupes --link-soft --recurse $out/share
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Fluent icon theme for linux desktops";
+    homepage = "https://github.com/vinceliuice/Fluent-icon-theme";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ icy-thought ];
+  };
+}