mirror of
				https://github.com/ton-blockchain/ton
				synced 2025-03-09 15:40:10 +00:00 
			
		
		
		
	* use jemalloc in portable builds; also avoid mixing musl with glibc artifacts in nix builds; * minor fix for ubuntu arm nix build
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			814 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			814 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#/bin/bash
 | 
						|
 | 
						|
nix-build --version
 | 
						|
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
 | 
						|
 | 
						|
with_tests=false
 | 
						|
 | 
						|
 | 
						|
while getopts 't' flag; do
 | 
						|
  case "${flag}" in
 | 
						|
    t) with_tests=true ;;
 | 
						|
    *) break
 | 
						|
       ;;
 | 
						|
  esac
 | 
						|
done
 | 
						|
 | 
						|
cp assembly/nix/macos-* .
 | 
						|
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
 | 
						|
 | 
						|
if [ "$with_tests" = true ]; then
 | 
						|
  nix-build macos-static.nix --arg testing true
 | 
						|
else
 | 
						|
  nix-build macos-static.nix
 | 
						|
fi
 | 
						|
 | 
						|
mkdir -p artifacts/lib
 | 
						|
cp ./result-bin/bin/* artifacts/
 | 
						|
test $? -eq 0 || { echo "No artifacts have been built..."; exit 1; }
 | 
						|
chmod +x artifacts/*
 | 
						|
rm -rf result-bin
 | 
						|
 | 
						|
nix-build macos-tonlib.nix
 | 
						|
 | 
						|
cp ./result/lib/libtonlibjson.dylib artifacts/
 | 
						|
cp ./result/lib/libemulator.dylib artifacts/
 | 
						|
cp ./result/lib/fift/* artifacts/lib/
 | 
						|
cp -r ./result/share/ton/smartcont artifacts/
 |