4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
78 lines
1.8 KiB
Nix
78 lines
1.8 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, qttools
|
|
, qtmultimedia
|
|
, liblo
|
|
, gst_all_1
|
|
, qmake
|
|
, pkgconfig
|
|
, wrapQtAppsHook
|
|
}:
|
|
|
|
with stdenv;
|
|
|
|
mkDerivation rec {
|
|
|
|
version = "0.6.2";
|
|
pname = "mapmap";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mapmapteam";
|
|
repo = "mapmap";
|
|
rev = version;
|
|
sha256 = "1pyb3vz19lbfz2hrfqm9a29vnajw1bigdrblbmcy32imkf4isfvm";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
qmake
|
|
pkgconfig
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
qttools
|
|
qtmultimedia
|
|
liblo
|
|
gst_all_1.gstreamer
|
|
gst_all_1.gstreamermm
|
|
gst_all_1.gst-libav
|
|
gst_all_1.gst-vaapi
|
|
];
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "message-handler-segfault.patch";
|
|
url = "https://github.com/mapmapteam/mapmap/pull/519/commits/22eeee59ba7de6de7b73ecec3b0ea93bdc7f04e8.patch";
|
|
sha256 = "0is905a4lf9vvl5b1n4ky6shrnbs5kz9mlwfk78hrl4zabfmcl5l";
|
|
})
|
|
# fix build with libsForQt515
|
|
(fetchpatch {
|
|
url = "https://github.com/mapmapteam/mapmap/pull/518/commits/ac49acc1e2ec839832b86838e93a8c13030affeb.patch";
|
|
sha256 = "sha256-tSLbyIDv5mSejnw9oru5KLAyQqjgJLLREKQomEUcGt8=";
|
|
})
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp mapmap $out/bin/mapmap
|
|
mkdir -p $out/share/applications/
|
|
sed 's|Icon=/usr/share/icons/hicolor/scalable/apps/mapmap.svg|Icon=mapmap|g' resources/texts/mapmap.desktop > $out/share/applications/mapmap.desktop
|
|
mkdir -p $out/share/icons/hicolor/scalable/apps/
|
|
cp resources/images/logo/mapmap.* $out/share/icons/hicolor/scalable/apps/
|
|
'';
|
|
|
|
# RPATH in /tmp hack
|
|
# preFixup = ''
|
|
# rm -r $NIX_BUILD_TOP/__nix_qt5__
|
|
# '';
|
|
|
|
meta = with lib; {
|
|
description = "Open source video mapping software";
|
|
homepage = "https://github.com/mapmapteam/mapmap";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.erictapen ];
|
|
platforms = platforms.linux;
|
|
};
|
|
|
|
}
|