From ed7259b781ea365eb4366be483cf4d759c3a7904 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:10:07 +0000 Subject: [PATCH 01/11] arc-icon-theme: build GTK icon cache --- pkgs/data/icons/arc-icon-theme/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/icons/arc-icon-theme/default.nix b/pkgs/data/icons/arc-icon-theme/default.nix index 91e379de223..84bf45a52bb 100644 --- a/pkgs/data/icons/arc-icon-theme/default.nix +++ b/pkgs/data/icons/arc-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, moka-icon-theme }: +{ stdenv, fetchFromGitHub, autoreconfHook, gtk3, moka-icon-theme }: stdenv.mkDerivation rec { name = "${package-name}-${version}"; @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { sha256 = "1ch3hp08qri93510hypzz6m2x4xgg2h15wvnhjwh1x1s1b7jvxjd"; }; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ autoreconfHook gtk3 moka-icon-theme ]; - buildInputs = [ moka-icon-theme ]; + postFixup = "gtk-update-icon-cache $out/share/icons/Arc"; meta = with stdenv.lib; { description = "Arc icon theme"; homepage = https://github.com/horst3180/arc-icon-theme; - license = with licenses; [ gpl3 ]; + license = licenses.gpl3; platforms = platforms.all; maintainers = with maintainers; [ romildo ]; }; From 5a22c587eb884387ea0a7b8ef7a5f68d01ab8c80 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:10:41 +0000 Subject: [PATCH 02/11] elementary-icon-theme: use CMake, build GTK icon cache --- .../icons/elementary-icon-theme/default.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/data/icons/elementary-icon-theme/default.nix b/pkgs/data/icons/elementary-icon-theme/default.nix index 77d29d52507..db4b5ea6387 100644 --- a/pkgs/data/icons/elementary-icon-theme/default.nix +++ b/pkgs/data/icons/elementary-icon-theme/default.nix @@ -1,26 +1,19 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, cmake, gtk3 }: stdenv.mkDerivation rec { + name = "elementary-icon-theme-${version}"; version = "4.3.1"; - package-name = "elementary-icon-theme"; - - name = "${package-name}-${version}"; - src = fetchurl { url = "https://launchpad.net/elementaryicons/4.x/${version}/+download/${name}.tar.xz"; sha256 = "1rp22igvnx71l94j5a6px142329djhk2psm1wfgbhdxbj23hw9kb"; }; - dontBuild = true; + nativeBuildInputs = [ cmake gtk3 ]; + + postPatch = "cat > volumeicon/CMakeLists.txt"; + postFixup = "gtk-update-icon-cache $out/share/icons/elementary"; - installPhase = '' - install -dm 755 $out/share/{icons,doc/$name} - cp -dr --no-preserve='ownership' . $out/share/icons/Elementary/ - mv $out/share/icons/Elementary/{AUTHORS,CONTRIBUTORS,README.md} \ - $out/share/doc/$name/ - rm $out/share/icons/Elementary/{COPYING,pre-commit} - ''; meta = with stdenv.lib; { description = "Elementary icon theme"; From b22c33fb94a7f5f7a12edae8d1b79679612cf039 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:11:06 +0000 Subject: [PATCH 03/11] elementary-xfce-icon-theme: refactor, build GTK icon cache --- .../elementary-xfce-icon-theme/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/data/icons/elementary-xfce-icon-theme/default.nix b/pkgs/data/icons/elementary-xfce-icon-theme/default.nix index 9ff54d5d64d..063de059ee5 100644 --- a/pkgs/data/icons/elementary-xfce-icon-theme/default.nix +++ b/pkgs/data/icons/elementary-xfce-icon-theme/default.nix @@ -11,24 +11,21 @@ stdenv.mkDerivation rec { sha256 = "15n28f2pw8b0y5pi8ydahg31v6hhh7zvpvymi8jaafdc9bn18z3y"; }; - # fallback icon theme - propagatedBuildInputs = [ hicolor_icon_theme ]; - - dontBuild = true; + nativeBuildInputs = [ gtk3 hicolor_icon_theme ]; installPhase = '' - install -dm 755 $out/share/icons - cp -dr --no-preserve='ownership' elementary-xfce{,-dark,-darker,-darkest} $out/share/icons/ + mkdir -p $out/share/icons + mv elementary-xfce* $out/share/icons ''; - postInstall = '' - for icons in "$out"/share/icons/*; do - "${gtk3.out}/bin/gtk-update-icon-cache" "$icons" + postFixup = '' + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme done ''; meta = with stdenv.lib; { - description = "Elementary icons for Xfce and other Gtk+ desktops like Gnome3"; + description = "Elementary icons for Xfce and other GTK+ desktops like GNOME"; homepage = https://github.com/shimmerproject/elementary-xfce; license = licenses.gpl2; platforms = platforms.unix; From ede5f2cbfa8e0d341e29a457044a2871f1ad3395 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:11:30 +0000 Subject: [PATCH 04/11] faba-icon-theme: build GTK icon cache --- pkgs/data/icons/faba-icon-theme/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/icons/faba-icon-theme/default.nix b/pkgs/data/icons/faba-icon-theme/default.nix index 37f46060ae3..fdad4f0f46d 100644 --- a/pkgs/data/icons/faba-icon-theme/default.nix +++ b/pkgs/data/icons/faba-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, elementary-icon-theme }: +{ stdenv, fetchFromGitHub, autoreconfHook, elementary-icon-theme, gtk3 }: stdenv.mkDerivation rec { name = "${package-name}-${version}"; @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { sha256 = "0hif030pd4w3s851k0s65w0mf2pik10ha25ycpsv91gpbgarqcns"; }; - nativeBuildInputs = [ autoreconfHook ]; - - buildInputs = [ elementary-icon-theme ]; + nativeBuildInputs = [ autoreconfHook elementary-icon-theme gtk3 ]; postPatch = '' substituteInPlace Makefile.am --replace '$(DESTDIR)'/usr $out ''; + postFixup = "gtk-update-icon-cache $out/share/icons/Faba"; + meta = with stdenv.lib; { description = "A sexy and modern icon theme with Tango influences"; homepage = https://snwh.org/moka; From c087641f64a7a4f0afbd91a9d2b91448914df41d Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:12:20 +0000 Subject: [PATCH 05/11] faba-mono-icons: build GTK icon cache --- pkgs/data/icons/faba-mono-icons/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/data/icons/faba-mono-icons/default.nix b/pkgs/data/icons/faba-mono-icons/default.nix index 3a871e86d9d..bdb6f651e6a 100644 --- a/pkgs/data/icons/faba-mono-icons/default.nix +++ b/pkgs/data/icons/faba-mono-icons/default.nix @@ -1,25 +1,29 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, moka-icon-theme }: +{ stdenv, fetchFromGitHub, autoreconfHook, gtk3, moka-icon-theme }: stdenv.mkDerivation rec { - name = "${package-name}-${version}"; - package-name = "faba-mono-icons"; + name = "${pname}-${version}"; + pname = "faba-mono-icons"; version = "2016-04-30"; src = fetchFromGitHub { owner = "snwh"; - repo = package-name; + repo = pname; rev = "2006c5281eb988c799068734f289a85443800cda"; sha256 = "0nisfl92y6hrbakp9qxi0ygayl6avkzrhwirg6854bwqjy2dvjv9"; }; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ autoreconfHook gtk3 moka-icon-theme ]; - buildInputs = [ moka-icon-theme ]; + postFixup = '' + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme + done + ''; meta = with stdenv.lib; { description = "The full set of Faba monochrome panel icons"; homepage = https://snwh.org/moka; - license = with licenses; [ gpl3 ]; + license = licenses.gpl3; platforms = platforms.all; maintainers = with maintainers; [ romildo ]; }; From cc3bd7654017405d2a1e911ab2c104c421f3786b Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:12:37 +0000 Subject: [PATCH 06/11] moka-icon-theme: build GTK icon cache --- pkgs/data/icons/moka-icon-theme/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/data/icons/moka-icon-theme/default.nix b/pkgs/data/icons/moka-icon-theme/default.nix index 5ac2a13be4d..f3180db54dc 100644 --- a/pkgs/data/icons/moka-icon-theme/default.nix +++ b/pkgs/data/icons/moka-icon-theme/default.nix @@ -1,25 +1,25 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, faba-icon-theme }: +{ stdenv, fetchFromGitHub, autoreconfHook, faba-icon-theme, gtk3 }: stdenv.mkDerivation rec { - name = "${package-name}-${version}"; - package-name = "moka-icon-theme"; + name = "${pname}-${version}"; + pname = "moka-icon-theme"; version = "5.3.6"; src = fetchFromGitHub { owner = "snwh"; - repo = package-name; + repo = pname; rev = "v${version}"; sha256 = "17f8k8z8xvib4hkxq0cw9j7bhdpqpv5frrkyc4sbyildcbavzzbr"; }; - nativeBuildInputs = [ autoreconfHook ]; - - buildInputs = [ faba-icon-theme ]; + nativeBuildInputs = [ autoreconfHook faba-icon-theme gtk3 ]; postPatch = '' substituteInPlace Makefile.am --replace '$(DESTDIR)'/usr $out ''; + postFixup = "gtk-update-icon-cache $out/share/icons/Moka"; + meta = with stdenv.lib; { description = "An icon theme designed with a minimal flat style using simple geometry and bright colours"; homepage = https://snwh.org/moka; From 4593cc2317bf77d0af22cef0fbc410b0a66846a7 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:14:00 +0000 Subject: [PATCH 07/11] hicolor_icon_theme: platforms.unix --- pkgs/data/icons/hicolor-icon-theme/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/icons/hicolor-icon-theme/default.nix b/pkgs/data/icons/hicolor-icon-theme/default.nix index e5a3faf7742..9cc14c7bc94 100644 --- a/pkgs/data/icons/hicolor-icon-theme/default.nix +++ b/pkgs/data/icons/hicolor-icon-theme/default.nix @@ -10,9 +10,9 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - meta = { + meta = with stdenv.lib; { description = "Default fallback theme used by implementations of the icon theme specification"; homepage = https://icon-theme.freedesktop.org/releases/; - platforms = with stdenv.lib.platforms; linux ++ darwin; + platforms = platforms.unix; }; } From 0765f0528d2e416bab4504f7e7cc7c250eec6452 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:27:41 +0000 Subject: [PATCH 08/11] maia-icon-theme: use CMake (build from source) Did not add GTK icon cache due to the following error: gtk-update-icon-cache: The generated cache was invalid. --- pkgs/data/icons/maia-icon-theme/default.nix | 22 ++++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pkgs/data/icons/maia-icon-theme/default.nix b/pkgs/data/icons/maia-icon-theme/default.nix index f4f81f8de8b..82aafca11f4 100644 --- a/pkgs/data/icons/maia-icon-theme/default.nix +++ b/pkgs/data/icons/maia-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, cmake, extra-cmake-modules, gtk3, kdeFrameworks }: stdenv.mkDerivation rec { name = "maia-icon-theme-${version}"; @@ -11,21 +11,19 @@ stdenv.mkDerivation rec { sha256 = "0f9l3k9abgg8islzddrxgbxaw6vbai5bvz5qi1v2fzir7ykx7bgj"; }; - dontBuild = true; - - installPhase = '' - install -dm 755 $out/share/icons - for f in "" "-dark"; do - rm icons$f/CMakeLists.txt - cp -dr --no-preserve='ownership' icons$f $out/share/icons/maia$f - done - ''; + nativeBuildInputs = [ + cmake + extra-cmake-modules + gtk3 + kdeFrameworks.plasma-framework + kdeFrameworks.kwindowsystem + ]; meta = with stdenv.lib; { description = "Icons based on Breeze and Super Flat Remix"; homepage = https://github.com/manjaro/artwork-maia; - license = licenses.free; - maintainers = [ maintainers.mounium ]; + license = licenses.free; # https://github.com/manjaro/artwork-maia/issues/27 + maintainers = with maintainers; [ mounium ]; platforms = platforms.all; }; } From 466d051924ea9ffe4861ac48baa31e17b66428fa Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:31:11 +0000 Subject: [PATCH 09/11] numix-icon-theme: build GTK icon cache --- pkgs/data/icons/numix-icon-theme/default.nix | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/data/icons/numix-icon-theme/default.nix b/pkgs/data/icons/numix-icon-theme/default.nix index 08fd012bb41..205ebaa5c66 100644 --- a/pkgs/data/icons/numix-icon-theme/default.nix +++ b/pkgs/data/icons/numix-icon-theme/default.nix @@ -1,26 +1,28 @@ -{ stdenv, fetchFromGitHub, hicolor_icon_theme }: +{ stdenv, fetchFromGitHub, gtk3, hicolor_icon_theme }: stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "numix-icon-theme"; version = "17-12-25"; - package-name = "numix-icon-theme"; - - name = "${package-name}-${version}"; - src = fetchFromGitHub { owner = "numixproject"; - repo = package-name; + repo = pname; rev = version; sha256 = "0q3hpq2jc9iwnzzqpb12g1qzjsw4ckhdqkfqf6nirl87r5drkv6j"; }; - buildInputs = [ hicolor_icon_theme ]; - - dontBuild = true; + nativeBuildInputs = [ gtk3 hicolor_icon_theme ]; installPhase = '' - install -dm 755 $out/share/icons - cp -dr --no-preserve='ownership' Numix{,-Light} $out/share/icons/ + mkdir -p $out/share/icons + mv Numix{,-Light} $out/share/icons + ''; + + postFixup = '' + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme + done ''; meta = with stdenv.lib; { From 09b54dec1d678dc8a75cbc078377abf9c420494f Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:42:09 +0000 Subject: [PATCH 10/11] paper-icon-theme: build GTK icon cache --- pkgs/data/icons/paper-icon-theme/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/data/icons/paper-icon-theme/default.nix b/pkgs/data/icons/paper-icon-theme/default.nix index f161d6fbbd6..f49009e76f3 100644 --- a/pkgs/data/icons/paper-icon-theme/default.nix +++ b/pkgs/data/icons/paper-icon-theme/default.nix @@ -1,18 +1,24 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: +{ stdenv, fetchFromGitHub, autoreconfHook, gtk3 }: stdenv.mkDerivation rec { - name = "${package-name}-${version}"; - package-name = "paper-icon-theme"; + name = "${pname}-${version}"; + pname = "paper-icon-theme"; version = "2017-11-20"; src = fetchFromGitHub { owner = "snwh"; - repo = package-name; + repo = pname; rev = "af0296ecc872ad723fad7dca6e7e89eb85cbb3a8"; sha256 = "18a9zl9lbw9gc3zas49w329xrps4slvkp4nv815nlnmimz8dj85m"; }; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ autoreconfHook gtk3 ]; + + postFixup = '' + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme + done + ''; meta = with stdenv.lib; { description = "Modern icon theme designed around bold colours and simple geometric shapes"; From cd4afaca45e8f6451fc94f0b973d7c4a0cd49d92 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:49:40 +0000 Subject: [PATCH 11/11] papirus-icon-theme: build GTK icon cache --- .../data/icons/papirus-icon-theme/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/data/icons/papirus-icon-theme/default.nix b/pkgs/data/icons/papirus-icon-theme/default.nix index ef817a2e3f4..ec3c671e2fd 100644 --- a/pkgs/data/icons/papirus-icon-theme/default.nix +++ b/pkgs/data/icons/papirus-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, gtk3 }: stdenv.mkDerivation rec { name = "papirus-icon-theme-${version}"; @@ -7,20 +7,25 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "PapirusDevelopmentTeam"; repo = "papirus-icon-theme"; - rev = "${version}"; + rev = version; sha256 = "10q7ppizzqi8c564jydqivia43gp4j1z984igfyym2mdwdw71mzq"; }; - dontBuild = true; + nativeBuildInputs = [ gtk3 ]; installPhase = '' - install -dm 755 $out/share/icons - cp -dr Papirus{,-Dark,-Light} $out/share/icons/ - cp -dr ePapirus $out/share/icons/ + mkdir -p $out/share/icons + mv {,e}Papirus* $out/share/icons + ''; + + postFixup = '' + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme + done ''; meta = with stdenv.lib; { - description = "Papirus icon theme for Linux"; + description = "Papirus icon theme"; homepage = https://github.com/PapirusDevelopmentTeam/papirus-icon-theme; license = licenses.lgpl3; platforms = platforms.all;