diff --git a/pkgs/development/libraries/qmlbox2d/default.nix b/pkgs/development/libraries/qmlbox2d/default.nix new file mode 100644 index 000000000000..630f606c2e54 --- /dev/null +++ b/pkgs/development/libraries/qmlbox2d/default.nix @@ -0,0 +1,31 @@ +{stdenv, qtdeclarative, fetchFromGitHub, qmake }: +stdenv.mkDerivation rec { + name = "qml-box2d-2018-03-16"; + src = fetchFromGitHub { + owner = "qml-box2d"; + repo = "qml-box2d"; + sha256 = "1fbsvv28b4r0szcv8bk5gxpf8v534jp2axyfp438384sy757wsq2"; + rev = "21e57f1"; + }; + + enableParallelBuilding = true; + nativeBuildInputs = [ qmake ]; + + buildInputs = [ qtdeclarative ]; + + patchPhase = '' + substituteInPlace box2d.pro \ + --replace '$$[QT_INSTALL_QML]' "/$qtQmlPrefix/" + qmakeFlags="$qmakeFlags PREFIXSHORTCUT=$out" + ''; + + installFlags = [ "INSTALL_ROOT=$(out)" ]; + + meta = with stdenv.lib; { + description = "A QML plugin for Box2D engine"; + homepage = "https://github.com/qml-box2d/qml-box2d"; + maintainers = [ maintainers.guibou ]; + platforms = platforms.linux; + license = licenses.zlib; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79145b7f996e..3ca9d44a8fe7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11227,6 +11227,7 @@ with pkgs; qca-qt5 = callPackage ../development/libraries/qca-qt5 { }; qmltermwidget = callPackage ../development/libraries/qmltermwidget { }; + qmlbox2d = libsForQt59.callPackage ../development/libraries/qmlbox2d { }; qscintilla = callPackage ../development/libraries/qscintilla { withQt5 = true;