-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
60 lines (55 loc) · 1.6 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
description = "Support for TrueType (.ttf) font files with Simple Directmedia Layer";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
raqm_src.url = "github:HOST-Oman/libraqm/v0.7.2";
raqm_src.flake = false;
};
outputs = { self, nixpkgs, flake-utils, raqm_src }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages = flake-utils.lib.flattenTree rec {
raqm = pkgs.stdenv.mkDerivation rec {
pname = "libraqm";
version = "0.7.2";
src = raqm_src;
nativeBuildInputs = [
pkgs.meson
pkgs.ninja
pkgs.pkgconfig
pkgs.python3
];
buildInputs = [
pkgs.freetype
pkgs.harfbuzz
pkgs.fribidi
];
propagatedBuildInputs = [
pkgs.glib
pkgs.pcre
];
};
SDL2_ttf = pkgs.stdenv.mkDerivation {
pname = "SDL2_ttf";
version = "2.0.14-" + (if (self ? shortRev) then self.shortRev else "dirty");
src = nixpkgs.lib.cleanSource ./.;
cmakeFlags = [ "-DWITH_RAQM=1" ];
nativeBuildInputs = [
pkgs.cmake
pkgs.pkg-config
];
buildInputs = [
raqm
pkgs.SDL2
pkgs.freetype
pkgs.libGL
];
};
default = SDL2_ttf;
};
}
);
}