about summary refs log tree commit diff
path: root/pkgs/tools/graphics/imgurbash2
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-10 04:30:16 +0300
committerNikolay Amiantov <ab@fmap.me>2016-04-12 04:07:36 +0300
commit59bed14119a2842947e948efbd696c51616cb687 (patch)
tree3684d77b21a5ca476a50fca098ccab0365b01f56 /pkgs/tools/graphics/imgurbash2
parentd2dba02a87326c312884ac2095d7621932ff3e9f (diff)
imgurbash2: init at 1.0; also drop imgurbash
Diffstat (limited to 'pkgs/tools/graphics/imgurbash2')
-rw-r--r--pkgs/tools/graphics/imgurbash2/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/imgurbash2/default.nix b/pkgs/tools/graphics/imgurbash2/default.nix
new file mode 100644
index 0000000000000..5e7b4dcb38726
--- /dev/null
+++ b/pkgs/tools/graphics/imgurbash2/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, bash, curl, xsel }:
+
+stdenv.mkDerivation rec {
+  name = "imgurbash2-${version}";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "ram-on";
+    repo = "imgurbash2";
+    rev = version;
+    sha256 = "0w8xfdvv6h0cqln9a2b1rskpyv4v5qsywqzg10smg05xlrh9f5nx";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cat <<EOF >$out/bin/imgurbash2
+    #!${bash}/bin/bash
+    PATH=${stdenv.lib.makeSearchPath "bin" [curl xsel]}:\$PATH
+    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 ];
+    homepage = https://github.com/ram-on/imgurbash2;
+  };
+}