From 3b7edb3eed3f4e38a3890bcae352bd02e988d03b Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Thu, 6 Jun 2024 13:07:21 -0700 Subject: [PATCH] dwarf-fortress: run postUnpack on darwin --- pkgs/games/dwarf-fortress/game.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/games/dwarf-fortress/game.nix b/pkgs/games/dwarf-fortress/game.nix index 121091c5f216..80d3056aae95 100644 --- a/pkgs/games/dwarf-fortress/game.nix +++ b/pkgs/games/dwarf-fortress/game.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation { sourceRoot = "."; - postUnpack = optionalString stdenv.isLinux '' + postUnpack = '' directory=${ if stdenv.isLinux then "df_linux" else if stdenv.isDarwin then "df_osx" @@ -108,6 +108,9 @@ stdenv.mkDerivation { mkdir -p $out cp -r * $out + # Clean up OS X detritus in the tarball. + find $out -type f -name '._*' -exec rm -rf {} \; + # Lots of files are +x in the newer releases... find $out -type d -exec chmod 0755 {} \; find $out -type f -exec chmod 0644 {} \; @@ -116,7 +119,7 @@ stdenv.mkDerivation { [ -f $out/run_df ] && chmod +x $out/run_df # We don't need any of these since they will just break autoPatchelf on $out/hash.md5.orig