2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, bash, curl, xsel }:
|
2016-04-10 03:30:16 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-12 08:04:40 +01:00
|
|
|
pname = "imgurbash2";
|
2020-05-24 23:33:02 +02:00
|
|
|
version = "3.2";
|
2016-04-10 03:30:16 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ram-on";
|
|
|
|
repo = "imgurbash2";
|
|
|
|
rev = version;
|
2020-05-24 23:33:02 +02:00
|
|
|
sha256 = "10zs6p17psl1vq5vpkfkf9nrlmibk6v1ds3yxbf1rip1zaqlwxg6";
|
2016-04-10 03:30:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cat <<EOF >$out/bin/imgurbash2
|
|
|
|
#!${bash}/bin/bash
|
2021-01-15 10:19:50 +01:00
|
|
|
PATH=${lib.makeBinPath [curl xsel]}:\$PATH
|
2016-04-10 03:30:16 +02:00
|
|
|
EOF
|
|
|
|
cat imgurbash2 >> $out/bin/imgurbash2
|
|
|
|
chmod +x $out/bin/imgurbash2
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-04-10 03:30:16 +02:00
|
|
|
description = "A shell script that uploads images to imgur";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ram-on/imgurbash2";
|
2016-04-10 03:30:16 +02:00
|
|
|
};
|
|
|
|
}
|