Files
nixpkgs/pkgs/by-name/pl/plutosvg/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

77 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
nix-update-script,
validatePkgConfig,
testers,
cmake,
ninja,
plutovg,
enableFreetype ? false,
freetype,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "plutosvg";
version = "0.0.7";
src = fetchFromGitHub {
owner = "sammycage";
repo = "plutosvg";
tag = "v${finalAttrs.version}";
hash = "sha256-4JLk4+O9Tf8CGxMP0aDN70ak/8teZH3GWBWlrIkPQm4=";
};
outputs = [
"out"
"dev"
];
patches = [
# https://github.com/sammycage/plutosvg/pull/29
./0001-Emit-correct-pkg-config-file-if-paths-are-absolute.patch
# https://github.com/sammycage/plutosvg/pull/31
(fetchpatch {
url = "https://github.com/sammycage/plutosvg/commit/17d60020e0b24299fae0e7df37637448b3b51488.patch";
hash = "sha256-hY25ttsLQwvtQmDeOGSoCVDy34GUA0tNai/L3wpmPUo=";
})
];
nativeBuildInputs = [
cmake
ninja
validatePkgConfig
];
propagatedBuildInputs = [
plutovg
]
++ lib.optional enableFreetype freetype;
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "PLUTOSVG_ENABLE_FREETYPE" enableFreetype)
];
passthru.tests = {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
cmake-config = testers.hasCmakeConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "plutosvg" ];
versionCheck = true;
};
};
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/sammycage/plutosvg";
changelog = "https://github.com/sammycage/plutosvg/releases/tag/${finalAttrs.src.tag}";
description = "Tiny SVG rendering library in C";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ marcin-serwin ];
pkgConfigModules = [ "plutosvg" ];
};
})