nix-openclaw-tools/nix/pkgs/imsg.nix
joshp123 675f4ba420 rename OpenClaw tools flake
Move the flake identity from nix-steipete-tools to nix-openclaw-tools, update transferred upstream repos to openclaw, and drop stale CodexBar/bird packaging.

Tests: go test ./...; nix flake show --all-systems; nix build .#gogcli .#goplaces .#summarize .#camsnap .#sonoscli --no-link
2026-05-05 12:04:06 +02:00

44 lines
1019 B
Nix

{ lib, stdenv, fetchurl, unzip }:
let
sources = {
"aarch64-darwin" = {
url = "https://github.com/openclaw/imsg/releases/download/v0.6.0/imsg-macos.zip";
hash = "sha256-oA/Q1ZlLNtMxAwGrf5TbgsrfWxdJPE043nBW0cDCCw8=";
};
};
in
stdenv.mkDerivation {
pname = "imsg";
version = "0.6.0";
src = fetchurl sources.${stdenv.hostPlatform.system};
nativeBuildInputs = [ unzip ];
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
unzip -q "$src"
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp imsg "$out/bin/imsg"
chmod 0755 "$out/bin/imsg"
if [ -f PhoneNumberKit_PhoneNumberKit.bundle ]; then
cp -R PhoneNumberKit_PhoneNumberKit.bundle "$out/bin/"
fi
runHook postInstall
'';
meta = with lib; {
description = "Send and read iMessage / SMS from the terminal";
homepage = "https://github.com/openclaw/imsg";
license = licenses.mit;
platforms = builtins.attrNames sources;
mainProgram = "imsg";
};
}