Skip to content

Commit 9d3753e

Browse files
committed
cleanup
1 parent d2e9d0f commit 9d3753e

File tree

14 files changed

+106
-149
lines changed

14 files changed

+106
-149
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ ClangBuildAnalyzerSession.txt
2727

2828
# guix
2929
/guix
30-
/cargo
3130

3231
# Created by https://www.gitignore.io
3332

contrib/depends/packages/fcmp_pp_rust.mk

Lines changed: 0 additions & 24 deletions
This file was deleted.

contrib/depends/packages/native_binutils.mk

Lines changed: 0 additions & 17 deletions
This file was deleted.

contrib/depends/packages/packages.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
native_packages:=rustc fcmp_pp_rust_deps
1+
native_packages:=fcmp_pp_rust_deps
22
packages:=boost openssl zeromq expat unbound sodium
33

44
hardware_packages := hidapi protobuf libusb
@@ -11,7 +11,7 @@ darwin_native_packages = $(hardware_native_packages)
1111
darwin_packages = ncurses readline $(hardware_packages)
1212

1313
# not really native...
14-
freebsd_native_packages = native_binutils freebsd_base $(hardware_native_packages)
14+
freebsd_native_packages = freebsd_base $(hardware_native_packages)
1515
freebsd_packages = ncurses readline protobuf libusb
1616

1717
linux_packages = eudev ncurses readline $(hardware_packages)

contrib/depends/packages/rustc.mk

Lines changed: 0 additions & 15 deletions
This file was deleted.

contrib/depends/patches/fcmp_pp_rust/cargo.config

Lines changed: 0 additions & 14 deletions
This file was deleted.

contrib/depends/patches/rustc/deblob.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

contrib/guix/cargo.scm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
(gnu packages rust)
55
(gnu packages compression)
66
(gnu packages wget)
7+
(gnu packages gawk)
78
((gnu packages tls) #:select (openssl)))
89

910
(packages->manifest
@@ -17,4 +18,7 @@
1718
tar
1819
gzip
1920
wget
21+
sed
22+
gawk
23+
grep
2024
(list rust "cargo"))))

contrib/guix/libexec/allowed_deps.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
addr2line
2+
adler
3+
ahash
4+
bitvec
5+
blake2
6+
block-buffer
7+
cfg-if
8+
ciphersuite
9+
compiler_builtins
10+
cpufeatures
11+
crypto-bigint
12+
crypto-common
13+
curve25519-dalek
14+
curve25519-dalek-derive
15+
dalek-ff-group
16+
digest
17+
ec-divisors
18+
ff
19+
flexible-transcript
20+
full-chain-membership-proofs
21+
funty
22+
generalized-bulletproofs
23+
generalized-bulletproofs-circuit-abstraction
24+
generalized-bulletproofs-ec-gadgets
25+
generalized-schnorr
26+
generic-array
27+
getrandom
28+
gimli
29+
group
30+
hashbrown
31+
helioselene
32+
hex
33+
keccak
34+
libc
35+
memchr
36+
miniz_oxide
37+
monero-fcmp-plus-plus
38+
monero-generators
39+
monero-io
40+
monero-primitives
41+
multiexp
42+
object
43+
once_cell
44+
proc-macro2
45+
quote
46+
radium
47+
rand_core
48+
rustc-demangle
49+
rustc_version
50+
rustversion
51+
semver
52+
sha2
53+
sha3
54+
spin
55+
std-shims
56+
subtle
57+
syn
58+
tap
59+
typenum
60+
unicode-ident
61+
version_check
62+
wyz
63+
zerocopy
64+
zeroize
65+
zeroize_derive

contrib/guix/libexec/build.sh

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -49,36 +49,6 @@ DISTNAME="monero-${HOST}-${VERSION}"
4949
# Use a fixed timestamp for depends builds so hashes match across commits that don't make changes to the build system
5050
export SOURCE_DATE_EPOCH=1397818193
5151

