nixpkgs/pkgs/os-specific/windows/pthread-w32/default.nix

30 lines
748 B
Nix
Raw Normal View History

2019-08-14 11:15:27 +02:00
{ stdenv, fetchzip }:
2019-08-14 11:15:27 +02:00
stdenv.mkDerivation rec {
2019-08-13 23:52:01 +02:00
pname = "pthreads-w32";
2019-08-14 11:15:27 +02:00
version = "2.9.1";
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";
};
2019-08-14 11:15:27 +02:00
makeFlags = [ "CROSS=${stdenv.cc.targetPrefix}" "GC-static" ];
2019-08-14 11:15:27 +02:00
installPhase = ''
runHook preInstall
2019-08-14 11:15:27 +02:00
install -D libpthreadGC2.a $out/lib/libpthread.a
2019-08-14 11:15:27 +02:00
runHook postInstall
'';
2019-08-14 11:15:27 +02:00
meta = with stdenv.lib; {
description = "POSIX threads library for Windows";
homepage = "https://sourceware.org/pthreads-win32";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ yegortimoshenko ];
platforms = platforms.windows;
};
}