biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / johnny-reborn / with-data.nix
blob1e669658186f1c97ce9c39c9e3c381bd8fc011e3
1 { lib
2 , stdenvNoCC
3 , fetchFromGitHub
4 , fetchzip
5 , johnny-reborn-engine
6 , makeWrapper
7 }:
9 let
10   sounds = fetchFromGitHub {
11     owner = "nivs1978";
12     repo = "Johnny-Castaway-Open-Source";
13     rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558";
14     hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY=";
15   };
17   resources = fetchzip {
18     name = "scrantic-source";
19     url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip";
20     hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4=";
21     stripRoot = false;
22   };
25 stdenvNoCC.mkDerivation {
26   pname = "johnny-reborn";
27   inherit (johnny-reborn-engine) version;
29   srcs = [ sounds resources ];
31   nativeBuildInputs = [ makeWrapper ];
33   sourceRoot = sounds.name;
35   dontConfigure = true;
36   dontBuild = true;
38   installPhase = ''
39     runHook preInstall
41     mkdir -p $out/share/jc_reborn/data
42     cp -t $out/share/jc_reborn/data/ \
43       ../scrantic-source/RESOURCE.* \
44       JCOS/Resources/sound*.wav
46     makeWrapper \
47       ${johnny-reborn-engine}/bin/jc_reborn \
48       $out/bin/jc_reborn \
49       --chdir $out/share/jc_reborn
51     runHook postInstall
52   '';
54   meta = {
55     description = "Open-source engine for the classic \"Johnny Castaway\" screensaver (ready to use, with resources)";
56     license = lib.licenses.unfree;
57     maintainers = with lib.maintainers; [ pedrohlc ];
58     inherit (johnny-reborn-engine.meta) homepage platforms mainProgram;
59   };