nixpkgs/pkgs/development/libraries/rlottie/default.nix
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00

41 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, meson
, ninja
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "rlottie";
version = "0.2";
src = fetchFromGitHub {
owner = "Samsung";
repo = pname;
rev = "v${version}";
sha256 = "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3";
};
patches = [
# Fixed build with GCC 11
(fetchpatch {
url = "https://github.com/Samsung/rlottie/commit/2d7b1fa2b005bba3d4b45e8ebfa632060e8a157a.patch";
hash = "sha256-2JPsj0WiBMMu0N3NUYDrHumvPN2YS8nPq5Zwagx6UWE=";
})
];
nativeBuildInputs = [ meson ninja pkg-config ];
env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__";
meta = with lib; {
homepage = "https://github.com/Samsung/rlottie";
description = "A platform independent standalone c++ library for rendering vector based animations and art in realtime";
license = with licenses; [ mit bsd3 mpl11 ftl ];
platforms = platforms.all;
maintainers = with maintainers; [ CRTified ];
};
}