From bf60f8d566a85aef39137357cddc09c2473adfad Mon Sep 17 00:00:00 2001 From: Fritz Otlinghaus Date: Sat, 15 Dec 2018 18:31:54 +0800 Subject: [PATCH 1/2] pythonPackages.x256: init at 0.0.3 --- .../python-modules/x256/default.nix | 20 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/python-modules/x256/default.nix diff --git a/pkgs/development/python-modules/x256/default.nix b/pkgs/development/python-modules/x256/default.nix new file mode 100644 index 000000000000..d728ad927a61 --- /dev/null +++ b/pkgs/development/python-modules/x256/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildPythonPackage, fetchPypi +}: + +buildPythonPackage rec { + pname = "x256"; + version = "0.0.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "00g02b9a6jsl377xb5fmxvkjff3lalw21n430a4zalqyv76dnmgq"; + }; + + meta = with stdenv.lib; { + description = "Return the nearest xterm 256 color code for rgb inputs."; + homepage = https://github.com/magarcia/python-x256; + license = licenses.mit; + maintainers = with maintainers; [ scriptkiddi ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f4bb2c0ed0f6..4cd756ccb3bb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5066,6 +5066,8 @@ in { simpy = callPackage ../development/python-modules/simpy { }; + x256 = callPackage ../development/python-modules/x256 { }; + yattag = callPackage ../development/python-modules/yattag { }; z3 = (toPythonModule (pkgs.z3.override { From cf97a0372f50b5bc2375e0d86c6e74689b0fa867 Mon Sep 17 00:00:00 2001 From: Fritz Otlinghaus Date: Sat, 15 Dec 2018 18:35:35 +0800 Subject: [PATCH 2/2] gif-for-cli: init at unstable-2018-08-14 --- .../python-modules/x256/default.nix | 6 +++-- pkgs/tools/misc/gif-for-cli/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/misc/gif-for-cli/default.nix diff --git a/pkgs/development/python-modules/x256/default.nix b/pkgs/development/python-modules/x256/default.nix index d728ad927a61..55a3ad7d0cce 100644 --- a/pkgs/development/python-modules/x256/default.nix +++ b/pkgs/development/python-modules/x256/default.nix @@ -10,11 +10,13 @@ buildPythonPackage rec { sha256 = "00g02b9a6jsl377xb5fmxvkjff3lalw21n430a4zalqyv76dnmgq"; }; + doCheck = false; + meta = with stdenv.lib; { - description = "Return the nearest xterm 256 color code for rgb inputs."; + description = "Find the nearest xterm 256 color index for an RGB"; homepage = https://github.com/magarcia/python-x256; license = licenses.mit; - maintainers = with maintainers; [ scriptkiddi ]; + maintainers = with maintainers; [ Scriptkiddi ]; }; } diff --git a/pkgs/tools/misc/gif-for-cli/default.nix b/pkgs/tools/misc/gif-for-cli/default.nix new file mode 100644 index 000000000000..b8b86e07abb0 --- /dev/null +++ b/pkgs/tools/misc/gif-for-cli/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, python3Packages, ffmpeg, zlib, libjpeg }: + +python3Packages.buildPythonApplication rec { + pname = "gif-for-cli"; + version = "unstable-2018-08-14"; + + src = fetchFromGitHub { + owner = "google"; + repo = "gif-for-cli"; + rev = "9696f25fea2e38499b7c248a3151030c3c68bb00"; + sha256 = "1rj8wjfsabn27k1ds7a5fdqgf2r28zpz4lvhbzssjfj1yf0mfh7s"; + }; + + checkInputs = [ python3Packages.coverage ]; + buildInputs = [ ffmpeg zlib libjpeg ]; + propagatedBuildInputs = with python3Packages; [ pillow requests x256 ]; + + meta = with stdenv.lib; { + description = "Render gifs as ASCII art in your cli"; + longDescription = "Takes in a GIF, short video, or a query to the Tenor GIF API and converts it to animated ASCII art."; + homepage = https://github.com/google/gif-for-cli; + license = licenses.asl20; + maintainers = with maintainers; [ Scriptkiddi ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e392af3f650..cc4a66b866b5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1434,6 +1434,8 @@ in gh-ost = callPackage ../tools/misc/gh-ost { }; + gif-for-cli = callPackage ../tools/misc/gif-for-cli { }; + gist = callPackage ../tools/text/gist { }; gixy = callPackage ../tools/admin/gixy { };