1 { stdenv, lib, fetchurl, makeDesktopItem, unzip, writeText
2 , scummvm, runtimeShell }:
5 desktopItem = name: short: long: description: makeDesktopItem {
6 categories = [ "Game" "AdventureGame" ];
9 exec = "@out@/bin/${short}";
10 genericName = description;
15 run = name: short: code: writeText "${short}.sh" ''
18 exec ${scummvm}/bin/scummvm \
19 --path=@out@/share/${name} \
24 generic = { plong, pshort, pcode, description, version, files, docs ? [ "readme.txt" ], ... } @attrs:
26 attrs' = builtins.removeAttrs attrs [ "plong" "pshort" "pcode" "description" "docs" "files" "version" ];
27 pname = lib.replaceStrings [ " " ":" ] [ "-" "" ] (lib.toLower plong);
28 in stdenv.mkDerivation ({
29 name = "${pname}-${version}";
31 nativeBuildInputs = [ unzip ];
39 mkdir -p $out/bin $out/share/{applications,${pname},doc/${pname}}
41 ${lib.concatStringsSep "\n" (map (f: "mv ${f} $out/share/doc/${pname}") docs)}
42 ${lib.concatStringsSep "\n" (map (f: "mv ${f} $out/share/${pname}") files)}
44 substitute ${run pname pshort pcode} $out/bin/${pshort} \
46 substitute ${desktopItem pname pshort plong description}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop \
49 chmod 0755 $out/bin/${pshort}
55 homepage = "https://www.scummvm.org";
56 license = licenses.free; # refer to the readme for exact wording
57 maintainers = with maintainers; [ peterhoeg ];
59 inherit (scummvm.meta) platforms;
64 beneath-a-steel-sky = generic rec {
65 plong = "Beneath a Steel Sky";
68 description = "2D point-and-click science fiction thriller set in a bleak vision of the future";
71 url = "mirror://sourceforge/scummvm/${pshort}-cd-${version}.zip";
72 sha256 = "14s5jz67kavm8l15gfm5xb7pbpn8azrv460mlxzzvdpa02a9n82k";
77 broken-sword-25 = generic rec {
78 plong = "Broken Sword 2.5";
81 description = "A fan game of the Broken Sword series";
84 url = "mirror://sourceforge/scummvm/${pshort}-v${version}.zip";
85 sha256 = "0ivj1vflfpih5bs5a902mab88s4d77fwm3ya3fk7pammzc8gjqzz";
88 docs = [ "README" "license-original.txt" ];
89 files = [ "data.b25c" ];
92 drascula-the-vampire-strikes-back = generic rec {
93 plong = "Drascula: The Vampire Strikes Back";
96 description = "Spanish 2D classic point & click style adventure with tons of humor and an easy interface";
100 url = "mirror://sourceforge/scummvm/${pshort}-${version}.zip";
101 sha256 = "1pj29rpb754sn6a56f8brfv6f2m1p5qgaqik7d68pfi2bb5zccdp";
104 # url = "mirror://sourceforge/scummvm/${pshort}-audio-flac-2.0.zip";
105 # sha256 = "1zmqhrby8f5sj1qy6xjdgkvk9wyhr3nw8ljrrl58fmxb83x1rryw";
109 docs = [ "readme.txt" "drascula.doc" ];
110 files = [ "Packet.001" ];
113 dreamweb = generic rec {
117 description = "2D point-and-click cyberpunk top-down adventure game";
120 url = "mirror://sourceforge/scummvm/${pshort}-cd-uk-${version}.zip";
121 sha256 = "0hh1p3rd7s0ckvri14lc6wdry9vv0vn4h4744v2n4zg63j8i6vsa";
124 docs = [ "license.txt" ];
125 files = [ "DREAMWEB.*" "SPEECH" "track01.flac" ];
128 flight-of-the-amazon-queen = generic rec {
129 plong = "Flight of the Amazon Queen";
132 description = "2D point-and-click adventure game set in the 1940s";
135 url = "mirror://sourceforge/scummvm/FOTAQ_Talkie-${version}.zip";
136 sha256 = "1a6q71q1dl9vvw2qqsxk5h1sv0gaqy6236zr5905w2is01gdsp52";
142 lure-of-the-temptress = generic rec {
143 plong = "Lure of the Temptress";
146 description = "2D point-and-click adventure game with a fantasy theme";
149 url = "mirror://sourceforge/scummvm/lure-${version}.zip";
150 sha256 = "0201i70qcs1m797kvxjx3ygkhg6kcl5yf49sihba2ga8l52q45zk";
152 docs = [ "README" "*.txt" "*.pdf" "*.PDF" ];