52-
# Given a package name and an output name, return the path of that output in our
53-
# current guix environment
54-
store_path() {
55-
grep --extended-regexp "/[^-]{32}-${1}-[^-]+${2:+-${2}}" "${GUIX_ENVIRONMENT}/manifest" \
56-
| head --lines=1 \
57-
| sed --expression='s|\x29*$||' \
58-
--expression='s|^[[:space:]]*"||' \
59-
--expression='s|"[[:space:]]*$||'
60-
}
61-
62-
#####################
63-
# Rust Setup #
64-
#####################
65-
66-
RUST_TARGET=$(
67-
case "$HOST" in
68-
x86_64-linux-gnu) echo x86_64-unknown-linux-gnu ;;
69-
aarch64-linux-gnu) echo aarch64-unknown-linux-gnu ;;
70-
arm-linux-gnueabihf) echo armv7-unknown-linux-gnueabihf ;;
71-
riscv64-linux-gnu) echo riscv64gc-unknown-linux-gnu ;;
72-
i686-linux-gnu) echo i686-unknown-linux-gnu ;;
73-
x86_64-w64-mingw32) echo x86_64-pc-windows-gnu ;;
74-
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
75-
arm-linux-androideabi) echo armv7-linux-androideabi ;;
76-
*) echo "$HOST" ;;
77-
esac
78-
)
79-
80-
export RUST_TARGET
81-
8252
#####################
8353
# Environment Setup #
8454
#####################
@@ -92,6 +62,17 @@ printenv | sort | grep -v '^\(BASE_CACHE=\|DISTNAME=\|DISTSRC=\|OUTDIR=\|LOGDIR=
9262
# $HOSTs after successfully building.
9363
BASEPREFIX="${PWD}/contrib/depends"
9464

65+
# Given a package name and an output name, return the path of that output in our
66+
# current guix environment
67+
store_path() {
68+
grep --extended-regexp "/[^-]{32}-${1}-[^-]+${2:+-${2}}" "${GUIX_ENVIRONMENT}/manifest" \
69+
| head --lines=1 \
70+
| sed --expression='s|\x29*$||' \
71+
--expression='s|^[[:space:]]*"||' \
72+
--expression='s|"[[:space:]]*$||'
73+
}
74+
75+
9576
# Set environment variables to point the NATIVE toolchain to the right
9677
# includes/libs
9778
NATIVE_GCC="$(store_path gcc-toolchain)"
@@ -118,8 +99,6 @@ prepend_to_search_env_var() {
11899
# includes/libs for $HOST
119100
case "$HOST" in
120101
*mingw*)
121-
export LD_LIBRARY_PATH="${NATIVE_GCC}/lib"
122-
123102
# Determine output paths to use in CROSS_* environment variables
124103
case "$HOST" in
125104
i686-*) CROSS_GLIBC="$(store_path "mingw-w64-i686-winpthreads")" ;;
@@ -159,16 +138,14 @@ case "$HOST" in
159138
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
160139
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
161140
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
162-
163-
# Todo: remove this hack
164-
export LD_LIBRARY_PATH="/gnu/store/4az5pnqqpkpf4hmfknb0d73jwgx935nm-gcc-12.3.0-lib/lib"
165141
;;
166142
*freebsd*)
167143
;;
168144
*)
169145
exit 1 ;;
170146
esac
171147

148+
# TODO
172149
export LD_LIBRARY_PATH="$(store_path xz)/lib:${NATIVE_GCC}/lib:$(store_path zlib)/lib"
173150

174151
# Sanity check CROSS_*_PATH directories
@@ -332,7 +309,8 @@ mkdir -p "$DISTSRC"
332309
-DCMAKE_EXE_LINKER_FLAGS="${HOST_LDFLAGS}" \
333310
-DCMAKE_SHARED_LINKER_FLAGS="${HOST_LDFLAGS}" \
334311
-DCMAKE_SKIP_RPATH=ON \
335-
-DMANUAL_SUBMODULES=1
312+
-DMANUAL_SUBMODULES=1 \
313+
-DGUIX=1
336314

337315
make -C build --jobs="$JOBS"
338316

0 commit comments

Comments
 (0)