2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, jq, gnugrep, libnotify, scrot, which, xclip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
let deps = lib.makeBinPath [ curl jq gnugrep libnotify scrot which xclip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "2.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "imgur-screenshot";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jomo";
|
|
|
|
repo = "imgur-screenshot";
|
|
|
|
rev = "v${version}";
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "0fkhvfraijbrw806pgij41bn1hc3r7l7l3snkicmshxj83lmsd5k";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-10-16 20:44:37 +00:00
|
|
|
install -Dm755 imgur-screenshot $out/bin/imgur-screenshot
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/imgur-screenshot --prefix PATH ':' ${deps}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A 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 ];
|
|
|
|
};
|
|
|
|
}
|