nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 fetchzip,
6 johnny-reborn-engine,
7 makeWrapper,
8}:
9
10let
11 sounds = fetchFromGitHub {
12 owner = "nivs1978";
13 repo = "Johnny-Castaway-Open-Source";
14 rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558";
15 hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY=";
16 };
17
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 };
24in
25
26stdenvNoCC.mkDerivation {
27 pname = "johnny-reborn";
28 inherit (johnny-reborn-engine) version;
29
30 srcs = [
31 sounds
32 resources
33 ];
34
35 nativeBuildInputs = [ makeWrapper ];
36
37 sourceRoot = sounds.name;
38
39 dontConfigure = true;
40 dontBuild = true;
41
42 installPhase = ''
43 runHook preInstall
44
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
49
50 makeWrapper \
51 ${johnny-reborn-engine}/bin/jc_reborn \
52 $out/bin/jc_reborn \
53 --chdir $out/share/jc_reborn
54
55 runHook postInstall
56 '';
57
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 };
64}