depot/third_party/nixpkgs/pkgs/applications/misc/scli/default.nix
Default email 14a1eeff01 Project import generated by Copybara.
GitOrigin-RevId: 6933d068c5d2fcff398e802f7c4e271bbdab6705
2021-05-29 03:34:57 +00:00

38 lines
1,009 B
Nix

{ lib, buildPythonApplication, fetchFromGitHub, signal-cli, urwid
, urwid-readline, dbus }:
buildPythonApplication rec {
pname = "scli";
version = "0.6.1";
src = fetchFromGitHub {
owner = "isamert";
repo = pname;
rev = "v${version}";
sha256 = "sha256-hWzpqj/sxPq/doxdmytnj5rh2qKQE71WMB0ugomWhHg";
};
propagatedBuildInputs = [ signal-cli urwid urwid-readline dbus ];
dontBuild = true;
checkPhase = ''
# scli attempts to write to these directories, make sure they're writeable
export XDG_DATA_HOME=$(mktemp -d)
export XDG_CONFIG_HOME=$(mktemp -d)
./scli --help > /dev/null # don't spam nix-build log
test $? == 0
'';
installPhase = ''
mkdir -p $out/bin
patchShebangs scli
install -m755 -D scli $out/bin/scli
'';
meta = with lib; {
description = "Simple terminal user interface for Signal";
homepage = "https://github.com/isamert/scli";
license = licenses.gpl3Only;
maintainers = with maintainers; [ alex-eyre ];
};
}