mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 10:31:36 +00:00
f5f4bf1a25
Now builder.sh will install a higan-config.sh script to write auxiliary stuff on $HOME/.config/higan directory. That way, higan searches locally and runs cleanly. Obviously it's a hack, but the only other way is to do a huge patch on upstream sources; personally I think it is better to work that type of thing directly on higan sources.
36 lines
1.1 KiB
Bash
36 lines
1.1 KiB
Bash
|
|
source $stdenv/setup
|
|
|
|
unpackPhase
|
|
cd $sourceName
|
|
make phoenix=gtk profile=accuracy -C ananke
|
|
make phoenix=gtk profile=accuracy
|
|
|
|
install -dm 755 $out/share/applications $out/share/pixmaps $out/share/higan/Video\ Shaders $out/bin $out/lib
|
|
|
|
install -m 644 data/higan.desktop $out/share/applications/
|
|
install -m 644 data/higan.png $out/share/pixmaps/
|
|
cp -dr --no-preserve=ownership profile/* data/cheats.bml $out/share/higan/
|
|
cp -dr --no-preserve=ownership shaders/*.shader $out/share/higan/Video\ Shaders/
|
|
|
|
install -m 755 out/higan $out/bin/higan
|
|
install -m 644 ananke/libananke.so $out/lib/libananke.so.1
|
|
(cd $out/lib && ln -s libananke.so.1 libananke.so)
|
|
oldRPath=$(patchelf --print-rpath $out/bin/higan)
|
|
patchelf --set-rpath $oldRPath:$out/lib $out/bin/higan
|
|
|
|
# A dirty workaround, suggested by @cpages:
|
|
# we create a first-run script to populate
|
|
# the local $HOME with all the auxiliary
|
|
# stuff needed by higan at runtime
|
|
|
|
cat <<EOF > $out/bin/higan-config.sh
|
|
#!${shell}
|
|
|
|
cp --update --recursive $out/share/higan \$HOME/.config
|
|
chmod --recursive u+w \$HOME/.config/higan
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/higan-config.sh
|