2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchzip }:
|
2012-01-30 10:53:45 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "pthreads-w32";
|
2019-08-14 11:15:27 +02:00
|
|
|
version = "2.9.1";
|
2012-01-30 10:53:45 +01:00
|
|
|
|
2019-08-14 11:15:27 +02:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz";
|
|
|
|
sha256 = "1s8iny7g06z289ahdj0kzaxj0cd3wvjbd8j3bh9xlg7g444lhy9w";
|
2012-01-30 10:53:45 +01:00
|
|
|
};
|
|
|
|
|
2019-08-14 11:15:27 +02:00
|
|
|
makeFlags = [ "CROSS=${stdenv.cc.targetPrefix}" "GC-static" ];
|
2012-01-30 10:53:45 +01:00
|
|
|
|
2019-08-14 11:15:27 +02:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2012-01-30 10:53:45 +01:00
|
|
|
|
2019-08-14 11:15:27 +02:00
|
|
|
install -D libpthreadGC2.a $out/lib/libpthread.a
|
2012-01-30 10:53:45 +01:00
|
|
|
|
2019-08-14 11:15:27 +02:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
2012-01-30 10:53:45 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-08-14 11:15:27 +02:00
|
|
|
description = "POSIX threads library for Windows";
|
|
|
|
homepage = "https://sourceware.org/pthreads-win32";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ yegortimoshenko ];
|
|
|
|
platforms = platforms.windows;
|
2012-01-30 10:53:45 +01:00
|
|
|
};
|
|
|
|
}
|