dwarf-fortress: run postUnpack on darwin

This commit is contained in:
Morgan Jones 2024-06-06 13:07:21 -07:00
parent 880bea37bd
commit 3b7edb3eed
No known key found for this signature in database
GPG Key ID: 52BAC54ED447974E

View File

@ -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 <version 50.
[ -d $out/libs ] && rm -f $out/libs/*.so $out/libs/*.so.*
[ -d $out/libs ] && rm -rf $out/libs/*.so $out/libs/*.so.* $out/libs/*.dylib $out/libs/*.framework
# Store the original hash
md5sum $exe | awk '{ print $1 }' > $out/hash.md5.orig