2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchzip
|
|
|
|
, johnny-reborn-engine
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
let
|
|
|
|
sounds = fetchFromGitHub {
|
|
|
|
owner = "nivs1978";
|
|
|
|
repo = "Johnny-Castaway-Open-Source";
|
|
|
|
rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558";
|
|
|
|
hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY=";
|
|
|
|
};
|
|
|
|
|
|
|
|
resources = fetchzip {
|
|
|
|
name = "scrantic-source";
|
|
|
|
url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip";
|
|
|
|
hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4=";
|
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
pname = "johnny-reborn";
|
|
|
|
inherit (johnny-reborn-engine) version;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
srcs = [ sounds resources ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = sounds.name;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
mkdir -p $out/share/jc_reborn/data
|
|
|
|
cp -t $out/share/jc_reborn/data/ \
|
2023-07-15 17:15:38 +00:00
|
|
|
../scrantic-source/RESOURCE.* \
|
|
|
|
JCOS/Resources/sound*.wav
|
|
|
|
|
|
|
|
makeWrapper \
|
2024-02-29 20:09:43 +00:00
|
|
|
${johnny-reborn-engine}/bin/jc_reborn \
|
|
|
|
$out/bin/jc_reborn \
|
|
|
|
--chdir $out/share/jc_reborn
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An open-source engine for the classic \"Johnny Castaway\" screensaver (ready to use, with resources)";
|
|
|
|
license = lib.licenses.unfree;
|
|
|
|
maintainers = with lib.maintainers; [ pedrohlc ];
|
2024-02-29 20:09:43 +00:00
|
|
|
inherit (johnny-reborn-engine.meta) homepage platforms mainProgram;
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|