1{
2 lib,
3 stdenv,
4 fetchurl,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "libclthreads";
9 version = "2.4.2";
10
11 src = fetchurl {
12 url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/clthreads-${version}.tar.bz2";
13 sha256 = "0cbs1w89q8wfjrrhvxf6xk0y02nkjl5hd0yb692c8ma01i6b2nf6";
14 };
15
16 patchPhase = ''
17 cd source
18 # don't run ldconfig:
19 sed -e "/ldconfig/d" -i ./Makefile
20 '';
21
22 makeFlags = [
23 "PREFIX=$(out)"
24 "SUFFIX=''"
25 ];
26
27 preInstall = ''
28 # The Makefile does not create the include and lib directories
29 mkdir -p $out/include
30 mkdir -p $out/lib
31 '';
32
33 postInstall = ''
34 ln $out/lib/libclthreads.so $out/lib/libclthreads.so.2
35 '';
36
37 meta = with lib; {
38 description = "Zita thread library";
39 homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
40 license = licenses.lgpl21;
41 maintainers = with maintainers; [ magnetophon ];
42 platforms = platforms.linux;
43 };
44}