Files
nixpkgs/pkgs/by-name/sd/SDL_ttf/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

58 lines
1.3 KiB
Nix

{
lib,
SDL,
fetchFromGitHub,
freetype,
stdenv,
unstableGitUpdater,
# Boolean flags
enableSdltest ? (!stdenv.hostPlatform.isDarwin),
}:
stdenv.mkDerivation (finalAttrs: {
pname = "SDL_ttf";
version = "2.0.11-unstable-2024-04-23";
src = fetchFromGitHub {
owner = "libsdl-org";
repo = "SDL_ttf";
rev = "3c4233732b94ce08d5f6a868e597af39e13f8b23";
hash = "sha256-FX6Ko4CaOSCSKdpWVsJhTZXlWk1cnjbfVfMDiGG2+TU=";
};
buildInputs = [
SDL
freetype
];
# pass in correct *-config for cross builds
env.SDL_CONFIG = lib.getExe' (lib.getDev SDL) "sdl-config";
env.FT2_CONFIG = lib.getExe' freetype.dev "freetype-config";
configureFlags = [
(lib.enableFeature enableSdltest "sdltest")
];
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-liconv";
strictDeps = true;
passthru.updateScript = unstableGitUpdater {
tagFormat = "release-2.0.11";
tagPrefix = "release-";
branch = "SDL-1.2";
};
meta = {
homepage = "https://github.com/libsdl-org/SDL_ttf";
description = "SDL TrueType library";
license = lib.licenses.zlib;
teams = [ lib.teams.sdl ];
inherit (SDL.meta) platforms;
knownVulnerabilities = [
# CVE applies to SDL2 https://github.com/NixOS/nixpkgs/pull/274836#issuecomment-2708627901
# "CVE-2022-27470"
];
};
})