Add COOKIE workaround for Nix package

This commit is contained in:
ryan 2025-08-02 20:06:57 -07:00
parent 289bb00f82
commit 9b3b7ab39b

View File

@ -9,6 +9,19 @@ beamPackages.mixRelease rec {
version = "0.1.0"; version = "0.1.0";
inherit src; inherit src;
# Disable distributed Erlang to avoid COOKIE requirement
postInstall = ''
# Create wrapper script that sets proper environment
mv $out/bin/systant $out/bin/.systant-wrapped
cat > $out/bin/systant << EOF
#!/bin/sh
export RELEASE_DISTRIBUTION=none
export RELEASE_NODE=nonode@nohost
exec "$out/bin/.systant-wrapped" "\$@"
EOF
chmod +x $out/bin/systant
'';
# Mix dependencies will be automatically fetched and cached by Nix # Mix dependencies will be automatically fetched and cached by Nix
mixFodDeps = beamPackages.fetchMixDeps { mixFodDeps = beamPackages.fetchMixDeps {