summary refs log tree commit diff
path: root/pkgs/development/libraries/libclxclient/default.nix
blob: 4dc103515ac70b11ebc449865d0b9d7df4a8a117 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ stdenv, fetchurl, libclthreads, libX11, libXft, xlibs }:

stdenv.mkDerivation rec {
  name = "libclxclient-${version}";
  version = "3.9.0";

  src = fetchurl {
    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/clxclient-${version}.tar.bz2";
    sha256 = "14l7xrh964gllymraq4n5pgax94p5jsfjslqi5c6637zc4lmgnl0";
  };

  buildInputs = [ libclthreads libX11 libXft xlibs.xproto ];

  NIX_CFLAGS_COMPILE = "-I${xlibs.xproto}/include -I${libXft}/include";

  patchPhase = ''
    sed -e "s@ldconfig@@" -i Makefile
  '';

  makeFlags = [
    "PREFIX=$(out)"
    "SUFFIX=''"
  ];

  preInstall = ''
    # The Makefile does not create the include directory
    mkdir -p $out/include
  '';

  postInstall = ''
    ln $out/lib/libclxclient.so $out/lib/libclxclient.so.3
  '';

  meta = with stdenv.lib; {
    description = "Zita X11 library";
    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
    license = licenses.lgpl21;
    maintainers = with maintainers; [ magnetophon ];
    platforms = platforms.linux;
  };
}