Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 43 lines 1.0 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchurl, 5 crt ? stdenvNoCC.hostPlatform.libc, 6}: 7assert lib.assertOneOf "crt" crt [ 8 "msvcrt" 9 "ucrt" 10]; 11stdenvNoCC.mkDerivation (finalAttrs: { 12 pname = "mingw_w64-headers"; 13 version = "12.0.0"; 14 15 src = fetchurl { 16 url = "mirror://sourceforge/mingw-w64/mingw-w64-v${finalAttrs.version}.tar.bz2"; 17 hash = "sha256-zEGJiqxLbo3Vz/1zMbnZUVuRLfRCCjphK16ilVu+7S8="; 18 }; 19 20 configureFlags = [ 21 (lib.withFeatureAs true "default-msvcrt" crt) 22 ]; 23 24 preConfigure = '' 25 cd mingw-w64-headers 26 ''; 27 28 meta = { 29 homepage = "https://www.mingw-w64.org/"; 30 downloadPage = "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/"; 31 description = "Collection of headers and libraries for building native Windows applications"; 32 license = with lib.licenses; [ 33 # Primarily under 34 zpl21 35 # A couple files 36 mit 37 # Certain headers imported from Wine 38 lgpl21Plus 39 ]; 40 platforms = lib.platforms.windows; 41 teams = [ lib.teams.windows ]; 42 }; 43})