lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v206 61 lines 2.2 kB view raw
1{ fetchurl, stdenv, mingw_headers }: 2 3# This file is tweaked for cross-compilation only. 4assert stdenv ? cross; 5 6stdenv.mkDerivation { 7 name = "pthread-w32-1.10.0"; 8 9 src = fetchurl { 10 url = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-1-10-0-release.tar.gz"; 11 sha256 = "1vllxxfa9a7mssb1x98a2r736vsv5ll3sjizbr7a8hw8j9p18j7n"; 12 }; 13 14 configurePhase = 15 '' sed -i GNUmakefile \ 16 -e 's/CC=gcc/CC=i686-pc-mingw32-gcc/g ; 17 s/windres/i686-pc-mingw32-windres/g ; 18 s/dlltool/i686-pc-mingw32-dlltool/g' 19 ''; 20 21 buildInputs = [ mingw_headers ]; 22 23 buildPhase = "make GC"; # to build the GNU C dll with C cleanup code 24 25 installPhase = 26 '' mkdir -p "$out" "$out/include" "$out/lib" 27 cp -v *pthread*{dll,a} "$out/lib" 28 cp -v pthread.h semaphore.h sched.h "$out/include" 29 ''; 30 31 postFixup = 32 # By default `mingw_headers' is propagated. Prevent that, because 33 # otherwise MinGW headers appear twice in `-I', and thus the 34 # "#include_next <float.h>" in MinGW's <float.h> picks up itself instead 35 # of picking up GCC's (hence, FLT_RADIX is left undefined, for instance.) 36 '' rm -f "$out/nix-support/propagated-build-inputs" 37 ''; 38 39 meta = { 40 description = "POSIX threads for Woe32"; 41 42 longDescription = 43 '' The POSIX 1003.1-2001 standard defines an application programming 44 interface (API) for writing multithreaded applications. This 45 interface is known more commonly as pthreads. A good number of 46 modern operating systems include a threading library of some kind: 47 Solaris (UI) threads, Win32 threads, DCE threads, DECthreads, or any 48 of the draft revisions of the pthreads standard. The trend is that 49 most of these systems are slowly adopting the pthreads standard API, 50 with application developers following suit to reduce porting woes. 51 52 Woe32 does not, and is unlikely to ever, support pthreads natively. 53 This project seeks to provide a freely available and high-quality 54 solution to this problem. 55 ''; 56 57 homepage = http://sourceware.org/pthreads-win32/; 58 59 license = stdenv.lib.licenses.lgpl21Plus; 60 }; 61}