pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / 90secondportraits / default.nix
blobc8db41d791d6f1e9bf0cb3e7cbbf36bad9b67314
1 { lib, stdenv, fetchurl, love, makeWrapper, makeDesktopItem, copyDesktopItems }:
3 let
4   pname = "90secondportraits";
6   icon = fetchurl {
7     url = "http://tangramgames.dk/img/thumb/90secondportraits.png";
8     sha256 = "13k6cq8s7jw77j81xfa5ri41445m778q6iqbfplhwdpja03c6faw";
9   };
11   desktopItems = [
12     (makeDesktopItem {
13       name = "90secondportraits";
14       exec = pname;
15       icon = icon;
16       comment = "A silly speed painting game";
17       desktopName = "90 Second Portraits";
18       genericName = "90secondportraits";
19       categories = [ "Game" ];
20     })
21   ];
23 in stdenv.mkDerivation rec {
24   inherit pname desktopItems;
25   version = "1.01b";
27   src = fetchurl {
28     url = "https://github.com/SimonLarsen/90-Second-Portraits/releases/download/${version}/${pname}-${version}.love";
29     sha256 = "0jj3k953r6vb02212gqcgqpb4ima87gnqgls43jmylxq2mcm33h5";
30   };
32   nativeBuildInputs = [ makeWrapper copyDesktopItems ];
34   dontUnpack = true;
36   installPhase = ''
37     runHook preInstall
38     install -Dm444 $src $out/share/games/lovegames/${pname}.love
39     makeWrapper ${love}/bin/love $out/bin/${pname} \
40       --add-flags $out/share/games/lovegames/${pname}.love
41     runHook postInstall
42   '';
44   meta = with lib; {
45     description = "Silly speed painting game";
46     mainProgram = "90secondportraits";
47     maintainers = with maintainers; [ leenaars ];
48     platforms = platforms.linux;
49     license = with licenses; [ zlib cc-by-sa-40 cc-by-sa-30 /* vendored */ x11 mit ];
50     downloadPage = "http://tangramgames.dk/games/90secondportraits";
51   };