nixpkgs/pkgs/by-name/im/imgurbash2/package.nix

33 lines
813 B
Nix
Raw Normal View History

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