Unverified Commit fc40ef00 authored by Cosima Neidahl's avatar Cosima Neidahl Committed by GitHub
Browse files

rlottie: build with meson (#448814)

parents 1c16f223 ab01c588
Loading
Loading
Loading
Loading
+6 −18
Original line number Diff line number Diff line
@@ -3,40 +3,28 @@
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  meson,
  ninja,
  pkg-config,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation {
  pname = "rlottie";
  version = "0.2";
  version = "0.2-unstable-2025-10-01";

  src = fetchFromGitHub {
    owner = "Samsung";
    repo = "rlottie";
    rev = "v${version}";
    sha256 = "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3";
    rev = "671c561130ead1c6e44805a7ec1263573a3440fd";
    hash = "sha256-od3zatv4ZxUIoLkwy0TT8lAsDcjoPS4plci+ZDyz34Y=";
  };

  patches = [
    # Fixed build with GCC 11
    (fetchpatch {
      url = "https://github.com/Samsung/rlottie/commit/2d7b1fa2b005bba3d4b45e8ebfa632060e8a157a.patch";
      hash = "sha256-2JPsj0WiBMMu0N3NUYDrHumvPN2YS8nPq5Zwagx6UWE=";
    })
  ];

  nativeBuildInputs = [
    cmake
    meson
    ninja
    pkg-config
  ];

  cmakeFlags = [
    (lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString (
    stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64
  ) "-U__ARM_NEON__";