signaldctl: init at 0.6.1
signaldctl is a tool used to administer the signald service (already available in nixpkgs). after enabling the signald service as below: ```nix { services.signald.enable = true; } ``` then a user can use signaldctl to introspect signald's state. the communication happens over `/run/signald/signald.sock`, so either configure signald to expose that with desired permissions, or run signaldctl as the signald user: ``` $ sudo -u signald -g signald signaldctl account list ┌──────────────┬──────────────────────────────────────┬───────────┐ │ PHONE NUMBER │ UUID │ DEVICE ID │ ├──────────────┼──────────────────────────────────────┼───────────┤ │ +1XXXXXXXXXX │ XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX │ 1 │ └──────────────┴──────────────────────────────────────┴───────────┘ ```
This commit is contained in:
parent
75718252aa
commit
bd8533f202
@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitLab
|
||||
, gitUpdater
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "signaldctl";
|
||||
version = "0.6.1";
|
||||
src = fetchFromGitLab {
|
||||
owner = "signald";
|
||||
repo = "signald-go";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-lMJyr4BPZ8V2f//CUkr7CVQ6o8nRyeLBHMDEyLcHSgQ=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-LGIWAVhDJCg6Ox7U4ZK15K8trjsvSZm4/0jNpIDmG7I=";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
# install only the binary and not any intermediate artifacts like
|
||||
# `generators` which is only used during build
|
||||
cp "$GOPATH/bin/signaldctl" $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A golang library for communicating with signald";
|
||||
homepage = "https://signald.org/signaldctl/";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ colinsane ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -11708,6 +11708,8 @@ with pkgs;
|
||||
|
||||
signald = callPackage ../applications/networking/instant-messengers/signald { };
|
||||
|
||||
signaldctl = callPackage ../applications/networking/instant-messengers/signaldctl { };
|
||||
|
||||
signal-cli = callPackage ../applications/networking/instant-messengers/signal-cli { };
|
||||
|
||||
inherit (callPackage ../applications/networking/instant-messengers/signal-desktop {}) signal-desktop signal-desktop-beta;
|
||||
|
Loading…
Reference in New Issue
Block a user