From cd4afaca45e8f6451fc94f0b973d7c4a0cd49d92 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sat, 24 Feb 2018 11:49:40 +0000 Subject: [PATCH] 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 ef817a2e3f47..ec3c671e2fd9 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;