@@ -1,15 +1,29 @@
1−{stdenv, fetchurl, xlibsWrapper}:
1+{stdenv, lib, fetchFromGitHub, libX11, autoreconfHook }:
22
3−stdenv.mkDerivation {
4− name = "xsel-1.2.0";
5− src = fetchurl {
6− url = http://www.vergenet.net/~conrad/software/xsel/download/xsel-1.2.0.tar.gz;
7− sha256 = "070lbcpw77j143jrbkh0y1v10ppn1jwmjf92800w7x42vh4cw9xr";
3+stdenv.mkDerivation rec {
4+ name = "xsel-unstable-${version}";
5+
6+ version = "2016-09-02";
7+
8+ src = fetchFromGitHub {
9+ owner = "kfish";
10+ repo = "xsel";
11+ rev = "aa7f57eed805adb09e9c59c8ea841870e8206b81";
12+ sha256 = "04mrc8j0rr7iy1k6brfxnx26pmxm800gh4nqrxn6j2lz6vd5y9m5";
813 };
914
10− buildInputs = [xlibsWrapper];
15+ buildInputs = [ libX11 autoreconfHook ];
16+
17+ # We need a README file, otherwise autoconf complains.
18+ postUnpack = ''
19+ mv $sourceRoot/README{.md,}
20+ '';
1121
12− meta = {
13− platforms = stdenv.lib.platforms.unix;
22+ meta = with lib; {
23+ description = "Command-line program for getting and setting the contents of the X selection";
24+ homepage = "http://www.kfish.org/software/xsel";
25+ license = licenses.mit;
26+ maintainers = [ maintainers.cstrahan ];
27+ platforms = lib.platforms.unix;
1428 };
1529}