biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / video / mapmap / default.nix
blob39904f8291593f8f2e6fbd7cf2a348c65a8ce422
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchpatch
4 , qttools
5 , qtmultimedia
6 , liblo
7 , gst_all_1
8 , qmake
9 , pkg-config
10 , wrapQtAppsHook
13 with stdenv;
15 mkDerivation rec {
17   version = "0.6.2";
18   pname = "mapmap";
20   src = fetchFromGitHub {
21     owner = "mapmapteam";
22     repo = "mapmap";
23     rev = version;
24     sha256 = "1pyb3vz19lbfz2hrfqm9a29vnajw1bigdrblbmcy32imkf4isfvm";
25   };
27   nativeBuildInputs = [
28     qmake
29     pkg-config
30     wrapQtAppsHook
31   ];
33   buildInputs = [
34     qttools
35     qtmultimedia
36     liblo
37     gst_all_1.gstreamer
38     gst_all_1.gstreamermm
39     gst_all_1.gst-libav
40     gst_all_1.gst-vaapi
41   ];
43   patches = [
44     (fetchpatch {
45       name = "message-handler-segfault.patch";
46       url = "https://github.com/mapmapteam/mapmap/pull/519/commits/22eeee59ba7de6de7b73ecec3b0ea93bdc7f04e8.patch";
47       sha256 = "0is905a4lf9vvl5b1n4ky6shrnbs5kz9mlwfk78hrl4zabfmcl5l";
48     })
49     # fix build with libsForQt515
50     (fetchpatch {
51       url = "https://github.com/mapmapteam/mapmap/pull/518/commits/ac49acc1e2ec839832b86838e93a8c13030affeb.patch";
52       sha256 = "sha256-tSLbyIDv5mSejnw9oru5KLAyQqjgJLLREKQomEUcGt8=";
53     })
54   ];
56   installPhase = ''
57     mkdir -p $out/bin
58     cp mapmap $out/bin/mapmap
59     mkdir -p $out/share/applications/
60     sed 's|Icon=/usr/share/icons/hicolor/scalable/apps/mapmap.svg|Icon=mapmap|g' resources/texts/mapmap.desktop > $out/share/applications/mapmap.desktop
61     mkdir -p $out/share/icons/hicolor/scalable/apps/
62     cp resources/images/logo/mapmap.* $out/share/icons/hicolor/scalable/apps/
63   '';
65   # RPATH in /tmp hack
66   # preFixup = ''
67   #   rm -r $NIX_BUILD_TOP/__nix_qt5__
68   # '';
70   meta = with lib; {
71     description = "Open source video mapping software";
72     homepage = "https://github.com/mapmapteam/mapmap";
73     license = licenses.gpl3;
74     maintainers = [ maintainers.erictapen ];
75     platforms = platforms.linux;
76     mainProgram = "mapmap";
77   };