Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 68 lines 1.9 kB view raw
1{ lib 2, stdenv 3, cmake 4, fetchFromGitHub 5, python3 6, flex 7, bison 8, qt5 9, CoreServices 10, libiconv 11, withSqlite ? true, sqlite 12}: 13 14stdenv.mkDerivation rec { 15 pname = "doxygen"; 16 version = "1.9.7"; 17 18 src = fetchFromGitHub { 19 owner = "doxygen"; 20 repo = "doxygen"; 21 rev = "Release_${lib.replaceStrings [ "." ] [ "_" ] version}"; 22 sha256 = "sha256-ezeMQk+Vyi9qNsYwbaRRruaIYGY8stFf71W7GonXqco="; 23 }; 24 25 nativeBuildInputs = [ 26 cmake 27 python3 28 flex 29 bison 30 ]; 31 32 buildInputs = [ libiconv ] 33 ++ lib.optionals withSqlite [ sqlite ] 34 ++ lib.optionals (qt5 != null) (with qt5; [ qtbase wrapQtAppsHook ]) 35 ++ lib.optionals stdenv.isDarwin [ CoreServices ]; 36 37 cmakeFlags = [ "-DICONV_INCLUDE_DIR=${libiconv}/include" ] 38 ++ lib.optional withSqlite "-Duse_sqlite3=ON" 39 ++ lib.optional (qt5 != null) "-Dbuild_wizard=YES"; 40 41 env.NIX_CFLAGS_COMPILE = 42 lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; 43 44 # put examples in an output so people/tools can test against them 45 outputs = [ "out" "examples" ]; 46 postInstall = '' 47 cp -r ../examples $examples 48 ''; 49 50 meta = { 51 license = lib.licenses.gpl2Plus; 52 homepage = "https://www.doxygen.nl/"; 53 changelog = "https://www.doxygen.nl/manual/changelog.html"; 54 description = "Source code documentation generator tool"; 55 56 longDescription = '' 57 Doxygen is the de facto standard tool for generating documentation from 58 annotated C++ sources, but it also supports other popular programming 59 languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, 60 Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL and to some extent 61 D. It can generate an on-line documentation browser (in HTML) and/or an 62 off-line reference manual (in LaTeX) from a set of documented source 63 files. 64 ''; 65 66 platforms = if qt5 != null then lib.platforms.linux else lib.platforms.unix; 67 }; 68}