mirror of
				https://github.com/ton-blockchain/ton
				synced 2025-03-09 15:40:10 +00:00 
			
		
		
		
	* Compress block candidates in validator-session * Compress blocks in full-node (disabled for now) * test pipeline with lz4 * tonlib compilation required lz4; try win compile; * install lz4 on mac. * wip, test builds * remove FindLZ4.cmake * fix typo * fix wasm lz4 path * increase groovy timeout to 120 sec * add lz4 for android and emscripten builds * add lz4 for android and emscripten builds * fix win build include path for lz4 * add precompiled lz4 for android * cleanup * adjust android include dir for lz4 * fix path for android arm of lz4 * cleanup * minor fix --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
		
			
				
	
	
		
			54 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
# export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.11.tar.gz
 | 
						|
# copy linux-x86-64-tonlib.nix to git root directory and execute:
 | 
						|
# nix-build linux-x86-64-tonlib.nix
 | 
						|
{
 | 
						|
  pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
 | 
						|
, lib ? pkgs.lib
 | 
						|
, stdenv ? pkgs.stdenv
 | 
						|
}:
 | 
						|
let
 | 
						|
      system = builtins.currentSystem;
 | 
						|
 | 
						|
          nixos1909 = (import (builtins.fetchTarball {
 | 
						|
            url = "https://channels.nixos.org/nixos-19.09/nixexprs.tar.xz";
 | 
						|
            sha256 = "1vp1h2gkkrckp8dzkqnpcc6xx5lph5d2z46sg2cwzccpr8ay58zy";
 | 
						|
          }) { inherit system; });
 | 
						|
          glibc227 = nixos1909.glibc // { pname = "glibc"; };
 | 
						|
          stdenv227 = let
 | 
						|
            cc = pkgs.wrapCCWith {
 | 
						|
              cc = nixos1909.buildPackages.gcc-unwrapped;
 | 
						|
              libc = glibc227;
 | 
						|
              bintools = pkgs.binutils.override { libc = glibc227; };
 | 
						|
            };
 | 
						|
          in (pkgs.overrideCC pkgs.stdenv cc);
 | 
						|
 | 
						|
in
 | 
						|
stdenv227.mkDerivation {
 | 
						|
  pname = "ton";
 | 
						|
  version = "dev-lib";
 | 
						|
 | 
						|
  src = ./.;
 | 
						|
 | 
						|
  nativeBuildInputs = with pkgs;
 | 
						|
    [ cmake ninja git pkg-config ];
 | 
						|
 | 
						|
  buildInputs = with pkgs;
 | 
						|
    [
 | 
						|
      pkgsStatic.openssl pkgsStatic.zlib pkgsStatic.libmicrohttpd.dev pkgsStatic.libsodium.dev pkgsStatic.secp256k1 pkgsStatic.lz4
 | 
						|
    ];
 | 
						|
 | 
						|
  dontAddStaticConfigureFlags = false;
 | 
						|
 | 
						|
  cmakeFlags = [
 | 
						|
    "-DTON_USE_ABSEIL=OFF"
 | 
						|
    "-DNIX=ON"
 | 
						|
  ];
 | 
						|
 | 
						|
  LDFLAGS = [
 | 
						|
     "-static-libgcc" "-static-libstdc++" "-fPIC"
 | 
						|
  ];
 | 
						|
 | 
						|
  ninjaFlags = [
 | 
						|
    "tonlibjson" "emulator"
 | 
						|
  ];
 | 
						|
}
 |