From 0c82d6899193789954b2e82ce30abe5e57a5d018 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 31 Mar 2018 18:26:30 +0200 Subject: [PATCH] pythonPackages.clf: Move to own file --- .../python-modules/clf/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 27 +---------------- 2 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 pkgs/development/python-modules/clf/default.nix diff --git a/pkgs/development/python-modules/clf/default.nix b/pkgs/development/python-modules/clf/default.nix new file mode 100644 index 000000000000..ca91829adef2 --- /dev/null +++ b/pkgs/development/python-modules/clf/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildPythonPackage, fetchPypi +, docopt, requests, pygments }: + +buildPythonPackage rec { + pname = "clf"; + version = "0.5.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "04lqd2i4fjs606b0q075yi9xksk567m0sfph6v6j80za0hvzqyy5"; + }; + + patchPhase = '' + sed -i 's/==/>=/' requirements.txt + ''; + + propagatedBuildInputs = [ docopt requests pygments ]; + + # Error when running tests: + # No local packages or download links found for requests + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/ncrocfer/clf; + description = "Command line tool to search snippets on Commandlinefu.com"; + license = licenses.mit; + maintainers = with maintainers; [ koral ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c5dd913d7386..04268fc97080 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1536,32 +1536,7 @@ in { cld2-cffi = callPackage ../development/python-modules/cld2-cffi {}; - clf = buildPythonPackage rec { - name = "clf-${version}"; - version = "0.5.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/c/clf/${name}.tar.gz"; - sha256 = "04lqd2i4fjs606b0q075yi9xksk567m0sfph6v6j80za0hvzqyy5"; - }; - - patchPhase = '' - sed -i 's/==/>=/' requirements.txt - ''; - - propagatedBuildInputs = with self; [ docopt requests pygments ]; - - # Error when running tests: - # No local packages or download links found for requests - doCheck = false; - - meta = { - homepage = https://github.com/ncrocfer/clf; - description = "Command line tool to search snippets on Commandlinefu.com"; - license = licenses.mit; - maintainers = with maintainers; [ koral ]; - }; - }; + clf = callPackage ../development/python-modules/clf {}; click = buildPythonPackage rec { name = "click-6.7";