eigenmath: 3.33-unstable-2024-11-22 -> 3.35-unstable-2024-12-11 (#364381)
[NixPkgs.git] / pkgs / applications / misc / johnny-reborn / with-data.nix
bloba316dae27f860d7a42e0adfcd737c74bbe1ae895
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   fetchzip,
6   johnny-reborn-engine,
7   makeWrapper,
8 }:
10 let
11   sounds = fetchFromGitHub {
12     owner = "nivs1978";
13     repo = "Johnny-Castaway-Open-Source";
14     rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558";
15     hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY=";
16   };
18   resources = fetchzip {
19     name = "scrantic-source";
20     url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip";
21     hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4=";
22     stripRoot = false;
23   };
26 stdenvNoCC.mkDerivation {
27   pname = "johnny-reborn";
28   inherit (johnny-reborn-engine) version;
30   srcs = [
31     sounds
32     resources
33   ];
35   nativeBuildInputs = [ makeWrapper ];
37   sourceRoot = sounds.name;
39   dontConfigure = true;
40   dontBuild = true;
42   installPhase = ''
43     runHook preInstall
45     mkdir -p $out/share/jc_reborn/data
46     cp -t $out/share/jc_reborn/data/ \
47       ../scrantic-source/RESOURCE.* \
48       JCOS/Resources/sound*.wav
50     makeWrapper \
51       ${johnny-reborn-engine}/bin/jc_reborn \
52       $out/bin/jc_reborn \
53       --chdir $out/share/jc_reborn
55     runHook postInstall
56   '';
58   meta = {
59     description = "Open-source engine for the classic \"Johnny Castaway\" screensaver (ready to use, with resources)";
60     license = lib.licenses.unfree;
61     maintainers = with lib.maintainers; [ pedrohlc ];
62     inherit (johnny-reborn-engine.meta) homepage platforms mainProgram;
63   };