Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4121,6 +4121,12 @@
name = "ChaosAttractor";
keys = [ { fingerprint = "A137 4415 DB7C 6439 10EA 5BF1 0FEE 4E47 5940 E125"; } ];
};
charain = {
email = "charain_li@outlook.com";
github = "chai-yuan";
githubId = 42235952;
name = "charain";
};
charB66 = {
email = "nix.disparate221@passinbox.com";
github = "charB66";
Expand Down
76 changes: 76 additions & 0 deletions pkgs/by-name/sd/sdl3-ttf/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
nix-update-script,
testers,
validatePkgConfig,
sdl3,
cmake,
freetype,
harfbuzz,
glib,
ninja,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "sdl3-ttf";
version = "3.2.0";

src = fetchFromGitHub {
owner = "libsdl-org";
repo = "SDL_ttf";
tag = "release-${finalAttrs.version}";
hash = "sha256-eq7yWw7PWIeXWjuNHaQUiV+x0qng4FJNscsYRALK40I=";
};

# fix CMake path handling (remove on next update)
patches = [
(fetchpatch {
url = "https://github.com/libsdl-org/SDL_ttf/commit/ad2ffa825d4535ddfb57861a7e33dff4a9bc6a94.patch?full_index=1";
hash = "sha256-emf7UnfB6Rl1+R74lsoIvm9ezDZtjHUS/t4k/RxbaYg=";
})
];

strictDeps = true;
doCheck = true;

nativeBuildInputs = [
cmake
ninja
validatePkgConfig
];

buildInputs = [
sdl3
freetype
harfbuzz
glib
];

cmakeFlags = [
(lib.cmakeBool "SDLTTF_STRICT" true)
(lib.cmakeBool "SDLTTF_HARFBUZZ" true)
# disable plutosvg (not in nixpkgs)
(lib.cmakeBool "SDLTTF_PLUTOSVG" false)
];

passthru = {
updateScript = nix-update-script { };
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};

meta = {
description = "SDL TrueType font library";
homepage = "https://github.com/libsdl-org/SDL_ttf";
changelog = "https://github.com/libsdl-org/SDL_ttf/releases/tag/${toString finalAttrs.src.tag}";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [
charain
Emin017
];
pkgConfigModules = [ "sdl3-ttf" ];
platforms = lib.platforms.all;
};
})