depot/third_party/nixpkgs/pkgs/applications/misc/johnny-reborn/with-data.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

63 lines
1.4 KiB
Nix

{ lib
, stdenvNoCC
, fetchFromGitHub
, fetchzip
, johnny-reborn-engine
, makeWrapper
}:
stdenvNoCC.mkDerivation {
pname = "johnny-reborn";
inherit (johnny-reborn-engine) version;
srcs =
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
[
sounds
resources
];
nativeBuildInputs = [ makeWrapper ];
sourceRoot = "source";
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -t $out/ \
../scrantic-source/RESOURCE.* \
JCOS/Resources/sound*.wav
makeWrapper \
${johnny-reborn-engine}/jc_reborn \
$out/jc_reborn \
--chdir $out
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 ];
inherit (johnny-reborn-engine.meta) homepage platforms;
};
}