Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 fetchurl, 4 lib, 5 file, 6 pkg-config, 7 glib, 8 gtkVersion ? "3", 9 gtk2, 10 gtk3, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "libindicator-gtk${gtkVersion}"; 15 version = "12.10.1"; 16 17 src = fetchurl { 18 url = "https://launchpad.net/libindicator/${lib.versions.majorMinor version}/${version}/+download/libindicator-${version}.tar.gz"; 19 sha256 = "b2d2e44c10313d5c9cd60db455d520f80b36dc39562df079a3f29495e8f9447f"; 20 }; 21 22 strictDeps = true; 23 24 nativeBuildInputs = [ 25 pkg-config 26 glib 27 ]; 28 29 buildInputs = [ (if gtkVersion == "2" then gtk2 else gtk3) ]; 30 31 postPatch = '' 32 substituteInPlace configure \ 33 --replace 'LIBINDICATOR_LIBS+="$LIBM"' 'LIBINDICATOR_LIBS+=" $LIBM"' 34 for f in {build-aux/ltmain.sh,configure,m4/libtool.m4}; do 35 substituteInPlace $f\ 36 --replace /usr/bin/file ${file}/bin/file 37 done 38 ''; 39 40 configureFlags = [ 41 "CFLAGS=-Wno-error" 42 "--sysconfdir=/etc" 43 "--localstatedir=/var" 44 "--with-gtk=${gtkVersion}" 45 ]; 46 47 installFlags = [ 48 "sysconfdir=\${out}/etc" 49 "localstatedir=\${TMPDIR}" 50 ]; 51 52 doCheck = false; # fails 8 out of 8 tests 53 54 meta = with lib; { 55 description = "Set of symbols and convenience functions for Ayatana indicators"; 56 homepage = "https://launchpad.net/libindicator"; 57 license = licenses.gpl3; 58 platforms = platforms.linux; 59 maintainers = [ maintainers.msteen ]; 60 }; 61}