From fd174245806f77dd15a8617a14a3af864703d19f Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 15:50:21 +0700 Subject: [PATCH 01/10] python.pkgs.acme-tiny : move to separate expression --- .../python-modules/acme-tiny/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 36 +---------------- 2 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 pkgs/development/python-modules/acme-tiny/default.nix diff --git a/pkgs/development/python-modules/acme-tiny/default.nix b/pkgs/development/python-modules/acme-tiny/default.nix new file mode 100644 index 000000000000..9558febec735 --- /dev/null +++ b/pkgs/development/python-modules/acme-tiny/default.nix @@ -0,0 +1,39 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, python, openssl }: + +buildPythonPackage rec { + pname = "acme-tiny"; + version = "2016-03-26"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + sha256 = "0ngmr3kxcvlqa9mrv3gx0rg4r67xvdjplqfminxliri3ipak853g"; + rev = "7a5a2558c8d6e5ab2a59b9fec9633d9e63127971"; + repo = "acme-tiny"; + owner = "diafygi"; + }; + + # source doesn't have any python "packaging" as such + configurePhase = " "; + buildPhase = " "; + # the tests are... complex + doCheck = false; + + patchPhase = '' + substituteInPlace acme_tiny.py --replace "openssl" "${openssl.bin}/bin/openssl" + ''; + + installPhase = '' + mkdir -p $out/${python.sitePackages}/ + cp acme_tiny.py $out/${python.sitePackages}/ + mkdir -p $out/bin + ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny + chmod +x $out/bin/acme_tiny + ''; + + meta = with stdenv.lib; { + description = "A tiny script to issue and renew TLS certs from Let's Encrypt"; + homepage = https://github.com/diafygi/acme-tiny; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eceb3f2ac3fd..f2ae8c58c595 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -270,41 +270,7 @@ in { acme = callPackage ../development/python-modules/acme { }; - acme-tiny = buildPythonPackage rec { - name = "acme-tiny-${version}"; - version = "2016-03-26"; - - src = pkgs.fetchFromGitHub { - sha256 = "0ngmr3kxcvlqa9mrv3gx0rg4r67xvdjplqfminxliri3ipak853g"; - rev = "7a5a2558c8d6e5ab2a59b9fec9633d9e63127971"; - repo = "acme-tiny"; - owner = "diafygi"; - }; - - # source doesn't have any python "packaging" as such - configurePhase = " "; - buildPhase = " "; - # the tests are... complex - doCheck = false; - - patchPhase = '' - substituteInPlace acme_tiny.py --replace "openssl" "${pkgs.openssl.bin}/bin/openssl" - ''; - - installPhase = '' - mkdir -p $out/${python.sitePackages}/ - cp acme_tiny.py $out/${python.sitePackages}/ - mkdir -p $out/bin - ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny - chmod +x $out/bin/acme_tiny - ''; - - meta = { - description = "A tiny script to issue and renew TLS certs from Let's Encrypt"; - homepage = https://github.com/diafygi/acme-tiny; - license = licenses.mit; - }; - }; + acme-tiny = callPackage ../development/python-modules/acme-tiny { }; actdiag = buildPythonPackage rec { name = "actdiag-0.5.3"; From c21e915c972116b29bcf10c44f469f8036aa2aa5 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 15:59:47 +0700 Subject: [PATCH 02/10] python.pkgs.actdiag : move to separate expression --- .../python-modules/actdiag/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 25 +--------------- 2 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/actdiag/default.nix diff --git a/pkgs/development/python-modules/actdiag/default.nix b/pkgs/development/python-modules/actdiag/default.nix new file mode 100644 index 000000000000..064e5e6c11a3 --- /dev/null +++ b/pkgs/development/python-modules/actdiag/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pep8, nose, unittest2, docutils, blockdiag }: + +buildPythonPackage rec { + pname = "actdiag"; + version = "0.5.3"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1vr4hnkr0gcvvpaycd8q3vcx029b2f5yv8swhdr8kwspaqb0dvfa"; + }; + + buildInputs = [ pep8 nose unittest2 docutils ]; + + propagatedBuildInputs = [ blockdiag ]; + + # One test fails: + # UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 0: ordinal not in range(128) + doCheck = false; + + meta = with stdenv.lib; { + description = "Generate activity-diagram image from spec-text file (similar to Graphviz)"; + homepage = http://blockdiag.com/; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f2ae8c58c595..af1ab819b128 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -272,30 +272,7 @@ in { acme-tiny = callPackage ../development/python-modules/acme-tiny { }; - actdiag = buildPythonPackage rec { - name = "actdiag-0.5.3"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/actdiag/${name}.tar.gz"; - sha256 = "1vr4hnkr0gcvvpaycd8q3vcx029b2f5yv8swhdr8kwspaqb0dvfa"; - }; - - buildInputs = with self; [ pep8 nose unittest2 docutils ]; - - propagatedBuildInputs = with self; [ blockdiag ]; - - # One test fails: - # UnicodeEncodeError: 'ascii' codec can't encode character u'\u3042' in position 0: ordinal not in range(128) - doCheck = false; - - meta = { - description = "Generate activity-diagram image from spec-text file (similar to Graphviz)"; - homepage = http://blockdiag.com/; - license = licenses.asl20; - platforms = platforms.linux; - maintainers = with maintainers; [ bjornfor ]; - }; - }; + actdiag = callPackage ../development/python-modules/actdiag { }; adal = buildPythonPackage rec { version = "0.1.0"; From 68bcf522c71ed7a2690544b8fc33be000ebe114e Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 16:04:59 +0700 Subject: [PATCH 03/10] python.pkgs.adal : move to separate expression --- .../python-modules/adal/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +--------------- 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/adal/default.nix diff --git a/pkgs/development/python-modules/adal/default.nix b/pkgs/development/python-modules/adal/default.nix new file mode 100644 index 000000000000..982e63882ad3 --- /dev/null +++ b/pkgs/development/python-modules/adal/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchPypi +, requests, pyjwt }: + +buildPythonPackage rec { + pname = "adal"; + version = "0.1.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1f32k18ck54adqlgvh6fjhy4yavcyrwy813prjyqppqqq4bn1a09"; + }; + + propagatedBuildInputs = [ requests pyjwt ]; + + meta = with stdenv.lib; { + description = "Library to make it easy for python application to authenticate to Azure Active Directory (AAD) in order to access AAD protected web resources"; + homepage = https://github.com/AzureAD/azure-activedirectory-library-for-python; + license = licenses.mit; + maintainers = with maintainers; [ phreedom ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index af1ab819b128..6d81ec98a186 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -274,24 +274,7 @@ in { actdiag = callPackage ../development/python-modules/actdiag { }; - adal = buildPythonPackage rec { - version = "0.1.0"; - name = "adal-${version}"; - - src = pkgs.fetchurl { - url = mirror://pypi/a/adal/adal-0.1.0.tar.gz; - sha256 = "1f32k18ck54adqlgvh6fjhy4yavcyrwy813prjyqppqqq4bn1a09"; - }; - - propagatedBuildInputs = with self; [ requests pyjwt ]; - - meta = { - description = "Library to make it easy for python application to authenticate to Azure Active Directory (AAD) in order to access AAD protected web resources"; - homepage = https://github.com/AzureAD/azure-activedirectory-library-for-python; - license = licenses.mit; - maintainers = with maintainers; [ phreedom ]; - }; - }; + adal = callPackage ../development/python-modules/adal { }; afew = buildPythonPackage rec { name = "afew-git-2017-02-08"; From af02f13e2572a2bdde5a6e94e78f4f3dcc6a05a3 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 16:23:28 +0700 Subject: [PATCH 04/10] python.pkgs.afew : move to separate expression --- .../python-modules/afew/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 35 +---------------- 2 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 pkgs/development/python-modules/afew/default.nix diff --git a/pkgs/development/python-modules/afew/default.nix b/pkgs/development/python-modules/afew/default.nix new file mode 100644 index 000000000000..4a2d4a0f7224 --- /dev/null +++ b/pkgs/development/python-modules/afew/default.nix @@ -0,0 +1,39 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, isPy3k , dbacl, notmuch, chardet, subprocess32 }: + +buildPythonPackage rec { + pname = "afew"; + version = "git-2017-02-08"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "afewmail"; + repo = "afew"; + rev = "889a3b966835c4d16aa1f24bb89f12945b9b2a67"; + sha256 = "01gwrx1m3ka13ps3vj04a3y8llli2j2vkd3gcggcvxdphhpysckm"; + }; + + buildInputs = [ dbacl ]; + + propagatedBuildInputs = [ + notmuch + chardet + ] ++ stdenv.lib.optional (!isPy3k) subprocess32; + + doCheck = false; + + preConfigure = '' + substituteInPlace afew/DBACL.py --replace "'dbacl'" "'${dbacl}/bin/dbacl'" + ''; + + postInstall = '' + wrapProgram $out/bin/afew \ + --prefix LD_LIBRARY_PATH : ${notmuch}/lib + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/teythoon/afew; + description = "An initial tagging script for notmuch mail"; + maintainers = with maintainers; [ garbas ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6d81ec98a186..2a21ac792ae2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -276,40 +276,7 @@ in { adal = callPackage ../development/python-modules/adal { }; - afew = buildPythonPackage rec { - name = "afew-git-2017-02-08"; - - src = pkgs.fetchFromGitHub { - owner = "afewmail"; - repo = "afew"; - rev = "889a3b966835c4d16aa1f24bb89f12945b9b2a67"; - sha256 = "01gwrx1m3ka13ps3vj04a3y8llli2j2vkd3gcggcvxdphhpysckm"; - }; - - buildInputs = with self; [ pkgs.dbacl ]; - - propagatedBuildInputs = with self; [ - self.notmuch - self.chardet - ] ++ optional (!isPy3k) self.subprocess32; - - doCheck = false; - - preConfigure = '' - substituteInPlace afew/DBACL.py --replace "'dbacl'" "'${pkgs.dbacl}/bin/dbacl'" - ''; - - postInstall = '' - wrapProgram $out/bin/afew \ - --prefix LD_LIBRARY_PATH : ${pkgs.notmuch}/lib - ''; - - meta = { - homepage = https://github.com/teythoon/afew; - description = "An initial tagging script for notmuch mail"; - maintainers = with maintainers; [ garbas ]; - }; - }; + afew = callPackage ../development/python-modules/afew { }; aiodns = buildPythonPackage rec { name = "aiodns-${version}"; From 5eea07391ea407b502dcd3b59c7c0f319c29b713 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 16:32:53 +0700 Subject: [PATCH 05/10] python.pkgs.aiodns : move to separate expression --- .../python-modules/aiodns/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 25 +--------------- 2 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/aiodns/default.nix diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix new file mode 100644 index 000000000000..4265a7488f66 --- /dev/null +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonPackage, fetchPypi +, isPy33, isPy26, isPy27, isPyPy, python, pycares, asyncio, trollius }: + +buildPythonPackage rec { + pname = "aiodns"; + version = "1.0.1"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "595b78b8d54115d937cf60d778c02dad76b6f789fd527dab308f99e5601e7f3d"; + }; + + propagatedBuildInputs = with stdenv.lib; [ pycares ] + ++ optional isPy33 asyncio + ++ optional (isPy26 || isPy27 || isPyPy) trollius; + + checkPhase = '' + ${python.interpreter} tests.py + ''; + + # 'Could not contact DNS servers' + doCheck = false; + + meta = with stdenv.lib; { + homepage = http://github.com/saghul/aiodns; + license = licenses.mit; + description = "Simple DNS resolver for asyncio"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2a21ac792ae2..667d747582c9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -278,30 +278,7 @@ in { afew = callPackage ../development/python-modules/afew { }; - aiodns = buildPythonPackage rec { - name = "aiodns-${version}"; - version = "1.0.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/aiodns/${name}.tar.gz"; - sha256 = "595b78b8d54115d937cf60d778c02dad76b6f789fd527dab308f99e5601e7f3d"; - }; - - propagatedBuildInputs = with self; [ pycares ] ++ optional isPy33 asyncio ++ optional (isPy26 || isPy27 || isPyPy) trollius; - - checkPhase = '' - ${python.interpreter} tests.py - ''; - - # 'Could not contact DNS servers' - doCheck = false; - - meta = { - homepage = http://github.com/saghul/aiodns; - license = licenses.mit; - description = "Simple DNS resolver for asyncio"; - }; - }; + aiodns = callPackage ../development/python-modules/aiodns { }; aiofiles = callPackage ../development/python-modules/aiofiles { }; From 9b313484def34616a1d13cce9fa69e8ec6b96e2d Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 16:43:01 +0700 Subject: [PATCH 06/10] python.pkgs.alabaster : move to separate expression --- .../python-modules/alabaster/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +--------------- 2 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/alabaster/default.nix diff --git a/pkgs/development/python-modules/alabaster/default.nix b/pkgs/development/python-modules/alabaster/default.nix new file mode 100644 index 000000000000..69bcaa1fc06e --- /dev/null +++ b/pkgs/development/python-modules/alabaster/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pygments }: + +buildPythonPackage rec { + pname = "alabaster"; + version = "0.7.7"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "f416a84e0d0ddbc288f6b8f2c276d10b40ca1238562cd9ed5a751292ec647b71"; + }; + + propagatedBuildInputs = [ pygments ]; + + # No tests included + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/bitprophet/alabaster; + description = "A Sphinx theme"; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 667d747582c9..031fca0f6ef6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -305,26 +305,7 @@ in { }; }; - alabaster = buildPythonPackage rec { - name = "alabaster-0.7.7"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/alabaster/${name}.tar.gz"; - sha256 = "f416a84e0d0ddbc288f6b8f2c276d10b40ca1238562cd9ed5a751292ec647b71"; - }; - - propagatedBuildInputs = with self; [ pygments ]; - - # No tests included - doCheck = false; - - meta = { - homepage = https://github.com/bitprophet/alabaster; - description = "A Sphinx theme"; - license = licenses.bsd3; - }; - }; - + alabaster = callPackage ../development/python-modules/alabaster {}; alembic = callPackage ../development/python-modules/alembic {}; From 4206da05b0618f36615f5cf7d89118f2a5045325 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 17:23:52 +0700 Subject: [PATCH 07/10] python.pkgs.ansicolors : move to separate expression --- .../python-modules/ansicolors/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +----------------- 2 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/ansicolors/default.nix diff --git a/pkgs/development/python-modules/ansicolors/default.nix b/pkgs/development/python-modules/ansicolors/default.nix new file mode 100644 index 000000000000..bc0701806544 --- /dev/null +++ b/pkgs/development/python-modules/ansicolors/default.nix @@ -0,0 +1,19 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "ansicolors"; + version = "1.0.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "02lmh2fbqcwr98cq13l9ql0fvyad1dcb3ap3c5xq9qwjp45m6r3n"; + }; + + meta = with stdenv.lib; { + homepage = "https://github.com/verigak/colors/"; + description = "ANSI colors for Python"; + license = licenses.isc; + maintainers = with maintainers; [ copumpkin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 031fca0f6ef6..7d977a6eaac6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -309,23 +309,7 @@ in { alembic = callPackage ../development/python-modules/alembic {}; - ansicolors = buildPythonPackage rec { - name = "ansicolors-${version}"; - version = "1.0.2"; - - src = self.fetchPypi { - pname = "ansicolors"; - inherit version; - sha256 = "02lmh2fbqcwr98cq13l9ql0fvyad1dcb3ap3c5xq9qwjp45m6r3n"; - }; - - meta = { - homepage = "https://github.com/verigak/colors/"; - description = "ANSI colors for Python"; - license = licenses.isc; - maintainers = with maintainers; [ copumpkin ]; - }; - }; + ansicolors = callPackage ../development/python-modules/ansicolors {}; aniso8601 = buildPythonPackage rec { name = "aniso8601-${version}"; From ff6797e8aa0e3cca42acb7416f058d39eb0fa630 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 17:29:13 +0700 Subject: [PATCH 08/10] python.pkgs.aniso8601 : move to separate expression --- .../python-modules/aniso8601/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +--------------- 2 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/aniso8601/default.nix diff --git a/pkgs/development/python-modules/aniso8601/default.nix b/pkgs/development/python-modules/aniso8601/default.nix new file mode 100644 index 000000000000..bc49e991b4fa --- /dev/null +++ b/pkgs/development/python-modules/aniso8601/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi +, dateutil }: + +buildPythonPackage rec { + pname = "aniso8601"; + version = "1.2.0"; + name = "${pname}-${version}"; + + meta = with stdenv.lib; { + description = "Parses ISO 8601 strings."; + homepage = "https://bitbucket.org/nielsenb/aniso8601"; + license = licenses.bsd3; + }; + + propagatedBuildInputs = [ dateutil ]; + + src = fetchPypi { + inherit pname version; + sha256 = "502400f82574afa804cc915d83f15c67533d364dcd594f8a6b9d2053f3404dd4"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7d977a6eaac6..102db6618119 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -311,23 +311,7 @@ in { ansicolors = callPackage ../development/python-modules/ansicolors {}; - aniso8601 = buildPythonPackage rec { - name = "aniso8601-${version}"; - version = "1.2.0"; - - meta = { - description = "Parses ISO 8601 strings."; - homepage = "https://bitbucket.org/nielsenb/aniso8601"; - license = licenses.bsd3; - }; - - propagatedBuildInputs = with self; [ dateutil ]; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/aniso8601/${name}.tar.gz"; - sha256 = "502400f82574afa804cc915d83f15c67533d364dcd594f8a6b9d2053f3404dd4"; - }; - }; + aniso8601 = callPackage ../development/python-modules/aniso8601 {}; asgiref = callPackage ../development/python-modules/asgiref { }; From 84c305562035a7a7d2d8557735470d2d96e8b11a Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 17:41:57 +0700 Subject: [PATCH 09/10] python.pkgs.python-editor : move to separate expression --- .../python-modules/python-editor/default.nix | 17 +++++++++++++++++ pkgs/top-level/python-packages.nix | 15 +-------------- 2 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 pkgs/development/python-modules/python-editor/default.nix diff --git a/pkgs/development/python-modules/python-editor/default.nix b/pkgs/development/python-modules/python-editor/default.nix new file mode 100644 index 000000000000..98ed980588e3 --- /dev/null +++ b/pkgs/development/python-modules/python-editor/default.nix @@ -0,0 +1,17 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + version = "0.4"; + pname = "python-editor"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1gykxn16anmsbcrwhx3rrhwjif95mmwvq9gjcrr9bbzkdc8sf8a4"; + }; + + meta = with stdenv.lib; { + description = "A library that provides the `editor` module for programmatically"; + homepage = "https://github.com/fmoo/python-editor"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 102db6618119..21f17b303c2a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -319,20 +319,7 @@ in { asgi_redis = callPackage ../development/python-modules/asgi_redis { }; - python-editor = buildPythonPackage rec { - name = "python-editor-${version}"; - version = "0.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/python-editor/${name}.tar.gz"; - sha256 = "1gykxn16anmsbcrwhx3rrhwjif95mmwvq9gjcrr9bbzkdc8sf8a4"; - }; - - meta = with stdenv.lib; { - description = "`python-editor` is a library that provides the `editor` module for programmatically"; - homepage = "https://github.com/fmoo/python-editor"; - }; - }; + python-editor = callPackage ../development/python-modules/python-editor { }; python-gnupg = callPackage ../development/python-modules/python-gnupg {}; From ccf0468a84a61ddb85b6007af9fe5842cc6f7f47 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Wed, 19 Jul 2017 18:23:11 +0700 Subject: [PATCH 10/10] python.pkgs.python-uinput : move to separate expression --- .../python-modules/python-uinput/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +--------------- 2 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/python-uinput/default.nix diff --git a/pkgs/development/python-modules/python-uinput/default.nix b/pkgs/development/python-modules/python-uinput/default.nix new file mode 100644 index 000000000000..93b67fe4782e --- /dev/null +++ b/pkgs/development/python-modules/python-uinput/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi +, udev }: + +buildPythonPackage rec { + pname = "python-uinput"; + version = "0.11.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "033zqiypjz0nigav6vz0s57pbzikvds55mxphrdpkdbpdikjnfcr"; + }; + + buildInputs = [ udev ]; + + NIX_CFLAGS_LINK = [ "-ludev" ]; + + meta = with stdenv.lib; { + description = "Pythonic API to Linux uinput kernel module"; + homepage = "http://tjjr.fi/sw/python-uinput/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 21f17b303c2a..16f0ce0099cc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -323,26 +323,7 @@ in { python-gnupg = callPackage ../development/python-modules/python-gnupg {}; - python-uinput = buildPythonPackage rec { - name = "python-uinput-${version}"; - version = "0.11.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/python-uinput/${name}.tar.gz"; - sha256 = "033zqiypjz0nigav6vz0s57pbzikvds55mxphrdpkdbpdikjnfcr"; - }; - - buildInputs = [ pkgs.udev ]; - - NIX_CFLAGS_LINK = [ "-ludev" ]; - - meta = with stdenv.lib; { - description = "Pythonic API to Linux uinput kernel module"; - homepage = "http://tjjr.fi/sw/python-uinput/"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ abbradar ]; - }; - }; + python-uinput = callPackage ../development/python-modules/python-uinput {}; python-sybase = buildPythonPackage rec { name = "python-sybase-${version}";