1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
8 url = "mirror://gnu/pth/pth-${version}.tar.gz";
9 sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj";
12 preConfigure = lib.optionalString stdenv.isAarch32 ''
13 configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9")
14 '' + lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
15 configureFlagsArray+=("ac_cv_check_sjlj=ssjlj")
18 # Fails parallel build due to missing dependency on autogenrated
20 # ./shtool scpp -o pth_p.h ...
21 # ./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_uctx.c
22 # pth_uctx.c:31:10: fatal error: pth_p.h: No such file
23 enableParallelBuilding = false;
26 description = "The GNU Portable Threads library";
27 homepage = "https://www.gnu.org/software/pth";
28 license = licenses.lgpl21Plus;
29 platforms = platforms.all;