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