depot/third_party/nixpkgs/pkgs/tools/graphics/imgurbash2/default.nix
Default email 4fc29cb41f Project import generated by Copybara.
GitOrigin-RevId: 135073a87b7e2c631739f4ffa016e1859b1a425e
2020-05-29 08:06:01 +02:00

31 lines
795 B
Nix

{ stdenv, fetchFromGitHub, bash, curl, xsel }:
stdenv.mkDerivation rec {
pname = "imgurbash2";
version = "3.2";
src = fetchFromGitHub {
owner = "ram-on";
repo = "imgurbash2";
rev = version;
sha256 = "10zs6p17psl1vq5vpkfkf9nrlmibk6v1ds3yxbf1rip1zaqlwxg6";
};
installPhase = ''
mkdir -p $out/bin
cat <<EOF >$out/bin/imgurbash2
#!${bash}/bin/bash
PATH=${stdenv.lib.makeBinPath [curl xsel]}:\$PATH
EOF
cat imgurbash2 >> $out/bin/imgurbash2
chmod +x $out/bin/imgurbash2
'';
meta = with stdenv.lib; {
description = "A shell script that uploads images to imgur";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
homepage = "https://github.com/ram-on/imgurbash2";
};
}