{ lib, beamPackages, src, }: beamPackages.mixRelease rec { pname = "systant"; version = "0.1.0"; inherit src; # Disable distributed Erlang to avoid COOKIE requirement postInstall = '' # Create a dummy COOKIE file to satisfy the release boot script echo "dummy_cookie" > $out/releases/COOKIE # 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 mixFodDeps = beamPackages.fetchMixDeps { pname = "systant-mix-deps"; inherit src version; sha256 = "sha256-g8L/ZzCaXznrd+YLCMgvV94NVTKoFnK/Y/RXXPIMAjg="; }; meta = with lib; { description = "Systant - System stats MQTT daemon for monitoring system metrics"; homepage = "https://git.ryanpandya.com/ryan/systant"; license = licenses.mit; maintainers = [ ]; platforms = platforms.linux; }; }