Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / jumpnbump / default.nix
blob193d4dc0b585f612694747b202b9e3a657ac5880
1 { lib, stdenv
2 , fetchFromGitLab
3 , fetchzip
4 , SDL2, SDL2_mixer, SDL2_net
5 , gtk3, gobject-introspection
6 , python3Packages
7 , wrapGAppsHook
8 }:
10 let data = fetchzip {
11   url = "https://mirandir.pagesperso-orange.fr/files/additional-levels.tar.xz";
12   sha256 = "167hisscsbldrwrs54gq6446shl8h26qdqigmfg0lq3daynqycg2";
13 }; in
15 stdenv.mkDerivation rec {
16   pname = "jumpnbump";
17   version = "1.70-dev";
19   # By targeting the development version, we can omit the patches Arch uses
20   src = fetchFromGitLab {
21     domain = "gitlab.com";
22     owner = "LibreGames";
23     repo = pname;
24     rev = "5744738211ca691444f779aafee3537fb3562516";
25     sha256 = "0f1k26jicmb95bx19wgcdpwsbbl343i7mqqqc2z9lkb8drlsyqcy";
26   };
28   makeFlags = [ "PREFIX=$(out)" ];
30   nativeBuildInputs = [ python3Packages.wrapPython wrapGAppsHook gobject-introspection ];
31   buildInputs = [ SDL2 SDL2_mixer SDL2_net gtk3 ];
33   postInstall = ''
34     make -C menu PREFIX=$out all install
35     cp -r ${data}/* $out/share/jumpnbump/
36     rm $out/share/applications/jumpnbump-menu.desktop
37     sed -ie 's+Exec=jumpnbump+Exec=jumpnbump-menu+' $out/share/applications/jumpnbump.desktop
38   '';
40   pythonPath = with python3Packages; [ pygobject3 pillow ];
41   preFixup = ''
42     buildPythonPath "$out $pythonPath"
43   '';
44   postFixup = ''
45     wrapPythonPrograms
46   '';
48   meta = with lib; {
49     description = "cute, true multiplayer platform game with bunnies";
50     homepage    = "https://libregames.gitlab.io/jumpnbump/";
51     license     = licenses.gpl2Plus;
52     maintainers = with maintainers; [ iblech ];
53     platforms   = platforms.unix;
54   };