2023-11-05 15:55:33 +00:00
|
|
|
{ lib, stdenv, pkg-config, darwin, fetchurl, SDL2, freetype, harfbuzz, libGL, testers }:
|
2015-03-07 11:49:59 +00:00
|
|
|
|
2023-11-05 15:55:33 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "SDL2_ttf";
|
2023-02-11 07:24:28 +00:00
|
|
|
version = "2.20.2";
|
2015-03-07 11:49:59 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-11-05 15:55:33 +00:00
|
|
|
url = "https://www.libsdl.org/projects/SDL_ttf/release/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
|
2023-02-11 07:24:28 +00:00
|
|
|
sha256 = "sha256-ncce2TSHUhsQeixKnKa/Q/ti9r3dXCawVea5FBiiIFM=";
|
2015-03-07 11:49:59 +00:00
|
|
|
};
|
|
|
|
|
2023-09-05 22:38:57 +00:00
|
|
|
configureFlags = [ "--disable-harfbuzz-builtin" ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" ];
|
2018-06-06 23:18:00 +00:00
|
|
|
|
2021-11-01 09:54:40 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2023-09-05 22:38:57 +00:00
|
|
|
buildInputs = [ SDL2 freetype harfbuzz ]
|
2023-05-29 11:48:35 +00:00
|
|
|
++ lib.optional (!stdenv.isDarwin) libGL
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.libobjc;
|
2015-03-07 11:49:59 +00:00
|
|
|
|
2023-11-05 15:55:33 +00:00
|
|
|
passthru.tests.pkg-config = testers.hasPkgConfigModules {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 00:34:36 +00:00
|
|
|
description = "Support for TrueType (.ttf) font files with Simple Directmedia Layer";
|
2018-01-20 15:26:21 +00:00
|
|
|
platforms = platforms.unix;
|
2016-08-22 03:24:32 +00:00
|
|
|
license = licenses.zlib;
|
2022-01-13 00:34:36 +00:00
|
|
|
homepage = "https://github.com/libsdl-org/SDL_ttf";
|
2023-11-05 15:55:33 +00:00
|
|
|
pkgConfigModules = [ "SDL2_ttf" ];
|
2015-03-07 11:49:59 +00:00
|
|
|
};
|
2023-11-05 15:55:33 +00:00
|
|
|
})
|