1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

libclxclient: reacfor & fix include directory

This commit is contained in:
codyopel 2015-05-28 00:26:17 -04:00
parent 201059f728
commit 2906376ddc

View file

@ -1,38 +1,41 @@
{ stdenv, fetchurl, libclthreads, libXft, libX11, xlibs }:
{ 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 libXft libX11 xlibs.xproto
];
buildInputs = [ libclthreads libX11 libXft 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
NIX_CFLAGS_COMPILE = "-I${xlibs.xproto}/include -I${libXft}/include";
patchPhase = ''
sed -e "s@ldconfig@@" -i Makefile
sed -e "s@SUFFIX :=.*@SUFFIX =@" -i Makefile
'';
fixupPhase = ''
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 = {
description = "zita X11 library";
version = "${version}";
meta = with stdenv.lib; {
description = "Zita X11 library";
homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
license = stdenv.lib.licenses.lgpl21;
maintainers = [ stdenv.lib.maintainers.magnetophon ];
platforms = stdenv.lib.platforms.linux;
license = licenses.lgpl21;
maintainers = with maintainers; [ magnetophon ];
platforms = platforms.linux;
};
}