nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 66 lines 1.4 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, autoreconfHook 5, doxygen 6, freeglut 7, freetype 8, GLUT 9, libGL 10, libGLU 11, OpenGL 12, pkg-config 13}: 14 15stdenv.mkDerivation rec { 16 pname = "ftgl"; 17 version = "2.4.0"; 18 19 src = fetchFromGitHub { 20 owner = "frankheckenbach"; 21 repo = "ftgl"; 22 rev = "v${version}"; 23 hash = "sha256-6TDNGoMeBLnucmHRgEDIVWcjlJb7N0sTluqBwRMMWn4="; 24 }; 25 26 nativeBuildInputs = [ 27 autoreconfHook 28 doxygen 29 pkg-config 30 ]; 31 buildInputs = [ 32 freetype 33 ] ++ (if stdenv.isDarwin then [ 34 OpenGL 35 GLUT 36 ] else [ 37 libGL 38 libGLU 39 freeglut 40 ]); 41 42 configureFlags = [ 43 "--with-ft-prefix=${lib.getDev freetype}" 44 ]; 45 46 enableParallelBuilding = true; 47 48 postInstall = '' 49 install -Dm644 src/FTSize.h -t ${placeholder "out"}/include/FTGL 50 install -Dm644 src/FTFace.h -t ${placeholder "out"}/include/FTGL 51 ''; 52 53 meta = with lib; { 54 homepage = "https://github.com/frankheckenbach/ftgl"; 55 description = "Font rendering library for OpenGL applications"; 56 longDescription = '' 57 FTGL is a free cross-platform Open Source C++ library that uses Freetype2 58 to simplify rendering fonts in OpenGL applications. FTGL supports bitmaps, 59 pixmaps, texture maps, outlines, polygon mesh, and extruded polygon 60 rendering modes. 61 ''; 62 license = licenses.mit; 63 maintainers = with maintainers; [ AndersonTorres ]; 64 platforms = platforms.unix; 65 }; 66}