nixpkgs/pkgs/tools/graphics/imgur-screenshot/default.nix

30 lines
906 B
Nix
Raw Normal View History

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