mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
npm-lockfile-fix: add cacert for Darwin sandbox (#552041)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
cacert,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication (finalAttrs: {
|
||||
@@ -27,6 +29,16 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
|
||||
|
||||
doCheck = false; # no tests
|
||||
|
||||
# requests resolves the CA bundle via REQUESTS_CA_BUNDLE before falling back
|
||||
# to NIX_SSL_CERT_FILE, which on Darwin points to a host path that is not
|
||||
# available inside a sandboxed build. Set it explicitly so the package works
|
||||
# whenever it is invoked from a sandboxed environment.
|
||||
makeWrapperArgs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"--set"
|
||||
"REQUESTS_CA_BUNDLE"
|
||||
"${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user