nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 104 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 libxml2, 7 glibmm, 8 perl, 9 gnome, 10 meson, 11 ninja, 12 docbook5, 13 docbook-xsl-ns, 14 doxygen, 15 libxslt, 16 fop, 17 dblatex, 18 graphviz, 19 20 withDocumentation ? false, 21 withManual ? false, # Broken due to not being allowed to fetch file from web 22 withPDF ? false, 23 withExamples ? false, 24}: 25 26stdenv.mkDerivation rec { 27 pname = "libxml++"; 28 version = "3.2.5"; 29 30 src = fetchurl { 31 url = "mirror://gnome/sources/libxml++/${lib.versions.majorMinor version}/libxml++-${version}.tar.xz"; 32 hash = "sha256-DJs4G1qD1rOrSwuGXXJW2rJ9V1mBtjvi+Fnty5TaWcc="; 33 }; 34 35 outputs = [ 36 "out" 37 "dev" 38 ] 39 ++ lib.lists.optionals withDocumentation [ 40 "doc" 41 "devdoc" 42 ]; 43 44 nativeBuildInputs = [ 45 ninja 46 meson 47 pkg-config 48 ] 49 ++ lib.lists.optionals withDocumentation [ 50 perl 51 doxygen 52 libxslt 53 graphviz 54 ] 55 ++ lib.lists.optionals withManual [ 56 docbook5 57 docbook-xsl-ns 58 ] 59 ++ lib.lists.optional withPDF [ 60 fop 61 dblatex 62 ]; 63 64 buildInputs = [ glibmm ]; 65 66 propagatedBuildInputs = [ libxml2 ]; 67 68 mesonFlags = [ 69 (lib.mesonBool "maintainer-mode" false) 70 (lib.mesonBool "build-documentation" withDocumentation) 71 (lib.mesonBool "build-manual" withManual) 72 (lib.mesonBool "build-pdf" withPDF) 73 (lib.mesonBool "build-examples" withExamples) 74 (lib.mesonBool "build-tests" doCheck) 75 ]; 76 77 preBuild = lib.strings.optionalString withDocumentation '' 78 doxygen -u docs/reference/Doxyfile 79 ''; 80 81 postFixup = '' 82 substituteInPlace $dev/lib/pkgconfig/libxml++-3.0.pc \ 83 --replace-fail 'docdir=''${datarootdir}' "docdir=$doc/share" 84 ''; 85 86 passthru = { 87 updateScript = gnome.updateScript { 88 attrPath = "libxmlxx3"; 89 packageName = "libxml++"; 90 versionPolicy = "odd-unstable"; 91 freeze = true; 92 }; 93 }; 94 95 doCheck = true; 96 97 meta = { 98 homepage = "https://libxmlplusplus.sourceforge.net/"; 99 description = "C++ wrapper for the libxml2 XML parser library, version 3"; 100 license = lib.licenses.lgpl2Plus; 101 platforms = lib.platforms.unix; 102 maintainers = with lib.maintainers; [ willow ]; 103 }; 104}