2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, bash, curl, xsel }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "imgurbash2";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ram-on";
|
|
|
|
repo = "imgurbash2";
|
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-7J3LquzcYX0wBR6kshz7VuPv/TftTzKFdWcgsML2DnI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cat <<EOF >$out/bin/imgurbash2
|
|
|
|
#!${bash}/bin/bash
|
2021-01-15 22:18:51 +00:00
|
|
|
PATH=${lib.makeBinPath [curl xsel]}:\$PATH
|
2020-04-24 23:36:52 +00:00
|
|
|
EOF
|
|
|
|
cat imgurbash2 >> $out/bin/imgurbash2
|
|
|
|
chmod +x $out/bin/imgurbash2
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Shell script that uploads images to imgur";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-03-19 17:17:44 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
homepage = "https://github.com/ram-on/imgurbash2";
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "imgurbash2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|