diff --git a/mix.exs b/mix.exs index 501035a..b0b3284 100644 --- a/mix.exs +++ b/mix.exs @@ -33,7 +33,9 @@ defmodule SystemStatsDaemon.MixProject do systant: [ include_executables_for: [:unix], applications: [runtime_tools: :permanent], - cookie: "systant-cookie-change-in-production" + cookie: "systant-cookie-change-in-production", + include_erts: true, + strip_beams: false ] ] end diff --git a/systant.nix b/systant.nix index 9d33d56..de402c2 100644 --- a/systant.nix +++ b/systant.nix @@ -6,17 +6,25 @@ beamPackages.mixRelease rec { src = fetchgit { url = "https://git.ryanpandya.com/ryan/systant.git"; - rev = "92fc90e3b470dd2d11ba3a84745e33195e8e9db3"; - sha256 = lib.fakeSha256; # Replace with actual hash after first build attempt + rev = "9d8ad1890b682a58aaa27406a7f28337c4c67d5f"; + sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }; # Mix dependencies will be automatically fetched and cached by Nix mixFodDeps = beamPackages.fetchMixDeps { pname = "systant-mix-deps"; inherit src version; - sha256 = lib.fakeSha256; # Will get this from first build failure + sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }; + # Ensure COOKIE file exists + postInstall = '' + if [ ! -f $out/releases/COOKIE ]; then + mkdir -p $out/releases + echo "systant-cookie-change-in-production" > $out/releases/COOKIE + fi + ''; + meta = with lib; { description = "Systant - System stats MQTT daemon for monitoring system metrics"; homepage = "https://git.ryanpandya.com/ryan/systant";