
While upstream has added release notes in their repo [1], no `2.0.11.1` version has been tagged.
According to the repology guidelines [2] that we mostly follow,
versioning of snapshots should be relative to the last tagged upstream release, which would be `2.0.11`.
The `2.0.11.1-unstable...` version string currently crashes the update script,
which is irritating when checking for all updates as a maintainer.
By the off-chance upstream does end up tagging a `2.0.11.1` later,
our version string would also incorrectly represent what we actually have.
Changelogs in git without a tag are still subject to change,
though unlikely in the case of SDL_ttf.
Whether we do or do not have the `.1` probably does not matter too much.
[1] e31d11a692
[2] https://repology.org/docs/requirements
58 lines
1.3 KiB
Nix
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"
|
|
];
|
|
};
|
|
})
|