systant/systant.nix
ryan 92fc90e3b4 Rename project from system-stats-daemon to systant
- Updated all module names from SystemStatsDaemon to Systant
- Renamed application config from :system_stats_daemon to :systant
- Updated service files and documentation
- Release binary now at _build/prod/rel/systant/bin/systant

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 17:06:03 -07:00

59 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchgit
, elixir
, erlang
, rebar3
, git
}:
stdenv.mkDerivation rec {
pname = "systant";
version = "0.1.0";
src = fetchgit {
url = "https://git.ryanpandya.com/ryan/systant.git";
rev = "9d8306a64b7893ea0d25e2b08f470541fb4db7c8";
sha256 = lib.fakeSha256; # Replace with actual hash after first build attempt
};
nativeBuildInputs = [
elixir
erlang
rebar3
git
];
buildPhase = ''
runHook preBuild
export MIX_ENV=prod
export MIX_HOME=$TMPDIR/mix
export HEX_HOME=$TMPDIR/hex
export REBAR_CACHE_DIR=$TMPDIR/rebar3
mix local.hex --force
mix local.rebar --force
mix deps.get --only=prod
mix release
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r _build/prod/rel/systant/* $out/
runHook postInstall
'';
meta = with lib; {
description = "Systant - System stats MQTT daemon for monitoring system metrics";
homepage = "https://git.ryanpandya.com/ryan/systant";
license = licenses.mit; # Update if different
maintainers = [ ]; # Add your maintainer info if desired
platforms = platforms.linux;
};
}