lol
1{lib, stdenv, qtdeclarative, fetchFromGitHub, qmake }:
2stdenv.mkDerivation {
3 pname = "qml-box2d";
4 version = "unstable-2018-04-06";
5 src = fetchFromGitHub {
6 owner = "qml-box2d";
7 repo = "qml-box2d";
8 sha256 = "0gb8limy6ck23z3k0k2j7c4c4s95p40f6lbzk4szq7fjnnw22kb7";
9 rev = "b7212d5640701f93f0cd88fbd3a32c619030ae62";
10 };
11
12 dontWrapQtApps = true;
13 nativeBuildInputs = [ qmake ];
14
15 buildInputs = [ qtdeclarative ];
16
17 patchPhase = ''
18 substituteInPlace box2d.pro \
19 --replace '$$[QT_INSTALL_QML]' "/$qtQmlPrefix/"
20 qmakeFlags="$qmakeFlags PREFIXSHORTCUT=$out"
21 '';
22
23 installFlags = [ "INSTALL_ROOT=$(out)" ];
24
25 meta = with lib; {
26 description = "A QML plugin for Box2D engine";
27 homepage = "https://github.com/qml-box2d/qml-box2d";
28 maintainers = [ maintainers.guibou ];
29 platforms = platforms.linux;
30 license = licenses.zlib;
31 };
32}