mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
7a04c2ad68
- boost 171 removed on staging-next - re-generated node-packages.nix ; Conflicts: ; pkgs/development/java-modules/m2install.nix ; pkgs/development/node-packages/node-packages.nix ; pkgs/top-level/all-packages.nix
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, freetype
|
|
, cmake
|
|
, static ? stdenv.hostPlatform.isStatic
|
|
, libgcc
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.3.14";
|
|
pname = "graphite2";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/silnrsi/graphite/releases/download/"
|
|
+ "${version}/graphite2-${version}.tgz";
|
|
sha256 = "1790ajyhk0ax8xxamnrk176gc9gvhadzy78qia4rd8jzm89ir7gr";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
|
buildInputs = [ freetype ]
|
|
++ lib.optionals (!stdenv.cc.isGNU) [ libgcc ];
|
|
|
|
patches = lib.optionals stdenv.isDarwin [ ./macosx.patch ];
|
|
|
|
cmakeFlags = lib.optionals static [
|
|
"-DBUILD_SHARED_LIBS=OFF"
|
|
];
|
|
|
|
# Remove a test that fails to statically link (undefined reference to png and
|
|
# freetype symbols)
|
|
postConfigure = lib.optionalString static ''
|
|
sed -e '/freetype freetype.c/d' -i ../tests/examples/CMakeLists.txt
|
|
'';
|
|
|
|
preCheck = ''
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/src/
|
|
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/src/
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "An advanced font engine";
|
|
maintainers = [ maintainers.raskin ];
|
|
platforms = platforms.unix;
|
|
license = licenses.lgpl21;
|
|
};
|
|
}
|