From 59bed14119a2842947e948efbd696c51616cb687 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 10 Apr 2016 04:30:16 +0300 Subject: imgurbash2: init at 1.0; also drop imgurbash --- pkgs/tools/graphics/imgurbash/default.nix | 27 -------------------------- pkgs/tools/graphics/imgurbash2/default.nix | 31 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 27 deletions(-) delete mode 100644 pkgs/tools/graphics/imgurbash/default.nix create mode 100644 pkgs/tools/graphics/imgurbash2/default.nix (limited to 'pkgs/tools') diff --git a/pkgs/tools/graphics/imgurbash/default.nix b/pkgs/tools/graphics/imgurbash/default.nix deleted file mode 100644 index 66f85af87935..000000000000 --- a/pkgs/tools/graphics/imgurbash/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchurl, bash, curl, xsel }: - -stdenv.mkDerivation { - name = "imgurbash-4"; - - src = fetchurl { - url = "https://imgur.com/tools/imgurbash.sh"; - sha256 = "16m7dn5vqzx1q4pzssnwiwajfzrbhrz0niyhf5abxi1lwr3h0ca1"; - }; - - buildCommand = '' - mkdir -p $out/bin - cat <$out/bin/imgurbash - #!${bash}/bin/bash - PATH=${stdenv.lib.makeSearchPath "bin" [curl xsel]}:\$PATH - EOF - cat $src >>$out/bin/imgurbash - chmod +x $out/bin/imgurbash - ''; - - meta = with stdenv.lib; { - description = "A simple bash script to upload an image to imgur from the commandline"; - license = licenses.publicDomain; - platforms = platforms.linux; - maintainers = with maintainers; [ abbradar ]; - }; -} diff --git a/pkgs/tools/graphics/imgurbash2/default.nix b/pkgs/tools/graphics/imgurbash2/default.nix new file mode 100644 index 000000000000..5e7b4dcb3872 --- /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 <$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; + }; +} -- cgit 1.4.1