nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 84 lines 1.6 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 ninja, 7 libGL, 8 libGLU, 9 libpng, 10 libjpeg_turbo, 11 libuv, 12 libvorbis, 13 mbedtls_2, 14 openal, 15 pcre, 16 SDL2, 17 sqlite, 18}: 19 20stdenv.mkDerivation rec { 21 pname = "hashlink"; 22 version = "1.15"; 23 24 src = fetchFromGitHub { 25 owner = "HaxeFoundation"; 26 repo = "hashlink"; 27 rev = version; 28 sha256 = "sha256-nVr+fDdna8EEHvIiXsccWFRTYzXfb4GG1zrfL+O6zLA="; 29 }; 30 31 # incompatible pointer type error: const char ** -> const void ** 32 postPatch = '' 33 substituteInPlace libs/sqlite/sqlite.c \ 34 --replace-warn \ 35 "sqlite3_prepare16_v2(db->db, sql, -1, &r->r, &tl)" \ 36 "sqlite3_prepare16_v2(db->db, sql, -1, &r->r, (const void**)&tl)" 37 ''; 38 39 buildInputs = [ 40 libGL 41 libGLU 42 libjpeg_turbo 43 libpng 44 libuv 45 libvorbis 46 mbedtls_2 47 openal 48 pcre 49 SDL2 50 sqlite 51 ]; 52 53 nativeBuildInputs = [ 54 cmake 55 ninja 56 ]; 57 58 # append default installPhase with library install for haxe 59 postInstall = 60 let 61 haxelibPath = "$out/lib/haxe/hashlink/${lib.replaceStrings [ "." ] [ "," ] version}"; 62 in 63 '' 64 mkdir -p "${haxelibPath}" 65 echo -n "${version}" > "${haxelibPath}/../.current" 66 cp -r ../other/haxelib/* "${haxelibPath}" 67 ''; 68 69 meta = { 70 description = "Virtual machine for Haxe"; 71 mainProgram = "hl"; 72 homepage = "https://hashlink.haxe.org/"; 73 license = lib.licenses.mit; 74 platforms = [ 75 "x86_64-linux" 76 "x86_64-darwin" 77 ]; 78 maintainers = with lib.maintainers; [ 79 iblech 80 locallycompact 81 logo 82 ]; 83 }; 84}