at 23.05-pre 107 lines 2.1 kB view raw
1{ lib 2, stdenv 3, substituteAll 4, fetchFromGitHub 5, meson 6, ninja 7, pkg-config 8, gettext 9, xmlto 10, docbook-xsl-nons 11, docbook_xml_dtd_45 12, libxslt 13, libstemmer 14, glib 15, xapian 16, libxml2 17, libxmlb 18, libyaml 19, gobject-introspection 20, pcre 21, itstool 22, gperf 23, vala 24, curl 25, nixosTests 26}: 27 28stdenv.mkDerivation rec { 29 pname = "appstream"; 30 version = "0.15.5"; 31 # When bumping this package, please also check whether 32 # fix-build-for-qt-olderthan-514.patch still applies by 33 # building libsForQt512.appstream-qt. 34 35 outputs = [ "out" "dev" "installedTests" ]; 36 37 src = fetchFromGitHub { 38 owner = "ximion"; 39 repo = "appstream"; 40 rev = "v${version}"; 41 sha256 = "sha256-KVZCtu1w5FMgXZMiSW55rbrI6W/A9zWWKKvACtk/jjk="; 42 }; 43 44 patches = [ 45 # Fix hardcoded paths 46 (substituteAll { 47 src = ./fix-paths.patch; 48 libstemmer_includedir = "${lib.getDev libstemmer}/include"; 49 }) 50 51 # Allow installing installed tests to a separate output. 52 ./installed-tests-path.patch 53 ]; 54 55 nativeBuildInputs = [ 56 meson 57 ninja 58 pkg-config 59 gettext 60 libxslt 61 xmlto 62 docbook-xsl-nons 63 docbook_xml_dtd_45 64 gobject-introspection 65 itstool 66 vala 67 ]; 68 69 buildInputs = [ 70 libstemmer 71 pcre 72 glib 73 xapian 74 libxml2 75 libxmlb 76 libyaml 77 gperf 78 curl 79 ]; 80 81 mesonFlags = [ 82 "-Dapidocs=false" 83 "-Ddocs=false" 84 "-Dvapi=true" 85 "-Dinstalled_test_prefix=${placeholder "installedTests"}" 86 ]; 87 88 passthru = { 89 tests = { 90 installed-tests = nixosTests.installed-tests.appstream; 91 }; 92 }; 93 94 meta = with lib; { 95 description = "Software metadata handling library"; 96 longDescription = '' 97 AppStream is a cross-distro effort for building Software-Center applications 98 and enhancing metadata provided by software components. It provides 99 specifications for meta-information which is shipped by upstream projects and 100 can be consumed by other software. 101 ''; 102 homepage = "https://www.freedesktop.org/wiki/Distributions/AppStream/"; 103 license = licenses.lgpl21Plus; 104 mainProgram = "appstreamcli"; 105 platforms = platforms.unix; 106 }; 107}