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

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

60 lines
1.1 KiB
Nix
Raw Normal View History

2021-06-22 15:36:25 +03:00
{ lib
, python3
, fetchFromGitHub
, dbus
, signal-cli
, xclip
2023-05-27 16:44:59 +03:00
, testers
, scli
2021-06-22 15:36:25 +03:00
}:
2021-06-22 15:36:25 +03:00
python3.pkgs.buildPythonApplication rec {
pname = "scli";
2024-07-20 12:27:32 +03:00
version = "0.7.5";
src = fetchFromGitHub {
owner = "isamert";
repo = pname;
2022-12-23 22:26:42 +03:00
rev = "refs/tags/v${version}";
2024-07-20 12:27:32 +03:00
sha256 = "sha256-pp3uVABsncXXL2PZvTymHPKGAFvB24tnX+3K+C0VW8g=";
};
2021-06-22 15:36:25 +03:00
propagatedBuildInputs = with python3.pkgs; [
pyqrcode
urwid
urwid-readline
];
2022-10-08 11:12:39 +03:00
format = "other";
2021-06-22 15:36:25 +03:00
dontBuild = true;
installPhase = ''
2023-05-27 16:44:59 +03:00
runHook preInstall
patchShebangs scli
2023-05-27 16:44:59 +03:00
install -Dm555 scli -t $out/bin
echo "v$version" > $out/bin/VERSION
runHook postInstall
'';
2021-06-22 15:36:25 +03:00
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ dbus signal-cli xclip ])
];
2023-05-27 16:44:59 +03:00
passthru.tests = {
version = testers.testVersion {
package = scli;
command = "HOME=$(mktemp -d) scli --version";
};
};
meta = with lib; {
description = "Simple terminal user interface for Signal";
mainProgram = "scli";
homepage = "https://github.com/isamert/scli";
license = licenses.gpl3Only;
maintainers = [ ];
};
}