@@ -228,11 +228,16 @@ let
228228 # This define files included in the directory that will be passed to `H.getProjectBase` for this test:
229229 filteredProjectBase = incl ../. cardanoTestnetGoldenFiles ;
230230 in
231+ # work around 104 chars socket path limit by using a different temporary directory
231232 ''
232233 ${ exportCliPath }
233234 ${ exportNodePath }
234235 ${ exportChairmanPath }
235236 export CARDANO_NODE_SRC=${ filteredProjectBase }
237+ # unset TMPDIR, otherwise mktemp will use that as a base
238+ unset TMPDIR
239+ export TMPDIR=$(mktemp -d)
240+ export TMP=$TMPDIR
236241 '' ;
237242 # cardano-testnet depends on cardano-node, cardano-cli, cardano-submit-api and some config files
238243 packages . cardano-node . components . tests . cardano-node-test . preCheck =
@@ -259,13 +264,13 @@ let
259264 ${ exportSubmitApiPath }
260265 export CARDANO_NODE_SRC=${ filteredProjectBase }
261266 ''
262- # the cardano-testnet-tests, use sockets stored in a temporary directory
267+ # the cardano-testnet-tests and chairman-tests , use sockets stored in a temporary directory
263268 # however on macOS the socket path's max is 104 chars. The package name
264269 # is already long, and as such the constructed socket path
265270 #
266271 # /private/tmp/nix-build-cardano-testnet-test-cardano-testnet-tests-1.36.0-check.drv-1/chairman-test-93c5d9288dd8e6bc/socket/node-bft1
267272 #
268- # exceeds taht limit easily. We therefore set a different tmp directory
273+ # exceeds that limit easily. We therefore set a different tmp directory
269274 # during the preBuild phase.
270275 + ''
271276 # unset TMPDIR, otherwise mktemp will use that as a base
0 commit comments