Skip to content

Commit 576eef4

Browse files
committed
tools: use vendored trust store in shell.nix
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #67318 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 40764cf commit 576eef4

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/nix-changes.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ on:
1111
- v[0-9]+.x
1212
paths:
1313
- '**.nix'
14+
- tools/certdata.txt
1415
- tools/nix/**
1516
- .github/workflows/nix-changes.yml
1617
pull_request:
1718
paths:
1819
- '**.nix'
20+
- tools/certdata.txt
1921
- tools/nix/**
2022
- .github/workflows/nix-changes.yml
2123
types: [opened, synchronize, reopened, ready_for_review]
@@ -52,6 +54,7 @@ jobs:
5254
sparse-checkout: |
5355
shell.nix
5456
tools/nix/
57+
tools/certdata.txt
5558
sparse-checkout-cone-mode: false
5659

5760
- uses: cachix/install-nix-action@75c75c31ebece974e48ebc36b4ad125bd97bd97b # v31.11.3

‎shell.nix‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ pkgs.mkShell {
149149
)
150150
)
151151
);
152+
153+
# CA bundle built from the vendored Mozilla trust store, so Nix-built tools
154+
# (curl, git, shared OpenSSL) don't fall back to the user's possibly stale one.
155+
NIX_SSL_CERT_FILE = "${
156+
pkgs.cacert.overrideAttrs {
157+
src = ./tools/certdata.txt;
158+
}
159+
}/etc/ssl/certs/ca-bundle.crt";
152160
}
153161
// (
154162
let

0 commit comments

Comments
 (0)