Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ let
inherit (sources.ton) owner repo rev;
# sadly, not the one niv comes up with. add this check
# to make sure people update the hash
sha256 = if version == "ceaed40" then
"1znikk7l2pv5mdl9rh59dljdrqkbwnazlpdjr4yfc87bcynb1rbz" else
"0000000000000000000000000000000000000000000000000000";
hash = if version == "ae5c072" then
"sha256-6sKA3CPcMkkzLpMJULqGWcLg/INLOK5pVaNbljSIwIs=" else
"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
fetchSubmodules = true;
};
in
Expand Down
22 changes: 11 additions & 11 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "444c1ad4896ace10b97ab5becede1ceeced0a90c",
"sha256": "199nhdwlnk4wn4kgqyjq9z5cwlajjq7j3i4f54ihc1l9b9rggfd8",
"rev": "5830a4dd348d77e39a0f3c4c762ff2663b602d4c",
"sha256": "1d3lsrqvci4qz2hwjrcnd8h5vfkg8aypq3sjd4g3izbc8frwz5sm",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/444c1ad4896ace10b97ab5becede1ceeced0a90c.tar.gz",
"url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixos-19.03",
"branch": "nixos-unstable",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs-channels",
"rev": "5f7eae4bbb15ce7fa4da1984fd6ba5be7af50952",
"sha256": "00bzh394dqlwyh53lsd5vj8jdy9pr30rp52q8q5z6h5kw2lr1byf",
"rev": "4762fba469e2baa82f983b262e2c06ac2fdaae67",
"sha256": "1sidky93vc2bpnwb8avqlym1p70h2szhkfiam549377v9r5ld2r1",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/5f7eae4bbb15ce7fa4da1984fd6ba5be7af50952.tar.gz",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/4762fba469e2baa82f983b262e2c06ac2fdaae67.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ton": {
"branch": "master",
"description": null,
"homepage": null,
"owner": "ton-blockchain",
"owner": "newton-blockchain",
"repo": "ton",
"rev": "ceaed40ac4871ffaeb5b493586ab6f0899fd490d",
"sha256": "1p3kg2l7h6nfnjizf0xgs7090037v60zz8qmqamvf9y71ic9cr7f",
"rev": "ae5c0720143e231c32c3d2034cfe4e533a16d969",
"sha256": "0rwrgndydwgrpfkvpgflmxj820rrgpcw1plp6rwy15153h23hqiz",
"type": "tarball",
"url": "https://github.com/ton-blockchain/ton/archive/ceaed40ac4871ffaeb5b493586ab6f0899fd490d.tar.gz",
"url": "https://github.com/newton-blockchain/ton/archive/ae5c0720143e231c32c3d2034cfe4e533a16d969.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
3 changes: 2 additions & 1 deletion pkgs/all.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, stdenv, lib
, cmake, pkgconfig
, openssl, readline, zlib
, git
, libmicrohttpd
}:

Expand All @@ -18,5 +19,5 @@ stdenv.mkDerivation rec {
[ ./patches/tonlib-cmake-config.patch ./patches/install-binaries.patch ];

nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ openssl readline zlib libmicrohttpd ];
buildInputs = [ openssl readline zlib libmicrohttpd git ];
}
24 changes: 15 additions & 9 deletions pkgs/patches/install-binaries.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,39 @@
# SPDX-License-Identifier: LGPL-2.0-or-later

diff --git a/lite-client/CMakeLists.txt b/lite-client/CMakeLists.txt
index a1afd52..f45dac2 100644
index b844951..c71ec85 100644
--- a/lite-client/CMakeLists.txt
+++ b/lite-client/CMakeLists.txt
@@ -6,3 +6,10 @@ target_link_libraries(lite-client-common PUBLIC tdutils tdactor adnllite tl_api
add_executable(lite-client lite-client.cpp lite-client.h)
@@ -7,4 +7,9 @@ add_executable(lite-client lite-client.cpp lite-client.h)
target_link_libraries(lite-client tdutils tdactor adnllite tl_api tl_lite_api tl-lite-utils ton_crypto ton_block
terminal lite-client-common)
+
terminal lite-client-common git)

-install(TARGETS lite-client RUNTIME DESTINATION bin)
+install(TARGETS lite-client
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ INCLUDES DESTINATION include
+)
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index c4207bb..36caf8f 100644
index 25df572..55b8a67 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -14,3 +14,11 @@ add_executable(json2tlo json2tlo.cpp )
target_link_libraries(json2tlo tl_api ton_crypto keys )
@@ -15,9 +15,15 @@ target_link_libraries(json2tlo tl_api ton_crypto keys git)
target_include_directories(json2tlo PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/..)
+

+
+install(TARGETS generate-random-id json2tlo
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ INCLUDES DESTINATION include
+)
+
add_executable(pack-viewer pack-viewer.cpp )
target_link_libraries(pack-viewer tl_api ton_crypto keys validator tddb)
target_include_directories(pack-viewer PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/..)
-
-install(TARGETS generate-random-id RUNTIME DESTINATION bin)
2 changes: 1 addition & 1 deletion pkgs/patches/tonlib-cmake-config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ index 0000000..4d4080b
+@PACKAGE_INIT@
+include ("${CMAKE_CURRENT_LIST_DIR}/TonlibTargets.cmake")%
diff --git a/tonlib/CMakeLists.txt b/tonlib/CMakeLists.txt
index 9b9b81d..473bc48 100644
index 5b6530a..d8102bc 100644
--- a/tonlib/CMakeLists.txt
+++ b/tonlib/CMakeLists.txt
@@ -154,12 +154,19 @@ install(EXPORT Tonlib
Expand Down