mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
cataclysmDDA: launch the wrapped program
This commit is contained in:
parent
d472eed4b5
commit
bbe7b86eea
@ -28,5 +28,20 @@ else symlinkJoin {
|
||||
wrapProgram $out/bin/cataclysm-tiles \
|
||||
--add-flags "--datadir $out/share/cataclysm-dda/"
|
||||
fi
|
||||
|
||||
# Launch the wrapped program
|
||||
replaceProgram() {
|
||||
cp "$1" "''${1}.bk"
|
||||
unlink "$1"
|
||||
mv "''${1}.bk" "$1"
|
||||
sed -i "$1" -e "s,/nix/store/.\+\(/bin/cataclysm-tiles\),$out\1,"
|
||||
}
|
||||
for script in "$out/share/applications/cataclysm-dda.desktop" \
|
||||
"$out/Applications/Cataclysm.app/Contents/MacOS/Cataclysm.sh"
|
||||
do
|
||||
if [ -e "$script" ]; then
|
||||
replaceProgram "$script"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user