Skip to content

Commit 52e92f9

Browse files
committed
fixup! tools: migrate from openssl-matrix.json to openssl-matrix.nix
1 parent e8c9590 commit 52e92f9

2 files changed

Lines changed: 31 additions & 53 deletions

File tree

tools/dep_updaters/update-nixpkgs-pin.sh

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,37 @@ TMP_FILE=$(mktemp)
2626
sed "s/$CURRENT_VERSION_SHA1/$NEW_UPSTREAM_SHA1/;s/$CURRENT_TARBALL_HASH/$NEW_TARBALL_HASH/" "$NIXPKGS_PIN_FILE" > "$TMP_FILE"
2727
mv "$TMP_FILE" "$NIXPKGS_PIN_FILE"
2828

29-
"$BASE_DIR/tools/nix/collect-openssl-matrix.sh" > "$OPENSSL_MATRIX_FILE"
29+
nix-instantiate -I "nixpkgs=$NIXPKGS_PIN_FILE" --eval --strict --json -E "
30+
let
31+
pkgs = import <nixpkgs> {};
32+
attrs = builtins.filter
33+
(n:
34+
let t = builtins.tryEval pkgs.\${n}; in
35+
t.success && (builtins.tryEval t.value.version).success
36+
)
37+
(
38+
builtins.filter
39+
(n: builtins.match \"openssl_[0-9]+(_[0-9]+)?\" n != null)
40+
(builtins.attrNames pkgs)
41+
);
42+
in
43+
{
44+
inherit attrs;
45+
permittedInsecurePackages = builtins.map (attr: pkgs.\${attr}.name) (
46+
builtins.filter (attr: (pkgs.\${attr}.meta.insecure)) attrs
47+
);
48+
}
49+
" | jq -r '"{
50+
pkgs ? import ./pkgs.nix {
51+
config.permittedInsecurePackages = [ \(.permittedInsecurePackages | map(@json) | join(" ")) ];
52+
},
53+
}:
54+
55+
{
56+
inherit (pkgs)
57+
\(.attrs | join("\n "))
58+
;
59+
}"' > "$OPENSSL_MATRIX_FILE"
3060

3161
cat -<<EOF
3262
All done!

tools/nix/collect-openssl-matrix.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)