1{
2 lib,
3 stdenv,
4 fetchurl,
5 love,
6 makeWrapper,
7 makeDesktopItem,
8 copyDesktopItems,
9}:
10
11let
12 pname = "90secondportraits";
13
14 icon = fetchurl {
15 url = "http://tangramgames.dk/img/thumb/90secondportraits.png";
16 sha256 = "13k6cq8s7jw77j81xfa5ri41445m778q6iqbfplhwdpja03c6faw";
17 };
18
19 desktopItems = [
20 (makeDesktopItem {
21 name = "90secondportraits";
22 exec = pname;
23 icon = icon;
24 comment = "A silly speed painting game";
25 desktopName = "90 Second Portraits";
26 genericName = "90secondportraits";
27 categories = [ "Game" ];
28 })
29 ];
30
31in
32stdenv.mkDerivation rec {
33 inherit pname desktopItems;
34 version = "1.01b";
35
36 src = fetchurl {
37 url = "https://github.com/SimonLarsen/90-Second-Portraits/releases/download/${version}/${pname}-${version}.love";
38 sha256 = "0jj3k953r6vb02212gqcgqpb4ima87gnqgls43jmylxq2mcm33h5";
39 };
40
41 nativeBuildInputs = [
42 makeWrapper
43 copyDesktopItems
44 ];
45
46 dontUnpack = true;
47
48 installPhase = ''
49 runHook preInstall
50 install -Dm444 $src $out/share/games/lovegames/${pname}.love
51 makeWrapper ${love}/bin/love $out/bin/${pname} \
52 --add-flags $out/share/games/lovegames/${pname}.love
53 runHook postInstall
54 '';
55
56 meta = with lib; {
57 description = "Silly speed painting game";
58 mainProgram = "90secondportraits";
59 maintainers = with maintainers; [ leenaars ];
60 platforms = platforms.linux;
61 license = with licenses; [
62 zlib
63 cc-by-sa-40
64 cc-by-sa-30 # vendored
65 x11
66 mit
67 ];
68 downloadPage = "http://tangramgames.dk/games/90secondportraits";
69 };
70
71}