From 32e770bf0f0ed41702d020a2a58bb0634cb09b8a Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 7 Feb 2025 09:47:21 +0000 Subject: [PATCH] rocksndiamonds: fix the build (dangling symlink) Without the change `rocksndiamonds` fails on `master` as: ERROR: noBrokenSymlinks: the symlink /nix/store/567ydn8k4wv1abma2g9ghzrfqs05i5wl-rocksndiamonds-4.4.0.2/share/icons/hicolor/32x32/apps/rocksndiamonds.png points to a missing target /nix/store/567ydn8k4wv1abma2g9ghzrfqs05i5wl-rocksndiamonds-4.4.0.2/share/rocksndiamonds/graphics/gfx_classic/RocksIcon32x32.png ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks --- pkgs/by-name/ro/rocksndiamonds/package.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ro/rocksndiamonds/package.nix b/pkgs/by-name/ro/rocksndiamonds/package.nix index ac232630776c..572c4fa7d513 100644 --- a/pkgs/by-name/ro/rocksndiamonds/package.nix +++ b/pkgs/by-name/ro/rocksndiamonds/package.nix @@ -46,13 +46,17 @@ stdenv.mkDerivation rec { ''; installPhase = '' + runHook preInstall + appDir=$out/share/applications iconDir=$out/share/icons/hicolor/32x32/apps mkdir -p $out/bin $appDir $iconDir $dataDir cp rocksndiamonds $out/bin/ ln -s ${desktopItem}/share/applications/* $appDir/ - ln -s $dataDir/graphics/gfx_classic/RocksIcon32x32.png $iconDir/rocksndiamonds.png + ln -s $dataDir/graphics/gfx_classic/icons/icon.png $iconDir/rocksndiamonds.png cp -r conf docs graphics levels music sounds $dataDir + + runHook postInstall ''; enableParallelBuilding = true;