From 8d529327a43db2ba678c33e5adcfbe439421ca05 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 30 Jan 2025 12:31:12 -0500 Subject: [PATCH] build: Let's go back to nix trying to use its own OpenSSL. --- GNUmakefile | 3 ++- default.nix | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index a755d3cc..93fb08b6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,6 +35,7 @@ BUNDLETOOL = out/bundletool.jar HAVE_WIN := 0 HAVE_CROSS_AARCH64 := 0 +USE_SYSTEM_SSL := 0 export SOURCE_DATE_EPOCH=1 export TZ=UTC @@ -1144,7 +1145,7 @@ ifeq ($(UNAME_S),Linux) LOCAL_DEPS := deps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/lib/libssl.a $(LOCAL_DEPS): +@/usr/bin/env bash tools/ssl-local -$(filter $(BUILD_DIR)/debug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/release/%,$(APP_OBJS)): | $(LOCAL_DEPS) +$(filter $(BUILD_DIR)/debug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/release/%,$(APP_OBJS)): $(if $(USE_SYSTEM_SSL), , | $(LOCAL_DEPS)) ifeq ($(HAVE_CROSS_AARCH64),1) LOCAL_DEPS := deps/openssl/$(UNAME_S)/aarch64/usr/local/lib/libssl.a diff --git a/default.nix b/default.nix index 465f2889..735f7ff2 100644 --- a/default.nix +++ b/default.nix @@ -33,19 +33,20 @@ pkgs.stdenv.mkDerivation rec { }; nativeBuildInputs = with pkgs; [ - bash glibc gnumake + openssl which ]; buildInputs = with pkgs; [ glibc + openssl which ]; buildPhase = '' - make -j $NIX_BUILD_CORES release + make -j $NIX_BUILD_CORES release USE_SYSTEM_SSL=1 ''; installPhase = ''