about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix')
-rw-r--r--nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix28
1 files changed, 20 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix b/nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix
index 0d3f273d5bb2..22b66b1c65dc 100644
--- a/nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix
+++ b/nixpkgs/pkgs/data/icons/vanilla-dmz/default.nix
@@ -25,18 +25,30 @@ stdenvNoCC.mkDerivation rec {
   dontDropIconThemeCache = true;
 
   buildPhase = ''
-    cd DMZ-White/pngs; ./make.sh; cd -
-    cd DMZ-Black/pngs; ./make.sh; cd -
+    runHook preBuild
+
+    for theme in DMZ-{White,Black}; do
+      pushd $theme/pngs
+      ./make.sh
+      popd
+    done
+
+    runHook postBuild
   '';
 
   installPhase = ''
-    install -d $out/share/icons/Vanilla-DMZ/cursors
-    cp -a DMZ-White/xcursors/* $out/share/icons/Vanilla-DMZ/cursors
-    install -Dm644 DMZ-White/index.theme $out/share/icons/Vanilla-DMZ/index.theme
+    runHook preInstall
+
+    for theme in DMZ-{White,Black}; do
+      mkdir -p $out/share/icons/$theme/cursors
+      cp -a $theme/xcursors/* $out/share/icons/$theme/cursors/
+      install -m644 $theme/index.theme $out/share/icons/$theme/index.theme
+    done
+
+    ln -s $out/share/icons/{DMZ-White,Vanilla-DMZ}
+    ln -s $out/share/icons/{DMZ-Black,Vanilla-DMZ-AA}
 
-    install -d $out/share/icons/Vanilla-DMZ-AA/cursors
-    cp -a DMZ-Black/xcursors/* $out/share/icons/Vanilla-DMZ-AA/cursors
-    install -Dm644 DMZ-Black/index.theme $out/share/icons/Vanilla-DMZ-AA/index.theme
+    runHook postInstall
   '';
 
   meta = with lib; {