File tree Expand file tree Collapse file tree 3 files changed +65
-8
lines changed Expand file tree Collapse file tree 3 files changed +65
-8
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ pipeline {
77
77
mkdir tmp
78
78
cp ./result/bin/* tmp/
79
79
rm -rf result
80
- nix-build linux-x86-64 -tonlib.nix
80
+ nix-build linux-arm64 -tonlib.nix
81
81
cp ./result/lib/libtonlibjson.so.0.5 tmp/
82
82
cp ./result/lib/libemulator.so tmp/
83
83
'''
@@ -145,7 +145,7 @@ pipeline {
145
145
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.11.tar.gz
146
146
nix-build macos-arm64-static.nix
147
147
'''
148
- sh ' zip -r ton-arm64-m1-macos-portable ./result/*'
148
+ sh ' zip -r ton-arm64-m1-macos-portable ./result/bin/ *'
149
149
archiveArtifacts artifacts : ' ton-arm64-m1-macos-portable.zip'
150
150
}
151
151
}
@@ -173,11 +173,11 @@ pipeline {
173
173
steps {
174
174
timeout(time : 90 , unit : ' MINUTES' ) {
175
175
sh '''
176
- cp assembly/native/build- macos-portable.sh .
177
- chmod +x build-macos-portable.sh
178
- ./build- macos-portable.sh -t -a -o 13.2
176
+ cp assembly/nix/ macos-arm64-* .
177
+ export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.11.tar.gz
178
+ nix-build macos-arm64-static.nix
179
179
'''
180
- sh ' zip -r ton-arm64-m2-macos-portable ./artifacts /*'
180
+ sh ' zip -r ton-arm64-m2-macos-portable ./result/bin /*'
181
181
archiveArtifacts artifacts : ' ton-arm64-m2-macos-portable.zip'
182
182
}
183
183
}
Original file line number Diff line number Diff line change
1
+ # export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
2
+ {
3
+ pkgs ? import <nixpkgs> { system = builtins . currentSystem ; }
4
+ , lib ? pkgs . lib
5
+ , stdenv ? pkgs . stdenv
6
+ } :
7
+ let
8
+ system = "x86_64-linux" ;
9
+
10
+ nixos1909 = ( import ( builtins . fetchTarball {
11
+ url = "https://channels.nixos.org/nixos-19.09/nixexprs.tar.xz" ;
12
+ sha256 = "1vp1h2gkkrckp8dzkqnpcc6xx5lph5d2z46sg2cwzccpr8ay58zy" ;
13
+ } ) { inherit system ; } ) ;
14
+ glibc227 = nixos1909 . glibc // { pname = "glibc" ; } ;
15
+ stdenv227 = let
16
+ cc = pkgs . wrapCCWith {
17
+ cc = nixos1909 . buildPackages . gcc-unwrapped ;
18
+ libc = glibc227 ;
19
+ bintools = pkgs . binutils . override { libc = glibc227 ; } ;
20
+ } ;
21
+ in ( pkgs . overrideCC pkgs . stdenv cc ) ;
22
+
23
+ in
24
+ stdenv227 . mkDerivation {
25
+ pname = "ton" ;
26
+ version = "dev-lib" ;
27
+
28
+ src = ./. ;
29
+
30
+ nativeBuildInputs = with pkgs ;
31
+ [ cmake ninja git pkg-config ] ;
32
+
33
+ buildInputs = with pkgs ;
34
+ [
35
+ pkgsStatic . openssl pkgsStatic . zlib pkgsStatic . libmicrohttpd . dev pkgsStatic . libsodium . dev pkgsStatic . secp256k1
36
+ ] ;
37
+
38
+ dontAddStaticConfigureFlags = false ;
39
+
40
+ configureFlags = [
41
+
42
+ ] ;
43
+
44
+
45
+ cmakeFlags = [
46
+ "-DTON_USE_ABSEIL=OFF"
47
+ "-DNIX=ON"
48
+ ] ;
49
+
50
+ LDFLAGS = [
51
+ "-static-libgcc" "-static-libstdc++" "-fPIC"
52
+ ] ;
53
+
54
+ ninjaFlags = [
55
+ "tonlibjson" "emulator"
56
+ ] ;
57
+
58
+ }
Original file line number Diff line number Diff line change @@ -38,6 +38,5 @@ pkgs.stdenv.mkDerivation { # gcc
38
38
39
39
LDFLAGS = [
40
40
"-static-libgcc" "-static-libstdc++" "-fPIC" "--enable-static-pie" "-static"
41
- ] ;
42
-
41
+ ] ;
43
42
}
You can’t perform that action at this time.
0 commit comments