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