Files
nixpkgs/pkgs/by-name/pl/plutovg/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
testers,
fontFaceCache ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "plutovg";
version = "1.3.1";
src = fetchFromGitHub {
owner = "sammycage";
repo = "plutovg";
tag = "v${finalAttrs.version}";
hash = "sha256-6UW+laVxTYvg+5qC12yA6U6gPKdFQeb7sdDunZ6gcd4=";
};
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "PLUTOVG_DISABLE_FONT_FACE_CACHE_LOAD" (!fontFaceCache))
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
# (setting it to an absolute path causes include files to go to $out/$out/include,
# because the absolute path is interpreted with root at $out).
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
nativeBuildInputs = [
cmake
];
passthru.tests = {
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
versionCheck = true;
};
cmake-config = testers.hasCmakeConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "plutovg" ];
versionCheck = true;
};
};
meta = {
homepage = "https://github.com/sammycage/plutovg/";
changelog = "https://github.com/sammycage/plutovg/releases/tag/v${finalAttrs.version}";
description = "Tiny 2D vector graphics library in C";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.eymeric ];
pkgConfigModules = [ "plutovg" ];
};
})