solana/sdk/cargo-build-bpf
Kenta Iwasaki 4ad7069827 cargo-build-bpf: allow sdk path to be set by environment variables
In many Linux distros such as NixOS, the directory in which packages are
installed is assumed to be read-only. To work around this, it is
expected that the filepaths which packaged CLI tools take in are able to
be freely configured through either 1) command-line flags, 2)
environment variables, or 3) a configuration file.

In this commit, environment variables 'BPF_SDK_PATH' and 'BPF_OUT_PATH',
which map respectively to command-line flags '--bpf-sdk-path' and
'--bpf-out-dir', are now handled in cargo-build-bpf.

Additionally, given that arbitrary filepaths may now be set in which the
BPF SDK is located, the requirement in which
'$BPF_SDK_PATH/dependencies/bpf-tools' must strictly be a symbolic link
to the directory '$HOME/.cache/solana/${bpf-tools.version}/bpf-tools has
been relaxed.

Ideally, the directory in which bpf-tools is expected to be downloaded
to and stored should be configurable. Though, this commit serves as a
temporary fix which enables NixOS users to now start being able to build
applications with the Solana SDK.
2021-08-30 23:11:48 +02:00
..
src cargo-build-bpf: allow sdk path to be set by environment variables 2021-08-30 23:11:48 +02:00
tests Generate a script to rerun the failed sub-command in cargo-test-bpf (#18582) 2021-07-15 01:02:42 +00:00
.gitignore Add cargo-build-bpf integration tests 2021-07-01 06:47:25 -07:00
Cargo.toml change untar to use unpack instead of unpack_in (#19216) 2021-08-18 15:49:02 -05:00