1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-15 04:32:21 +00:00
ton/assembly/nix/linux-x86-64-static.nix
neodix42 b7849249c6
lz4 support in multiple builds (#946)
* 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>
2024-03-28 10:18:11 +03:00

46 lines
1.1 KiB
Nix

# export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
, lib ? pkgs.lib
, stdenv ? pkgs.stdenv
, testing ? false
}:
let
microhttpdmy = (import ./microhttpd.nix) {};
in
with import microhttpdmy;
stdenv.mkDerivation {
pname = "ton";
version = "dev-bin";
src = ./.;
nativeBuildInputs = with pkgs;
[
cmake ninja git pkg-config
];
buildInputs = with pkgs;
[
pkgsStatic.openssl microhttpdmy pkgsStatic.zlib pkgsStatic.libsodium.dev pkgsStatic.secp256k1 glibc.static pkgsStatic.lz4
];
makeStatic = true;
doCheck = testing;
cmakeFlags = [
"-DTON_USE_ABSEIL=OFF"
"-DNIX=ON"
"-DBUILD_SHARED_LIBS=OFF"
"-DCMAKE_LINK_SEARCH_START_STATIC=ON"
"-DCMAKE_LINK_SEARCH_END_STATIC=ON"
"-DMHD_FOUND=1"
"-DMHD_INCLUDE_DIR=${microhttpdmy}/usr/local/include"
"-DMHD_LIBRARY=${microhttpdmy}/usr/local/lib/libmicrohttpd.a"
"-DCMAKE_CTEST_ARGUMENTS=--timeout;1800"
];
LDFLAGS = [
"-static-libgcc" "-static-libstdc++" "-static"
];
}