From 7357b369d51dee7e9eadf60d0da88ffb6f1ed6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 29 Oct 2017 11:45:46 +0100 Subject: [PATCH] pythonPackages.pyodbc: move to python-modules/ Easier maintenance when expressions are in separate files. --- .../python-modules/pyodbc/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 23 +------------------ 2 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/python-modules/pyodbc/default.nix diff --git a/pkgs/development/python-modules/pyodbc/default.nix b/pkgs/development/python-modules/pyodbc/default.nix new file mode 100644 index 000000000000..c09e15f4bfb3 --- /dev/null +++ b/pkgs/development/python-modules/pyodbc/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPyPy, libiodbc }: + +buildPythonPackage rec { + pname = "pyodbc"; + version = "4.0.19"; + name = "${pname}-${version}"; + disabled = isPyPy; # use pypypdbc instead + + src = fetchPypi { + inherit pname version; + sha256 = "05mkaxbi9n02bpr3l0qnyfb3458f35hk71bq8jmadikp3h8al7dg"; + }; + + buildInputs = [ libiodbc ]; + + meta = with stdenv.lib; { + description = "Python ODBC module to connect to almost any database"; + homepage = "https://github.com/mkleehammer/pyodbc"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b7624cef55eb..da15c8f0073f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17039,28 +17039,7 @@ in { }; }; - - pyodbc = buildPythonPackage rec { - pname = "pyodbc"; - version = "4.0.19"; - name = "${pname}-${version}"; - disabled = isPyPy; # use pypypdbc instead - - src = fetchPypi { - inherit pname version; - sha256 = "05mkaxbi9n02bpr3l0qnyfb3458f35hk71bq8jmadikp3h8al7dg"; - }; - - buildInputs = with self; [ pkgs.libiodbc ]; - - meta = { - description = "Python ODBC module to connect to almost any database"; - homepage = "https://github.com/mkleehammer/pyodbc"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ bjornfor ]; - }; - }; + pyodbc = callPackage ../development/python-modules/pyodbc { }; pyocr = callPackage ../development/python-modules/pyocr { };