2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, dbus
|
|
|
|
, signal-cli
|
|
|
|
, xclip
|
2023-07-15 17:15:38 +00:00
|
|
|
, testers
|
|
|
|
, scli
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2021-05-29 03:34:57 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-05-29 03:34:57 +00:00
|
|
|
pname = "scli";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.7.2";
|
2021-05-29 03:34:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "isamert";
|
|
|
|
repo = pname;
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-7yyORM77oByH1gxx/TNkjJQBsig6ZxsfeI3ijg71oBs=";
|
2021-05-29 03:34:57 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pyqrcode
|
|
|
|
urwid
|
|
|
|
urwid-readline
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "other";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
patchShebangs scli
|
2023-07-15 17:15:38 +00:00
|
|
|
install -Dm555 scli -t $out/bin
|
|
|
|
echo "v$version" > $out/bin/VERSION
|
|
|
|
|
|
|
|
runHook postInstall
|
2021-05-29 03:34:57 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ dbus signal-cli xclip ])
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = scli;
|
|
|
|
command = "HOME=$(mktemp -d) scli --version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple terminal user interface for Signal";
|
|
|
|
homepage = "https://github.com/isamert/scli";
|
|
|
|
license = licenses.gpl3Only;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-05-29 03:34:57 +00:00
|
|
|
};
|
|
|
|
}
|