From 3daa5df0d9ec7eccede4a82c8c60bf76a931241a Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Mon, 13 Dec 2021 00:17:01 +0100 Subject: [PATCH 1/6] nordzy-icon-theme: init at unstable-2021-12-14 nordzy-icon-theme: init at 5c247a4f19cf9849615631d1bf77727b945b634e nordzy-icon-theme: etc Fixed adding multiple themes nordzy-icon-theme: init at unstable-2021-12-14 --- pkgs/data/icons/nordzy-icon-theme/default.nix | 52 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/data/icons/nordzy-icon-theme/default.nix diff --git a/pkgs/data/icons/nordzy-icon-theme/default.nix b/pkgs/data/icons/nordzy-icon-theme/default.nix new file mode 100644 index 000000000000..97575eedb1d9 --- /dev/null +++ b/pkgs/data/icons/nordzy-icon-theme/default.nix @@ -0,0 +1,52 @@ +{ stdenv +, fetchFromGitHub +, lib +, bash +, gtk3 +, nordzy-themes ? [ "all" ] # Override this to only install selected themes +}: + +let + themes-arg-string = lib.strings.concatMapStrings (theme: "-t ${theme} ") nordzy-themes; +in +stdenv.mkDerivation rec { + pname = "nordzy-icon-theme"; + version = "unstable-2021-12-14"; + + src = fetchFromGitHub { + owner = "alvatip"; + repo = "Nordzy-icon"; + rev = "5c247a4f19cf9849615631d1bf77727b945b634e"; + sha256 = "Jqn5CF80xlYJ7H4qI1VEj91vcKPPoMXP5+sPs0ksiC4="; + }; + + nativeBuildInputs = [ gtk3 ]; + + postPatch = '' + substituteInPlace install.sh \ + --replace /bin/bash ${bash}/bin/bash + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/icons + ./install.sh --dest $out/share/icons \ + -n Nordzy \ + -t ${themes-arg-string} + + runHook postInstall + ''; + + dontFixup = true; + + meta = with lib; { + description = "A free and open source icon theme using the Nord color palette and based on WhiteSur and Numix Icon Theme"; + homepage = "https://github.com/alvatip/Nordzy-icon"; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ + alexnortung + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65508b727f21..7e2624734571 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23546,6 +23546,8 @@ with pkgs; nordzy-cursor-theme = callPackage ../data/icons/nordzy-cursor-theme { }; + nordzy-icon-theme = callPackage ../data/icons/nordzy-icon-theme { }; + inherit (callPackages ../data/fonts/noto-fonts {}) noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-emoji-blob-bin noto-fonts-extra; From 35b60b25aa588fe30e236a44cfeacb5a5a69c1a9 Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Tue, 14 Dec 2021 21:38:37 +0100 Subject: [PATCH 2/6] nordzy-icon-theme: etc Updated platforms to only limux x86_64 --- pkgs/data/icons/nordzy-icon-theme/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/data/icons/nordzy-icon-theme/default.nix b/pkgs/data/icons/nordzy-icon-theme/default.nix index 97575eedb1d9..2c8813ce5df3 100644 --- a/pkgs/data/icons/nordzy-icon-theme/default.nix +++ b/pkgs/data/icons/nordzy-icon-theme/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { description = "A free and open source icon theme using the Nord color palette and based on WhiteSur and Numix Icon Theme"; homepage = "https://github.com/alvatip/Nordzy-icon"; license = licenses.gpl3; - platforms = platforms.all; + platforms = [ "x86_64-linux" ]; maintainers = with maintainers; [ alexnortung ]; From 236074ea759894518beda3eb0ef91070bdfdf0e9 Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Sat, 25 Dec 2021 10:55:34 +0100 Subject: [PATCH 3/6] nordzy-icon-theme: etc set platforms to all, and added nordzy-theme-name argument --- pkgs/data/icons/nordzy-icon-theme/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/icons/nordzy-icon-theme/default.nix b/pkgs/data/icons/nordzy-icon-theme/default.nix index 2c8813ce5df3..5c06b5c8767b 100644 --- a/pkgs/data/icons/nordzy-icon-theme/default.nix +++ b/pkgs/data/icons/nordzy-icon-theme/default.nix @@ -3,6 +3,7 @@ , lib , bash , gtk3 +, nordzy-theme-name ? "Nordzy" , nordzy-themes ? [ "all" ] # Override this to only install selected themes }: @@ -23,8 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gtk3 ]; postPatch = '' - substituteInPlace install.sh \ - --replace /bin/bash ${bash}/bin/bash + patchShebangs install.sh ''; installPhase = '' @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { mkdir -p $out/share/icons ./install.sh --dest $out/share/icons \ - -n Nordzy \ + -n ${nordzy-theme-name} \ -t ${themes-arg-string} runHook postInstall @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { description = "A free and open source icon theme using the Nord color palette and based on WhiteSur and Numix Icon Theme"; homepage = "https://github.com/alvatip/Nordzy-icon"; license = licenses.gpl3; - platforms = [ "x86_64-linux" ]; + platforms = platforms.all; maintainers = with maintainers; [ alexnortung ]; From 9d6b9ddac5cebd17a99c397389c4f836c1d175dd Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Sat, 25 Dec 2021 11:26:04 +0100 Subject: [PATCH 4/6] nordzy-icon-theme: etc Using stdvenvNoCC. Patching away the call to gtk-update-icon-cache, thus there is no longer any need for gtk3. --- pkgs/data/icons/nordzy-icon-theme/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/data/icons/nordzy-icon-theme/default.nix b/pkgs/data/icons/nordzy-icon-theme/default.nix index 5c06b5c8767b..13c8d154f88f 100644 --- a/pkgs/data/icons/nordzy-icon-theme/default.nix +++ b/pkgs/data/icons/nordzy-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ stdenvNoCC , fetchFromGitHub , lib , bash @@ -10,7 +10,7 @@ let themes-arg-string = lib.strings.concatMapStrings (theme: "-t ${theme} ") nordzy-themes; in -stdenv.mkDerivation rec { +stdenvNoCC.mkDerivation { pname = "nordzy-icon-theme"; version = "unstable-2021-12-14"; @@ -21,10 +21,12 @@ stdenv.mkDerivation rec { sha256 = "Jqn5CF80xlYJ7H4qI1VEj91vcKPPoMXP5+sPs0ksiC4="; }; - nativeBuildInputs = [ gtk3 ]; - + # In the post patch phase we should fir st make sure to patch shebangs. + # We can also remove the gtk-update-icon-cache since the cache will later be built by the system. postPatch = '' patchShebangs install.sh + substituteInPlace install.sh \ + --replace "gtk-update-icon-cache" "#" ''; installPhase = '' @@ -33,7 +35,7 @@ stdenv.mkDerivation rec { mkdir -p $out/share/icons ./install.sh --dest $out/share/icons \ -n ${nordzy-theme-name} \ - -t ${themes-arg-string} + ${themes-arg-string} runHook postInstall ''; From e0bc5ad7d9391e136e86e5a9f57991f6cfd934c4 Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Tue, 28 Dec 2021 08:59:42 +0100 Subject: [PATCH 5/6] nordzy-icon-theme: etc Removed unnecessary input. Set platforms to linux only. Using gtk3 again and making sure the cache is not removed. --- pkgs/data/icons/nordzy-icon-theme/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/data/icons/nordzy-icon-theme/default.nix b/pkgs/data/icons/nordzy-icon-theme/default.nix index 13c8d154f88f..cf87bb01cc11 100644 --- a/pkgs/data/icons/nordzy-icon-theme/default.nix +++ b/pkgs/data/icons/nordzy-icon-theme/default.nix @@ -1,7 +1,6 @@ { stdenvNoCC , fetchFromGitHub , lib -, bash , gtk3 , nordzy-theme-name ? "Nordzy" , nordzy-themes ? [ "all" ] # Override this to only install selected themes @@ -21,14 +20,17 @@ stdenvNoCC.mkDerivation { sha256 = "Jqn5CF80xlYJ7H4qI1VEj91vcKPPoMXP5+sPs0ksiC4="; }; - # In the post patch phase we should fir st make sure to patch shebangs. - # We can also remove the gtk-update-icon-cache since the cache will later be built by the system. + # In the post patch phase we should first make sure to patch shebangs. postPatch = '' patchShebangs install.sh - substituteInPlace install.sh \ - --replace "gtk-update-icon-cache" "#" ''; + nativeBuildInputs = [ + gtk3 + ]; + + dontDropIconThemeCache = true; + installPhase = '' runHook preInstall @@ -46,7 +48,7 @@ stdenvNoCC.mkDerivation { description = "A free and open source icon theme using the Nord color palette and based on WhiteSur and Numix Icon Theme"; homepage = "https://github.com/alvatip/Nordzy-icon"; license = licenses.gpl3; - platforms = platforms.all; + platforms = platforms.linux; maintainers = with maintainers; [ alexnortung ]; From c423629183792da33e61c0f4ab9df4f2b77f2825 Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Sun, 23 Jan 2022 17:23:06 +0100 Subject: [PATCH 6/6] nordzy-icon-theme: unstable-2021-12-14 -> unstable-2022-01-23 Added Jdupes and made a lot of formatting. Co-authored-by: romildo --- pkgs/data/icons/nordzy-icon-theme/default.nix | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/pkgs/data/icons/nordzy-icon-theme/default.nix b/pkgs/data/icons/nordzy-icon-theme/default.nix index cf87bb01cc11..11113bb6a503 100644 --- a/pkgs/data/icons/nordzy-icon-theme/default.nix +++ b/pkgs/data/icons/nordzy-icon-theme/default.nix @@ -2,22 +2,19 @@ , fetchFromGitHub , lib , gtk3 -, nordzy-theme-name ? "Nordzy" +, jdupes , nordzy-themes ? [ "all" ] # Override this to only install selected themes }: -let - themes-arg-string = lib.strings.concatMapStrings (theme: "-t ${theme} ") nordzy-themes; -in stdenvNoCC.mkDerivation { pname = "nordzy-icon-theme"; - version = "unstable-2021-12-14"; + version = "unstable-2022-01-23"; src = fetchFromGitHub { owner = "alvatip"; repo = "Nordzy-icon"; - rev = "5c247a4f19cf9849615631d1bf77727b945b634e"; - sha256 = "Jqn5CF80xlYJ7H4qI1VEj91vcKPPoMXP5+sPs0ksiC4="; + rev = "10b9ee80ef5c4cac1d1770d89a6d55046521ea36"; + sha256 = "1b8abhs5gzr2qy407jq818pr67vjky8zn3pa3c8n552ayybblibk"; }; # In the post patch phase we should first make sure to patch shebangs. @@ -27,6 +24,7 @@ stdenvNoCC.mkDerivation { nativeBuildInputs = [ gtk3 + jdupes ]; dontDropIconThemeCache = true; @@ -34,10 +32,12 @@ stdenvNoCC.mkDerivation { installPhase = '' runHook preInstall - mkdir -p $out/share/icons - ./install.sh --dest $out/share/icons \ - -n ${nordzy-theme-name} \ - ${themes-arg-string} + name= ./install.sh --dest $out/share/icons \ + ${lib.optionalString (nordzy-themes != []) (lib.strings.concatMapStrings (theme: "-t ${theme} ") nordzy-themes)} + + # Replace duplicate files with hardlinks to the first file in each + # set of duplicates, reducing the installed size in about 87% + jdupes -L -r $out/share runHook postInstall ''; @@ -45,12 +45,10 @@ stdenvNoCC.mkDerivation { dontFixup = true; meta = with lib; { - description = "A free and open source icon theme using the Nord color palette and based on WhiteSur and Numix Icon Theme"; + description = "Icon theme using the Nord color palette, based on WhiteSur and Numix icon themes"; homepage = "https://github.com/alvatip/Nordzy-icon"; - license = licenses.gpl3; + license = licenses.gpl3Only; platforms = platforms.linux; - maintainers = with maintainers; [ - alexnortung - ]; + maintainers = with maintainers; [ alexnortung ]; }; }