2016-04-10 02:30:16 +01:00
|
|
|
{ stdenv, fetchFromGitHub, bash, curl, xsel }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-12 07:04:40 +00:00
|
|
|
pname = "imgurbash2";
|
2020-05-24 22:33:02 +01:00
|
|
|
version = "3.2";
|
2016-04-10 02:30:16 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ram-on";
|
|
|
|
repo = "imgurbash2";
|
|
|
|
rev = version;
|
2020-05-24 22:33:02 +01:00
|
|
|
sha256 = "10zs6p17psl1vq5vpkfkf9nrlmibk6v1ds3yxbf1rip1zaqlwxg6";
|
2016-04-10 02:30:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cat <<EOF >$out/bin/imgurbash2
|
|
|
|
#!${bash}/bin/bash
|
2016-04-13 13:53:51 +01:00
|
|
|
PATH=${stdenv.lib.makeBinPath [curl xsel]}:\$PATH
|
2016-04-10 02:30:16 +01:00
|
|
|
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 ];
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ram-on/imgurbash2";
|
2016-04-10 02:30:16 +01:00
|
|
|
};
|
|
|
|
}
|