From 3a2275dd841544bd64717c5ff99c62fa38904b12 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 1 Jul 2015 23:54:45 +0300 Subject: [PATCH] imgurbash: add package --- pkgs/tools/graphics/imgurbash/default.nix | 27 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/tools/graphics/imgurbash/default.nix diff --git a/pkgs/tools/graphics/imgurbash/default.nix b/pkgs/tools/graphics/imgurbash/default.nix new file mode 100644 index 000000000000..66f85af87935 --- /dev/null +++ b/pkgs/tools/graphics/imgurbash/default.nix @@ -0,0 +1,27 @@ +{ 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c095e3ad06fa..80adf6dfd481 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1892,6 +1892,8 @@ let inherit (perlPackages) MailIMAPClient; }; + imgurbash = callPackage ../tools/graphics/imgurbash { }; + inadyn = callPackage ../tools/networking/inadyn { }; inetutils = callPackage ../tools/networking/inetutils { };