Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 66 lines 1.9 kB view raw
1# TODO: Resolve the issues with the Mono bindings. 2 3{ stdenv, fetchurl, lib, file 4, pkgconfig, autoconf 5, glib, dbus-glib, libdbusmenu-glib 6, gtkVersion, gtk2 ? null, gtk3 ? null 7, pythonPackages, gobjectIntrospection, vala, gnome-doc-utils 8, monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null 9 }: 10 11with lib; 12 13let 14 inherit (pythonPackages) python pygobject2 pygtk; 15in stdenv.mkDerivation rec { 16 name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}"; 17 in "libindicate-${postfix}-${version}"; 18 version = "${versionMajor}.${versionMinor}"; 19 versionMajor = "12.10"; 20 versionMinor = "1"; 21 22 src = fetchurl { 23 url = "${meta.homepage}/${versionMajor}/${version}/+download/libindicate-${version}.tar.gz"; 24 sha256 = "10am0ymajx633b33anf6b79j37k61z30v9vaf5f9fwk1x5cw1q21"; 25 }; 26 27 nativeBuildInputs = [ pkgconfig autoconf gobjectIntrospection vala gnome-doc-utils ]; 28 29 buildInputs = [ 30 glib dbus-glib libdbusmenu-glib 31 python pygobject2 pygtk 32 ] ++ (if gtkVersion == "2" 33 then [ gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ] 34 else [ gtk3 ]); 35 36 postPatch = '' 37 substituteInPlace configure.ac \ 38 --replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0' \ 39 --replace 'pyglib-2.0-python$PYTHON_VERSION' 'pyglib-2.0-python' 40 autoconf 41 for f in {configure,ltmain.sh,m4/libtool.m4}; do 42 substituteInPlace $f \ 43 --replace /usr/bin/file ${file}/bin/file 44 done 45 ''; 46 47 configureFlags = [ 48 "CFLAGS=-Wno-error" 49 "--sysconfdir=/etc" 50 "--localstatedir=/var" 51 "--with-gtk=${gtkVersion}" 52 ]; 53 54 installFlags = [ 55 "sysconfdir=\${out}/etc" 56 "localstatedir=\${TMPDIR}" 57 ]; 58 59 meta = { 60 description = "Library for raising indicators via DBus"; 61 homepage = https://launchpad.net/libindicate; 62 license = with licenses; [ lgpl21 lgpl3 ]; 63 platforms = platforms.linux; 64 maintainers = [ maintainers.msteen ]; 65 }; 66}