Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, fetchFromGitHub 3, fetchpatch 4, qttools 5, qtmultimedia 6, liblo 7, gst_all_1 8, qmake 9, pkg-config 10, wrapQtAppsHook 11}: 12 13with stdenv; 14 15mkDerivation rec { 16 17 version = "0.6.2"; 18 pname = "mapmap"; 19 20 src = fetchFromGitHub { 21 owner = "mapmapteam"; 22 repo = "mapmap"; 23 rev = version; 24 sha256 = "1pyb3vz19lbfz2hrfqm9a29vnajw1bigdrblbmcy32imkf4isfvm"; 25 }; 26 27 nativeBuildInputs = [ 28 qmake 29 pkg-config 30 wrapQtAppsHook 31 ]; 32 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 ]; 42 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 ]; 55 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 ''; 64 65 # RPATH in /tmp hack 66 # preFixup = '' 67 # rm -r $NIX_BUILD_TOP/__nix_qt5__ 68 # ''; 69 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 }; 77 78}