kdePackages.qmlbox2d: revendor Box2D

They require an older version than our main `box2d_2` package (which
itself is only used for LibreOffice). Our package works fine with
CMake 4, as does the CMake build system they use in their vendored
version, but the upstream release of the old version does not. Since
this is a somewhat pointless single‐package use of `overrideAttrs`,
just let it handle the Box2D build itself.
This commit is contained in:
Emily
2025-09-17 15:02:01 +01:00
parent 6e3645cb5b
commit 72c53ae247
@@ -6,33 +6,9 @@
fetchFromGitHub,
cmake,
pkg-config,
box2d,
unstableGitUpdater,
}:
let
inherit (lib) cmakeBool;
# 2.3.1 is the only supported version
box2d' = box2d.overrideAttrs (old: rec {
version = "2.3.1";
src = fetchFromGitHub {
owner = "erincatto";
repo = "box2d";
tag = "v${version}";
hash = "sha256-Z2J17YMzQNZqABIa5eyJDT7BWfXveymzs+DWsrklPIs=";
};
patches = [ ];
postPatch = "";
sourceRoot = "${src.name}/Box2D";
cmakeFlags = old.cmakeFlags or [ ] ++ [
(cmakeBool "BOX2D_INSTALL" true)
(cmakeBool "BOX2D_BUILD_SHARED" true)
(cmakeBool "BOX2D_BUILD_EXAMPLES" false)
];
});
in
stdenv.mkDerivation {
pname = "qml-box2d";
version = "0-unstable-2024-04-15";
@@ -52,15 +28,10 @@ stdenv.mkDerivation {
];
buildInputs = [
box2d'
qtbase
qtdeclarative
];
cmakeFlags = [
(cmakeBool "USE_SYSTEM_BOX2D" true)
];
passthru = {
updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;