forked from captain-amygdala/pistorm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpistorm.nix
35 lines (31 loc) · 1.07 KB
/
pistorm.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, libraspberrypi, alsaLib, openocd, makeWrapper }:
stdenv.mkDerivation {
name = "pistorm";
src = ./.;
enableParallelBuilding = false;
buildInputs = [ libraspberrypi alsaLib makeWrapper ];
installPhase = ''
find | grep --color buptest
pwd
ls -ltrh
mkdir -pv $out/bin $out/share/pistorm
cp -vi emulator buptest $out/bin/
cp -vr rtl $out/share/pistorm
cp -vr nprog $out/share/pistorm
cp -v *.cfg $out/share/pistorm
cp -vr data $out/share/pistorm
mkdir -pv $out/share/pistorm/platforms/amiga/piscsi
cp -v platforms/amiga/piscsi/piscsi.rom $out/share/pistorm/platforms/amiga/piscsi/
cp -v platforms/amiga/pistorm.hdf $out/share/pistorm/platforms/amiga/
mkdir -pv $out/share/pistorm/platforms/amiga/rtg
cp -v platforms/amiga/rtg/*.shader $out/share/pistorm/platforms/amiga/rtg/
cat <<EOF > $out/bin/pistorm
#!${stdenv.shell}
cd $out/share/pistorm
$out/bin/emulator "\''${@}"
EOF
chmod +x $out/bin/pistorm
cp -v *.sh $out/bin/
#wrapProgram $out/bin/nprog.sh --prefix PATH : {openocd}/bin
'';
}