depot/third_party/nixpkgs/pkgs/tools/graphics/imgur-screenshot/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

30 lines
933 B
Nix

{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, jq, gnugrep, libnotify, scrot, which, xclip }:
let deps = lib.makeBinPath [ curl jq gnugrep libnotify scrot which xclip ];
in stdenv.mkDerivation rec {
version = "2.0.0";
pname = "imgur-screenshot";
src = fetchFromGitHub {
owner = "jomo";
repo = "imgur-screenshot";
rev = "v${version}";
sha256 = "0fkhvfraijbrw806pgij41bn1hc3r7l7l3snkicmshxj83lmsd5k";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -Dm755 imgur-screenshot $out/bin/imgur-screenshot
wrapProgram $out/bin/imgur-screenshot --prefix PATH ':' ${deps}
'';
meta = with lib; {
description = "Tool for easy screencapping and uploading to imgur";
homepage = "https://github.com/jomo/imgur-screenshot/";
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ lw ];
mainProgram = "imgur-screenshot";
};
}