Skip to content

Commit

Permalink
[DONT MERGE] test: wrap traffic_server with strace for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
midchildan committed Jun 11, 2024
1 parent 0bf8418 commit e0207b1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion examples/trafficserver/devenv.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:

{
packages = [ pkgs.curl pkgs.jq ];

services.trafficserver = {
enable = true;
package = pkgs.symlinkJoin {
inherit (pkgs.trafficserver) name;
paths = [ pkgs.trafficserver ];
postBuild = ''
pushd $out/bin
mv traffic_server .traffic_server
cat > traffic_server <<EOF
#!${pkgs.runtimeShell}
exec ${lib.getExe pkgs.strace} $out/bin/.traffic_server "\$@"
EOF
chmod +x traffic_server
popd
'';
};
remap = "map / http://127.0.0.1 @plugin=generator.so";
records.proxy.config = {
proxy_name = "devenv.test";
Expand Down

0 comments on commit e0207b1

Please sign in to comment.