You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
970 B
Nix

{ stdenv, pkgs, dosbox, unzip, ... }:
let
fetchfile = (import ../../lib/fetchfile.nix) { inherit stdenv pkgs; };
in
stdenv.mkDerivation {
name = "epic-pinball";
src = fetchfile {
path = ../../../nixrc-src-games/epic_pinball_the_complete_collection_en_1_0_16760.sh;
storeHash = "64545yf8d203lgk5jv5bqbnyh7xpblmb";
};
phases = "unpackPhase installPhase";
unpackCmd = "${unzip}/bin/unzip -qq $src || true";
sourceRoot = "data";
installPhase = ''
mkdir -p $out
mv noarch/*.conf $out/
mv noarch/data $out/data
mkdir -p $out/bin
cat <<EOF > $out/bin/epic-pinball
#!${stdenv.shell}
${dosbox}/bin/dosbox -conf "$out/dosbox_epin.conf" -conf "$out/dosbox_epin_single.conf" -conf "$out/sven.conf" -no-console -c exit
EOF
cat <<EOF > $out/sven.conf
[sdl]
fullscreen=false
output=openglnb
EOF
chmod +x $out/bin/epic-pinball
'';
}