guix: Add SSL_CERT_DIR

This commit is contained in:
tecnovert 2022-12-15 10:55:20 +02:00
parent 09ce086790
commit ac07727da7
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
2 changed files with 19 additions and 1 deletions

View file

@ -61,6 +61,8 @@ DASH_VERSION_TAG = os.getenv('DASH_VERSION_TAG', '')
FIRO_VERSION = os.getenv('FIRO_VERSION', '0.14.99.1')
FIRO_VERSION_TAG = os.getenv('FIRO_VERSION_TAG', '')
GUIX_SSL_CERT_DIR = None
known_coins = {
'particl': (PARTICL_VERSION, PARTICL_VERSION_TAG, ('tecnovert',)),
@ -1215,6 +1217,9 @@ def main():
tor_control_password = None
extra_opts = {}
if os.getenv('SSL_CERT_DIR', '') == '' and GUIX_SSL_CERT_DIR is not None:
os.environ['SSL_CERT_DIR'] = GUIX_SSL_CERT_DIR
if os.name == 'nt':
# On windows sending signal.CTRL_C_EVENT to a subprocess causes it to be sent to the parent process too
signal.signal(signal.SIGINT, signal_handler)

View file

@ -5,6 +5,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module (guix download)
#:use-module (guix search-paths)
#:use-module (gnu packages)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages autotools)
@ -21,6 +22,7 @@
#:use-module (gnu packages libffi)
#:use-module (gnu packages license))
(define libsecp256k1-anonswap
(package
(name "libsecp256k1-anonswap")
@ -126,7 +128,18 @@
"023yhncqhp22h7wmkmkj0wc0627vbwlbr6mp5cpjwccalvxziskv"))
(file-name (git-file-name name version))))
(build-system python-build-system)
(arguments `(#:tests? #f)) ; TODO: Add coin binaries
(native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE))
(arguments
'(#:tests? #f ; TODO: Add coin binaries
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-env
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "bin/basicswap_prepare.py"
(("GUIX_SSL_CERT_DIR = None")
(string-append "GUIX_SSL_CERT_DIR = \"" (search-input-directory inputs "etc/ssl/certs") "\"")))
)
))))
(propagated-inputs
(list
gnupg