summary refs log tree commit diff
path: root/pkgs/development/libraries/libclxclient/default.nix
blob: 7d0e4596dd0b377bcdf80ce508704625a8df2fc1 (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
{ stdenv, fetchurl, libclthreads, libXft, libX11, 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 libXft libX11 xlibs.xproto
  ];

  configurePhase = ''
    cpp -v
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${xlibs.xproto}/include"
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libXft}/include"
    echo $NIX_CFLAGS_COMPILE
    sed -e "s@/usr/local@$out@" -i Makefile
    sed -e "s@#include <clthreads.h>@#include <${libclthreads}/include>@" -i clxclient.h
    sed -e "s@ldconfig@@" -i Makefile
    sed -e "s@SUFFIX :=.*@SUFFIX =@" -i Makefile
  '';

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

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