Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchzip }:
2
3stdenv.mkDerivation {
4 pname = "pthreads-w32";
5 version = "2.9.1";
6
7 src = fetchzip {
8 url = "https://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz";
9 sha256 = "1s8iny7g06z289ahdj0kzaxj0cd3wvjbd8j3bh9xlg7g444lhy9w";
10 };
11
12 makeFlags = [ "CROSS=${stdenv.cc.targetPrefix}" "GC-static" ];
13
14 installPhase = ''
15 runHook preInstall
16
17 install -D libpthreadGC2.a $out/lib/libpthread.a
18
19 runHook postInstall
20 '';
21
22 meta = with lib; {
23 description = "POSIX threads library for Windows";
24 homepage = "https://sourceware.org/pthreads-win32";
25 license = licenses.lgpl21Plus;
26 maintainers = with maintainers; [ yana ];
27 platforms = platforms.windows;
28 };
29}