at 23.11-beta 39 lines 1.1 kB view raw
1{ screenshots ? true, video ? false, clipboard ? true 2, lib, stdenv, jq, curl, fetchFromGitHub, makeWrapper, maim ? null, xclip ? null, capture ? null }: 3 4assert screenshots -> maim != null; 5assert video -> capture != null; 6assert clipboard -> xclip != null; 7 8stdenv.mkDerivation rec { 9 pname = "pb_cli-unstable"; 10 version = "2019-03-10"; 11 12 src = fetchFromGitHub { 13 owner = "ptpb"; 14 repo = "pb_cli"; 15 rev = "6b9ce1ee45fe651d06d7c479a20026a173dd328b"; 16 sha256 = "0w6a789zffvz4ixsb92q45n5s4xyx7s2l2f07972i3dajaaai8z7"; 17 }; 18 19 nativeBuildInputs = [ makeWrapper ]; 20 21 liveDeps = [ jq curl ] ++ lib.optional screenshots maim 22 ++ lib.optional video capture 23 ++ lib.optional clipboard xclip; 24 25 installPhase = '' 26 install -Dm755 src/pb.sh $out/bin/pb 27 28 patchShebangs $out/bin/pb 29 wrapProgram $out/bin/pb \ 30 --prefix PATH : '${lib.makeBinPath liveDeps}' 31 ''; 32 33 meta = with lib; { 34 description = "A no bullshit 0x0.st client"; 35 homepage = "https://github.com/ptpb/pb_cli"; 36 maintainers = [ maintainers.ar1a ]; 37 license = licenses.gpl3Plus; 38 }; 39}