Nix fail open store with scheme s3
Description:
PKGBUILD for Nix after Nix 2.16 drop dependencies "aws-cpp-core" and "aws-cpp-s3". Although now the S3 Nix store is optional at build time, but at runtime we still need the S3 Nix store support so that we can utilize local cache with minio.
Steps to reproduce:
- Add S3 Store URL to "extra-substituters" config
- Run "nix build" for derivation not in local store and cache.nixos.org
- Nix will report warning: "warning: don't know how to open Nix store with scheme 's3'"
Patch
Nix use pkg-config to determine feature enable or not, so just add S3 SDK back could fix this issue:
diff --git a/PKGBUILD b/PKGBUILD
index a56ad5f..ecca24d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,12 +10,13 @@
pkgbase=nix
pkgname=(nix perl-nix)
pkgver=2.28.1
-pkgrel=1
+pkgrel=2
pkgdesc='A purely functional package manager'
arch=(x86_64)
url='https://nixos.org/nix'
license=(LGPL-2.1-only)
makedepends=(
+ aws-sdk-cpp-core aws-sdk-cpp-s3
boost libboost_context.so
brotli libbrotlienc.so libbrotlidec.so
bzip2