Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 62 lines 1.9 kB view raw
1{ stdenv, fetchurl, lib, file 2, pkgconfig, intltool 3, glib, dbus-glib, json-glib 4, gobjectIntrospection, vala_0_38, gnome-doc-utils 5, gtkVersion ? null, gtk2 ? null, gtk3 ? null }: 6 7with lib; 8 9stdenv.mkDerivation rec { 10 name = let postfix = if gtkVersion == null then "glib" else "gtk${gtkVersion}"; 11 in "libdbusmenu-${postfix}-${version}"; 12 version = "${versionMajor}.${versionMinor}"; 13 versionMajor = "16.04"; 14 versionMinor = "0"; 15 16 src = fetchurl { 17 url = "${meta.homepage}/${versionMajor}/${version}/+download/libdbusmenu-${version}.tar.gz"; 18 sha256 = "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"; 19 }; 20 21 nativeBuildInputs = [ pkgconfig intltool ]; 22 23 buildInputs = [ 24 glib dbus-glib json-glib 25 gobjectIntrospection vala_0_38 gnome-doc-utils 26 ] ++ optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3); 27 28 postPatch = '' 29 for f in {configure,ltmain.sh,m4/libtool.m4}; do 30 substituteInPlace $f \ 31 --replace /usr/bin/file ${file}/bin/file 32 done 33 ''; 34 35 # https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/libdbusmenu 36 preConfigure = '' 37 export HAVE_VALGRIND_TRUE="#" 38 export HAVE_VALGRIND_FALSE="" 39 ''; 40 41 configureFlags = [ 42 "CFLAGS=-Wno-error" 43 "--sysconfdir=/etc" 44 "--localstatedir=/var" 45 (if gtkVersion == null then "--disable-gtk" else "--with-gtk=${gtkVersion}") 46 "--disable-scrollkeeper" 47 ] ++ optional (gtkVersion != "2") "--disable-dumper"; 48 49 installFlags = [ 50 "sysconfdir=\${out}/etc" 51 "localstatedir=\${TMPDIR}" 52 "typelibdir=\${out}/lib/girepository-1.0" 53 ]; 54 55 meta = { 56 description = "Library for passing menu structures across DBus"; 57 homepage = https://launchpad.net/dbusmenu; 58 license = with licenses; [ gpl3 lgpl21 lgpl3 ]; 59 platforms = platforms.linux; 60 maintainers = [ maintainers.msteen ]; 61 }; 62}