2020-04-24 23:36:52 +00:00
|
|
|
{ screenshots ? true, video ? false, clipboard ? true
|
2021-01-15 22:18:51 +00:00
|
|
|
, lib, stdenv, jq, curl, fetchFromGitHub, makeWrapper, maim ? null, xclip ? null, capture ? null }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
assert screenshots -> maim != null;
|
|
|
|
assert video -> capture != null;
|
|
|
|
assert clipboard -> xclip != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pb_cli-unstable";
|
|
|
|
version = "2019-03-10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ptpb";
|
|
|
|
repo = "pb_cli";
|
|
|
|
rev = "6b9ce1ee45fe651d06d7c479a20026a173dd328b";
|
|
|
|
sha256 = "0w6a789zffvz4ixsb92q45n5s4xyx7s2l2f07972i3dajaaai8z7";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
liveDeps = [ jq curl ] ++ lib.optional screenshots maim
|
|
|
|
++ lib.optional video capture
|
|
|
|
++ lib.optional clipboard xclip;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 src/pb.sh $out/bin/pb
|
|
|
|
|
|
|
|
patchShebangs $out/bin/pb
|
|
|
|
wrapProgram $out/bin/pb \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH : '${lib.makeBinPath liveDeps}'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "No bullshit 0x0.st client";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ptpb/pb_cli";
|
|
|
|
maintainers = [ maintainers.ar1a ];
|
|
|
|
license = licenses.gpl3Plus;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "pb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|