nixpkgs/pkgs/tools/misc/pb_cli/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2019-01-20 01:21:25 +00:00
{ screenshots ? true, video ? false, clipboard ? true
, lib, stdenv, jq, curl, fetchFromGitHub, makeWrapper, maim ? null, xclip ? null, capture ? null }:
2019-01-20 01:21:25 +00:00
assert screenshots -> maim != null;
assert video -> capture != null;
assert clipboard -> xclip != null;
stdenv.mkDerivation rec {
pname = "pb_cli-unstable";
2019-03-09 19:46:34 +00:00
version = "2019-03-10";
2019-01-20 01:21:25 +00:00
src = fetchFromGitHub {
owner = "ptpb";
repo = "pb_cli";
2019-03-09 19:46:34 +00:00
rev = "6b9ce1ee45fe651d06d7c479a20026a173dd328b";
sha256 = "0w6a789zffvz4ixsb92q45n5s4xyx7s2l2f07972i3dajaaai8z7";
2019-01-20 01:21:25 +00:00
};
buildInputs = [ makeWrapper ];
2021-01-15 09:19:50 +00:00
liveDeps = [ jq curl ] ++ lib.optional screenshots maim
++ lib.optional video capture
++ lib.optional clipboard xclip;
2019-01-20 01:21:25 +00:00
installPhase = ''
install -Dm755 src/pb.sh $out/bin/pb
patchShebangs $out/bin/pb
wrapProgram $out/bin/pb \
2021-01-15 09:19:50 +00:00
--prefix PATH : '${lib.makeBinPath liveDeps}'
2019-01-20 01:21:25 +00:00
'';
meta = with lib; {
2019-03-09 19:46:34 +00:00
description = "A no bullshit 0x0.st client";
2019-01-20 01:21:25 +00:00
homepage = "https://github.com/ptpb/pb_cli";
maintainers = [ maintainers.ar1a ];
2019-03-09 19:46:34 +00:00
license = licenses.gpl3Plus;
2019-01-20 01:21:25 +00:00
};
}