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