about summary refs log tree commit diff
path: root/pkgs/data/icons
diff options
context:
space:
mode:
authorjopejoe1 <johannes@joens.email>2024-05-22 18:16:09 +0200
committerjopejoe1 <johannes@joens.email>2024-05-22 18:34:45 +0200
commit362fd800d189f00fe24bd511517f9c1fc3fb6f0e (patch)
tree5797c0bb1e8b9facd5ad8e732f68c2cebbba3f64 /pkgs/data/icons
parent9db19e0cffb604c216fa9ba6a3d1e5510a90278e (diff)
hicolor-icon-theme: refactor
Diffstat (limited to 'pkgs/data/icons')
-rw-r--r--pkgs/data/icons/hicolor-icon-theme/default.nix22
1 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/data/icons/hicolor-icon-theme/default.nix b/pkgs/data/icons/hicolor-icon-theme/default.nix
index d5a4c49ee8d51..0d528243a8654 100644
--- a/pkgs/data/icons/hicolor-icon-theme/default.nix
+++ b/pkgs/data/icons/hicolor-icon-theme/default.nix
@@ -1,19 +1,23 @@
 {
   lib,
   stdenvNoCC,
-  fetchurl,
+  fetchFromGitLab,
+  testers,
   meson,
   pkg-config,
   ninja,
 }:
 
-stdenvNoCC.mkDerivation rec {
+stdenvNoCC.mkDerivation (finalAttrs: {
   pname = "hicolor-icon-theme";
   version = "0.18";
 
-  src = fetchurl {
-    url = "https://icon-theme.freedesktop.org/releases/hicolor-icon-theme-${version}.tar.xz";
-    hash = "sha256-2w5QqAqjv2S7RcvKXPn3Xv2TSM8qxpC5B0NSOMPPgdc=";
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "xdg";
+    repo = "default-icon-theme";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-uoB7u/ok7vMxKDl8pINdnV9VsvmsntBcZuz3Q4zGz7M=";
   };
 
   nativeBuildInputs = [
@@ -24,11 +28,15 @@ stdenvNoCC.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
   meta = with lib; {
     description = "Default fallback theme used by implementations of the icon theme specification";
-    homepage = "https://icon-theme.freedesktop.org/releases/";
+    homepage = "https://www.freedesktop.org/wiki/Software/icon-theme/";
+    changelog = "https://gitlab.freedesktop.org/xdg/default-icon-theme/-/blob/${finalAttrs.src.rev}/NEWS";
     platforms = platforms.unix;
     license = licenses.gpl2Only;
+    pkgConfigModules = [ "default-icon-theme" ];
     maintainers = with maintainers; [ jopejoe1 ];
   };
-}
+})