Skip to content

Commit

Permalink
add script for getting nix sri for go
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
  • Loading branch information
kradalby committed Feb 9, 2024
1 parent 83769ba commit fb3449b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -124,7 +124,22 @@
in rec {
# `nix develop`
devShell = pkgs.mkShell {
buildInputs = devDeps;
buildInputs =
devDeps
++ [
(pkgs.writeShellScriptBin
"nix-vendor-sri"
''
set -eu
OUT=$(mktemp -d -t nar-hash-XXXXXX)
rm -rf "$OUT"
go mod vendor -o "$OUT"
go run tailscale.com/cmd/nardump --sri "$OUT"
rm -rf "$OUT"
'')
];

shellHook = ''
export PATH="$PWD/result/bin:$PATH"

0 comments on commit fb3449b

Please sign in to comment.