Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchurl 4, pkg-config 5, cairo 6, harfbuzz 7, libintl 8, libthai 9, darwin 10, fribidi 11, gnome 12, gi-docgen 13, makeFontsConf 14, freefont_ttf 15, meson 16, ninja 17, glib 18, python3 19, x11Support? !stdenv.isDarwin, libXft 20, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages 21, buildPackages, gobject-introspection 22}: 23 24stdenv.mkDerivation rec { 25 pname = "pango"; 26 version = "1.50.14"; 27 28 outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc"; 29 30 src = fetchurl { 31 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 32 sha256 = "HWfyBb/DGMJ6Kc/ftoKFaN9WZ5XfDLUdIYnN5/LVgeg="; 33 }; 34 35 depsBuildBuild = [ 36 pkg-config 37 ]; 38 39 nativeBuildInputs = [ 40 meson ninja 41 glib # for glib-mkenum 42 pkg-config 43 python3 44 ] ++ lib.optionals withIntrospection [ 45 gi-docgen 46 gobject-introspection 47 ]; 48 49 buildInputs = [ 50 fribidi 51 libthai 52 ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ 53 ApplicationServices 54 Carbon 55 CoreGraphics 56 CoreText 57 ]); 58 59 propagatedBuildInputs = [ 60 cairo 61 glib 62 libintl 63 harfbuzz 64 ] ++ lib.optionals x11Support [ 65 libXft 66 ]; 67 68 mesonFlags = [ 69 (lib.mesonBool "gtk_doc" withIntrospection) 70 (lib.mesonEnable "introspection" withIntrospection) 71 (lib.mesonEnable "xft" x11Support) 72 ]; 73 74 # Fontconfig error: Cannot load default config file 75 FONTCONFIG_FILE = makeFontsConf { 76 fontDirectories = [ freefont_ttf ]; 77 }; 78 79 # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) 80 # it should be a build-time dep for build 81 # TODO: send upstream 82 postPatch = '' 83 substituteInPlace meson.build \ 84 --replace "dependency('gi-docgen', ver" "dependency('gi-docgen', native:true, ver" 85 86 substituteInPlace docs/meson.build \ 87 --replace "'gi-docgen', req" "'gi-docgen', native:true, req" 88 ''; 89 90 doCheck = false; # test-font: FAIL 91 92 postFixup = '' 93 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 94 moveToOutput "share/doc" "$devdoc" 95 ''; 96 97 passthru = { 98 updateScript = gnome.updateScript { 99 packageName = pname; 100 versionPolicy = "odd-unstable"; 101 # 1.90 is alpha for API 2. 102 freeze = true; 103 }; 104 }; 105 106 meta = with lib; { 107 description = "A library for laying out and rendering of text, with an emphasis on internationalization"; 108 109 longDescription = '' 110 Pango is a library for laying out and rendering of text, with an 111 emphasis on internationalization. Pango can be used anywhere 112 that text layout is needed, though most of the work on Pango so 113 far has been done in the context of the GTK widget toolkit. 114 Pango forms the core of text and font handling for GTK. 115 ''; 116 117 homepage = "https://www.pango.org/"; 118 license = licenses.lgpl2Plus; 119 120 maintainers = with maintainers; [ raskin ] ++ teams.gnome.members; 121 platforms = platforms.unix; 122 }; 123}