{ stdenv, fetchurl, x11, libXmu }:

stdenv.mkDerivation rec {
  name = "xclip-0.12";

  src = fetchurl {
    url = "mirror://sourceforge/xclip/${name}.tar.gz";
    sha256 = "0ibcf46rldnv0r424qcnai1fa5iq3lm5q5rdd7snsi5sb78gmixp";
  };

  buildInputs = [ x11 libXmu ];

  meta = { 
    description = "Tool to access the X clipboard from a console application";
    homepage = http://sourceforge.net/projects/xclip/;
    license = stdenv.lib.licenses.gpl2;
  };
}

{ stdenv, fetchsvn, x11, libXmu, autoconf, automake, libtool }:

stdenv.mkDerivation rec {
  # The last release from 2012, 0.12, lacks '-targets'
  name = "xclip-0.12-svn-20140209";

  src = fetchsvn {
    url = "svn://svn.code.sf.net/p/xclip/code/trunk";
    sha256 = "0d6r38xas5l79l700sdm14l41vvjqhah613367ha8kcvx54zkddz";
  };

  preConfigure = "autoreconf -vfi";

  buildInputs = [ x11 libXmu autoconf automake libtool ];

  meta = { 
    description = "Tool to access the X clipboard from a console application";
    homepage = http://sourceforge.net/projects/xclip/;
    license = stdenv.lib.licenses.gpl2;
  };
}

Update xclip to a more recent version (svn)
Update xclip to a more recent version (svn)

This can do -target, so it can work with images.

(cherry picked from commit 58a004999b6721fb8e55e397c0c3293d4f96fb7b)
