mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
SpaceCadetPinball: init
This commit is contained in:
parent
325d14280d
commit
af27180da4
3 changed files with 104 additions and 0 deletions
45
pkgs/SpaceCadetPinball/cab_list.nix
Normal file
45
pkgs/SpaceCadetPinball/cab_list.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
[
|
||||||
|
"PINBALL.DAT"
|
||||||
|
"PINBALL.MID"
|
||||||
|
"SOUND1.WAV"
|
||||||
|
"SOUND3.WAV"
|
||||||
|
"SOUND4.WAV"
|
||||||
|
"SOUND5.WAV"
|
||||||
|
"SOUND7.WAV"
|
||||||
|
"SOUND8.WAV"
|
||||||
|
"SOUND9.WAV"
|
||||||
|
"SOUND12.WAV"
|
||||||
|
"SOUND14.WAV"
|
||||||
|
"SOUND16.WAV"
|
||||||
|
"SOUND17.WAV"
|
||||||
|
"SOUND18.WAV"
|
||||||
|
"SOUND19.WAV"
|
||||||
|
"SOUND20.WAV"
|
||||||
|
"SOUND21.WAV"
|
||||||
|
"SOUND22.WAV"
|
||||||
|
"SOUND24.WAV"
|
||||||
|
"SOUND25.WAV"
|
||||||
|
"SOUND26.WAV"
|
||||||
|
"SOUND27.WAV"
|
||||||
|
"SOUND28.WAV"
|
||||||
|
"SOUND29.WAV"
|
||||||
|
"SOUND30.WAV"
|
||||||
|
"SOUND34.WAV"
|
||||||
|
"SOUND35.WAV"
|
||||||
|
"SOUND36.WAV"
|
||||||
|
"SOUND38.WAV"
|
||||||
|
"SOUND39.WAV"
|
||||||
|
"SOUND43.WAV"
|
||||||
|
"SOUND45.WAV"
|
||||||
|
"SOUND49.WAV"
|
||||||
|
"SOUND49D.WAV"
|
||||||
|
"SOUND50.WAV"
|
||||||
|
"SOUND54.WAV"
|
||||||
|
"SOUND55.WAV"
|
||||||
|
"SOUND57.WAV"
|
||||||
|
"SOUND104.WAV"
|
||||||
|
"SOUND105.WAV"
|
||||||
|
"SOUND108.WAV"
|
||||||
|
"SOUND111.WAV"
|
||||||
|
"SOUND131.WAV"
|
||||||
|
]
|
58
pkgs/SpaceCadetPinball/default.nix
Normal file
58
pkgs/SpaceCadetPinball/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, SDL2
|
||||||
|
, SDL2_mixer
|
||||||
|
, p7zip
|
||||||
|
, requireFile
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
|
||||||
|
extractCab = file:
|
||||||
|
let
|
||||||
|
cab = lib.substring 0 ((lib.stringLength file) - 1) file;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
${p7zip}/bin/7z x I386/${cab}_
|
||||||
|
cp ${lib.toLower file} $out/${file}
|
||||||
|
'';
|
||||||
|
|
||||||
|
spacecadet_files = stdenv.mkDerivation {
|
||||||
|
name = "spacecadet_files";
|
||||||
|
src = requireFile rec {
|
||||||
|
name = "en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso";
|
||||||
|
sha256 = "62b6c91563bad6cd12a352aa018627c314cfc5162d8e9f8af0756a642e602a46";
|
||||||
|
message = ''
|
||||||
|
Windows iso required for SpaceCadetPinball.
|
||||||
|
nix-store --add-fixed sha256 ${name}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
dontBuild = true;
|
||||||
|
unpackPhase = "${p7zip}/bin/7z x $src";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
'' + (lib.concatMapStrings extractCab (import ./cab_list.nix));
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "SpaceCadetPinball";
|
||||||
|
version = "2021-10-25";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "k4zmu2a";
|
||||||
|
repo = pname;
|
||||||
|
sha256 = "DJM+bh+JqCqCp4ub9CpuOiAeQ+DKiKVFUTcY09XEOZA=";
|
||||||
|
rev = "3ec96b84add67921a2a2ca552b0bbd400d14d70a";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake SDL2 SDL2_mixer ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/${pname} $out/bin
|
||||||
|
mv ../bin/SpaceCadetPinball $out/share/${pname}/
|
||||||
|
cp ${spacecadet_files}/* $out/share/${pname}/
|
||||||
|
ln -s $out/share/${pname}/SpaceCadetPinball $out/bin/SpaceCadetPinball
|
||||||
|
'';
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ let
|
||||||
{
|
{
|
||||||
commander-x16 = pkgs.callPackage ./commander-x16 { };
|
commander-x16 = pkgs.callPackage ./commander-x16 { };
|
||||||
gef = pkgs.callPackage ./gef { };
|
gef = pkgs.callPackage ./gef { };
|
||||||
|
SpaceCadetPinball = pkgs.callPackage ./SpaceCadetPinball { };
|
||||||
stretchy-spaces = pkgs.callPackage ./stretchy-spaces { };
|
stretchy-spaces = pkgs.callPackage ./stretchy-spaces { };
|
||||||
webshells = pkgs.callPackage ./webshells { };
|
webshells = pkgs.callPackage ./webshells { };
|
||||||
weevely = pkgs.callPackage ./weevely { };
|
weevely = pkgs.callPackage ./weevely { };
|
||||||
|
|
Loading…
Reference in a new issue