nixpkgs/pkgs/applications/misc/scli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.1 KiB
Nix
Raw Normal View History

2021-06-22 14:36:25 +02:00
{ lib
, python3
, fetchFromGitHub
, dbus
, signal-cli
, xclip
}:
2021-06-22 14:36:25 +02:00
python3.pkgs.buildPythonApplication rec {
pname = "scli";
2022-12-23 20:26:42 +01:00
version = "0.7.2";
src = fetchFromGitHub {
owner = "isamert";
repo = pname;
2022-12-23 20:26:42 +01:00
rev = "refs/tags/v${version}";
sha256 = "sha256-7yyORM77oByH1gxx/TNkjJQBsig6ZxsfeI3ijg71oBs=";
};
2021-06-22 14:36:25 +02:00
propagatedBuildInputs = with python3.pkgs; [
pyqrcode
urwid
urwid-readline
];
2022-10-08 10:12:39 +02:00
format = "other";
2021-06-22 14:36:25 +02:00
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
'';
2021-06-22 14:36:25 +02:00
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ dbus signal-cli xclip ])
];
meta = with lib; {
description = "Simple terminal user interface for Signal";
homepage = "https://github.com/isamert/scli";
license = licenses.gpl3Only;
maintainers = with maintainers; [ alexeyre ];
};
}