From 43acfe0f49f9905a5b4d2ed725d00b1c97763ceb Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 18:16:17 +0700 Subject: [PATCH 01/14] pythonPackages.tempora : move to separate expression --- .../python-modules/tempora/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 +--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/python-modules/tempora/default.nix diff --git a/pkgs/development/python-modules/tempora/default.nix b/pkgs/development/python-modules/tempora/default.nix new file mode 100644 index 000000000000..69006a319055 --- /dev/null +++ b/pkgs/development/python-modules/tempora/default.nix @@ -0,0 +1,19 @@ +{ stdenv, buildPythonPackage, fetchPypi +, setuptools_scm, six }: + +buildPythonPackage rec { + version = "1.4"; + pname = "tempora"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0ysvns22i5hzhl5ln4n86bq10j8xwvd09z8qw1zjr3s0fj3lynza"; + }; + + doCheck = false; + + buildInputs = [ setuptools_scm ]; + + propagatedBuildInputs = [ six ]; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b93049bca17e..82362e754605 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -28183,9 +28183,7 @@ EOF propagatedBuildInputs = with self; [ websocket_client requests ]; }; - tempora = buildPythonPackage rec { - name = "tempora-${version}"; - version = "1.4"; + tempora= callPackage ../development/python-modules/tempora { }; src = pkgs.fetchurl { url = "mirror://pypi/t/tempora/${name}.tar.gz"; From 6ba7b4c672260d2543b45d243ef6177a672c9643 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 18:19:12 +0700 Subject: [PATCH 02/14] pythonPackages.hypchat : move to separate expression --- .../python-modules/hypchat/default.nix | 15 ++++++++++++ pkgs/top-level/python-packages.nix | 24 +------------------ 2 files changed, 16 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/hypchat/default.nix diff --git a/pkgs/development/python-modules/hypchat/default.nix b/pkgs/development/python-modules/hypchat/default.nix new file mode 100644 index 000000000000..6574de1be63f --- /dev/null +++ b/pkgs/development/python-modules/hypchat/default.nix @@ -0,0 +1,15 @@ +{ stdenv, buildPythonPackage, fetchPypi +, requests, six, dateutil }: + +buildPythonPackage rec { + pname = "hypchat"; + version = "0.21"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1sd8f3gihagaqd848dqy6xw457fa4f9bla1bfyni7fq3h76sjdzg"; + }; + + propagatedBuildInputs = [ requests six dateutil ]; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 82362e754605..fa1fff79ce41 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -28185,29 +28185,7 @@ EOF tempora= callPackage ../development/python-modules/tempora { }; - src = pkgs.fetchurl { - url = "mirror://pypi/t/tempora/${name}.tar.gz"; - sha256 = "0ysvns22i5hzhl5ln4n86bq10j8xwvd09z8qw1zjr3s0fj3lynza"; - }; - - doCheck = false; - - buildInputs = with self; [ setuptools_scm ]; - - propagatedBuildInputs = with self; [ six ]; - }; - - hypchat = buildPythonPackage rec { - name = "hypchat-${version}"; - version = "0.21"; - - src = pkgs.fetchurl { - url = "mirror://pypi/h/hypchat/${name}.tar.gz"; - sha256 = "1sd8f3gihagaqd848dqy6xw457fa4f9bla1bfyni7fq3h76sjdzg"; - }; - - propagatedBuildInputs = with self; [ requests six dateutil ]; - }; + hypchat = callPackage ../development/python-modules/hypchat { }; pivy = buildPythonPackage rec { version = "20101207"; From c0433265bbca6db732aa1e5aec00c16ee7b292b8 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 18:21:45 +0700 Subject: [PATCH 03/14] pythonPackages.smugpy : move to separate expression --- .../python-modules/smugpy/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 17 +------------- 2 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/smugpy/default.nix diff --git a/pkgs/development/python-modules/smugpy/default.nix b/pkgs/development/python-modules/smugpy/default.nix new file mode 100644 index 000000000000..5eb8d77a244d --- /dev/null +++ b/pkgs/development/python-modules/smugpy/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub }: + +buildPythonPackage rec { + name = pname + "-" + version; + pname = "smugpy"; + version = "20131218"; + + src = fetchFromGitHub { + owner = "chrishoffman"; + repo = pname; + rev = "f698d6749ce446e3d6c7d925b2cd1cd5b3d695ea"; + sha256 = "029x6hm1744iznv4sw8sfyl974wmx1sqnr1k5dvzzwpk3ja49a1y"; + }; + + meta = with stdenv.lib; { + description = "Python library for the SmugMug API"; + license = with licenses; [ mit ]; + homepage = https://github.com/chrishoffman/smugpy; + }; + + doCheck = false; # Tries to login to Smugmug… +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fa1fff79ce41..df3c33442d51 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -28199,22 +28199,7 @@ EOF buildInputs = with self; [ pkgs.swig1 pkgs.coin3d pkgs.soqt pkgs.mesa pkgs.xorg.libXi ]; }; - smugpy = buildPythonPackage rec { - name = pname + "-" + version; - pname = "smugpy"; - version = "20131218"; - - src = pkgs.fetchFromGitHub { - owner = "chrishoffman"; - repo = pname; - rev = "f698d6749ce446e3d6c7d925b2cd1cd5b3d695ea"; - sha256 = "029x6hm1744iznv4sw8sfyl974wmx1sqnr1k5dvzzwpk3ja49a1y"; - }; - - doCheck = false; # Tries to login to Smugmug… - - propagatedBuildInputs = with self; [ ]; - }; + smugpy = callPackage ../development/python-modules/smugpy { }; smugline = stdenv.mkDerivation rec { name = pname + "-" + version; From 31b7f8701a0c31d4f66508fed1ce1ea475e38dcd Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 18:31:04 +0700 Subject: [PATCH 04/14] pythonPackages.ramlfications : move to separate expression --- .../python-modules/ramlfications/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +--------------- 2 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/ramlfications/default.nix diff --git a/pkgs/development/python-modules/ramlfications/default.nix b/pkgs/development/python-modules/ramlfications/default.nix new file mode 100644 index 000000000000..1042b8de98ed --- /dev/null +++ b/pkgs/development/python-modules/ramlfications/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonPackage, fetchPypi +, mock, pytest, pytest-mock, pytest-server-fixtures, pytest-localserver +, termcolor, click, markdown2, six, jsonref, pyyaml, xmltodict, attrs +}: + +buildPythonPackage rec { + pname = "ramlfications"; + version = "0.1.9"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0xvnna7kaq4nm5nfnwcwbr5bcm2s532hgyp7kq4v9iivn48rrf3v"; + }; + + meta = with stdenv.lib; { + description = "A Python RAML parser."; + homepage = "https://ramlfications.readthedocs.org"; + license = licenses.asl20; + maintainers = with maintainers; [ nand0p ]; + platforms = platforms.all; + }; + + doCheck = false; + # [darwin] AssertionError: Expected 'update_mime_types' to have been called once. Called 0 times. + + buildInputs = [ mock pytest pytest-mock pytest-server-fixtures pytest-localserver ]; + + propagatedBuildInputs = [ termcolor click markdown2 six jsonref pyyaml xmltodict attrs ]; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index df3c33442d51..cc391405ee24 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -28229,31 +28229,7 @@ EOF txaio = callPackage ../development/python-modules/txaio { }; - ramlfications = buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "ramlfications"; - version = "0.1.9"; - - meta = { - description = "A Python RAML parser."; - homepage = "https://ramlfications.readthedocs.org"; - license = licenses.asl20; - maintainers = with maintainers; [ nand0p ]; - platforms = platforms.all; - }; - - doCheck = false; - # [darwin] AssertionError: Expected 'update_mime_types' to have been called once. Called 0 times. - - buildInputs = with self; [ mock pytest pytest-mock pytest-server-fixtures pytest-localserver ]; - - propagatedBuildInputs = with self; [ termcolor click markdown2 six jsonref pyyaml xmltodict attrs ]; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/${pname}/${name}.tar.gz"; - sha256 = "0xvnna7kaq4nm5nfnwcwbr5bcm2s532hgyp7kq4v9iivn48rrf3v"; - }; - }; + ramlfications = callPackage ../development/python-modules/ramlfications { }; yapf = callPackage ../development/python-modules/yapf { }; From fcba0a1cb7ff15de11f493fa9fe75eff1be9d854 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 18:31:19 +0700 Subject: [PATCH 05/14] pythonPackages.ROPGadget : move to separate expression --- .../python-modules/ROPGadget/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 15 +------------ 2 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 pkgs/development/python-modules/ROPGadget/default.nix diff --git a/pkgs/development/python-modules/ROPGadget/default.nix b/pkgs/development/python-modules/ROPGadget/default.nix new file mode 100644 index 000000000000..41b92683b07a --- /dev/null +++ b/pkgs/development/python-modules/ROPGadget/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchPypi +, capstone}: + +buildPythonPackage rec { + pname = "ROPGadget"; + version = "5.4"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "19wly4x3mq73c91pplqjk0c7sx6710887czh514qk5l7j0ky6dxg"; + }; + + propagatedBuildInputs = [ capstone ]; + + meta = with stdenv.lib; { + description = "Tool to search for gadgets in binaries to facilitate ROP exploitation"; + homepage = "http://shell-storm.org/project/ROPgadget/"; + license = licenses.bsd3; + maintainers = with maintainers; [ bennofs ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cc391405ee24..296de16d3c38 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -28278,20 +28278,7 @@ EOF }; }; - ROPGadget = buildPythonPackage rec { - name = "ROPGadget-5.4"; - src = pkgs.fetchurl { - url = "mirror://pypi/R/ROPGadget/${name}.tar.gz"; - sha256 = "19wly4x3mq73c91pplqjk0c7sx6710887czh514qk5l7j0ky6dxg"; - }; - propagatedBuildInputs = with self; [ capstone ]; - meta = with pkgs.stdenv.lib; { - description = "Tool to search for gadgets in binaries to facilitate ROP exploitation"; - homepage = "http://shell-storm.org/project/ROPgadget/"; - license = licenses.bsd3; - maintainers = with maintainers; [ bennofs ]; - }; - }; + ROPGadget = callPackage ../development/python-modules/ROPGadget { }; # We need "normal" libxml2 and not the python package by the same name. pywbem = callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; }; From 64fb8817578dac0c52dff0a52b03afd02dcd568d Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:00:31 +0700 Subject: [PATCH 06/14] pythonPackages.pyfeed : move to separate expression --- .../python-modules/pyfeed/default.nix | 23 ++++++++++ pkgs/top-level/python-packages.nix | 42 +------------------ 2 files changed, 24 insertions(+), 41 deletions(-) create mode 100644 pkgs/development/python-modules/pyfeed/default.nix diff --git a/pkgs/development/python-modules/pyfeed/default.nix b/pkgs/development/python-modules/pyfeed/default.nix new file mode 100644 index 000000000000..a1591037fb5a --- /dev/null +++ b/pkgs/development/python-modules/pyfeed/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchurl +, xe }: + +buildPythonPackage rec { + url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz"; + + name = stdenv.lib.nameFromURL url ".tar"; + + src = fetchurl { + inherit url; + sha256 = "1h4msq573m7wm46h3cqlx4rsn99f0l11rhdqgf50lv17j8a8vvy1"; + }; + + propagatedBuildInputs = [ xe ]; + + # error: invalid command 'test' + doCheck = false; + + meta = with stdenv.lib; { + homepage = "http://home.blarg.net/~steveha/pyfeed.html"; + description = "Tools for syndication feeds"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 296de16d3c38..71af3719575a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17776,47 +17776,7 @@ in { }; }; - pyfeed = buildPythonPackage rec { - url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz"; - name = stdenv.lib.nameFromURL url ".tar"; - src = pkgs.fetchurl { - inherit url; - sha256 = "1h4msq573m7wm46h3cqlx4rsn99f0l11rhdqgf50lv17j8a8vvy1"; - }; - propagatedBuildInputs = with self; [xe]; - - # error: invalid command 'test' - doCheck = false; - - meta = { - homepage = "http://home.blarg.net/~steveha/pyfeed.html"; - description = "Tools for syndication feeds"; - }; - }; - - pyfftw = buildPythonPackage rec { - name = "pyfftw-${version}"; - version = "0.10.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyFFTW/pyFFTW-${version}.tar.gz"; - sha256 = "739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a"; - }; - - buildInputs = [ pkgs.fftw pkgs.fftwFloat pkgs.fftwLongDouble]; - - propagatedBuildInputs = with self; [ numpy scipy ]; - - # Tests cannot import pyfftw. pyfftw works fine though. - doCheck = false; - - preConfigure = '' - export LDFLAGS="-L${pkgs.fftw.out}/lib -L${pkgs.fftwFloat.out}/lib -L${pkgs.fftwLongDouble.out}/lib" - export CFLAGS="-I${pkgs.fftw.dev}/include -I${pkgs.fftwFloat.dev}/include -I${pkgs.fftwLongDouble.dev}/include" - ''; - #+ optionalString isDarwin '' - # export DYLD_LIBRARY_PATH="${pkgs.fftw.out}/lib" - #''; + pyfeed = callPackage ../development/python-modules/pyfeed { }; meta = { description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; From 4f43682759f6a4741c4ff6f175f8c9f9c5ea62cc Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:01:10 +0700 Subject: [PATCH 07/14] pythonPackages.pyfftw : move to separate expression --- .../python-modules/pyfftw/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +--------- 2 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/pyfftw/default.nix diff --git a/pkgs/development/python-modules/pyfftw/default.nix b/pkgs/development/python-modules/pyfftw/default.nix new file mode 100644 index 000000000000..973a2e84ffa7 --- /dev/null +++ b/pkgs/development/python-modules/pyfftw/default.nix @@ -0,0 +1,35 @@ +{ stdenv, buildPythonPackage, fetchPypi +, fftw, fftwFloat, fftwLongDouble, numpy, scipy }: + +buildPythonPackage rec { + version = "0.10.4"; + pname = "pyFFTW"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a"; + }; + + buildInputs = [ fftw fftwFloat fftwLongDouble]; + + propagatedBuildInputs = [ numpy scipy ]; + + # Tests cannot import pyfftw. pyfftw works fine though. + doCheck = false; + + preConfigure = '' + export LDFLAGS="-L${fftw.out}/lib -L${fftwFloat.out}/lib -L${fftwLongDouble.out}/lib" + export CFLAGS="-I${fftw.dev}/include -I${fftwFloat.dev}/include -I${fftwLongDouble.dev}/include" + ''; + #+ optionalString isDarwin '' + # export DYLD_LIBRARY_PATH="${pkgs.fftw.out}/lib" + #''; + + meta = with stdenv.lib; { + description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; + homepage = http://hgomersall.github.com/pyFFTW/; + license = with licenses; [ bsd2 bsd3 ]; + maintainers = with maintainers; [ fridh ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 71af3719575a..b6c920d36113 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17778,24 +17778,7 @@ in { pyfeed = callPackage ../development/python-modules/pyfeed { }; - meta = { - description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; - homepage = http://hgomersall.github.com/pyFFTW/; - license = with licenses; [ bsd2 bsd3 ]; - maintainers = with maintainers; [ fridh ]; - }; - }; - - pyfiglet = buildPythonPackage rec { - name = "pyfiglet-${version}"; - version = "0.7.5"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyfiglet/${name}.tar.gz"; - sha256 = "04jy4182hn5xfs6jf432gxclfj1rhssd7bsf0b4gymrjzkhr8qa4"; - }; - - doCheck = false; + pyfftw = callPackage ../development/python-modules/pyfftw { }; meta = { description = "FIGlet in pure Python"; From 2d7733b6c2a74d6ed898c19784cc23d849bddaa4 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:01:26 +0700 Subject: [PATCH 08/14] pythonPackages.pyfiglet : move to separate expression --- .../python-modules/pyfiglet/default.nix | 20 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 7 +------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/python-modules/pyfiglet/default.nix diff --git a/pkgs/development/python-modules/pyfiglet/default.nix b/pkgs/development/python-modules/pyfiglet/default.nix new file mode 100644 index 000000000000..9308a7467366 --- /dev/null +++ b/pkgs/development/python-modules/pyfiglet/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + version = "0.7.5"; + pname = "pyfiglet"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "04jy4182hn5xfs6jf432gxclfj1rhssd7bsf0b4gymrjzkhr8qa4"; + }; + + doCheck = false; + + meta = with stdenv.lib; { + description = "FIGlet in pure Python"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b6c920d36113..76ddbbd349a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17780,12 +17780,7 @@ in { pyfftw = callPackage ../development/python-modules/pyfftw { }; - meta = { - description = "FIGlet in pure Python"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ thoughtpolice ]; - }; - }; + pyfiglet = callPackage ../development/python-modules/pyfiglet { }; pyflakes = callPackage ../development/python-modules/pyflakes { }; From d94d826433e53dbf892217313e6084cf9ea3405f Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:01:39 +0700 Subject: [PATCH 09/14] pythonPackages.pyftgl : move to separate expression --- .../python-modules/pyftgl/default.nix | 20 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 3 +-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/python-modules/pyftgl/default.nix diff --git a/pkgs/development/python-modules/pyftgl/default.nix b/pkgs/development/python-modules/pyftgl/default.nix new file mode 100644 index 000000000000..51de5e8fad5c --- /dev/null +++ b/pkgs/development/python-modules/pyftgl/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, boost, freetype, ftgl, mesa }: + +buildPythonPackage rec { + name = "pyftgl-0.4b"; + + src = fetchFromGitHub { + owner = "umlaeute"; + repo = "pyftgl"; + rev = "0.4b"; + sha256 = "12zcjv4cwwjihiaf74kslrdmmk4bs47h7006gyqfwdfchfjdgg4r"; + }; + + buildInputs = [ boost freetype ftgl mesa ]; + + meta = with stdenv.lib; { + description = "Python bindings for FTGL (FreeType for OpenGL)"; + license = licenses.gpl2Plus; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 76ddbbd349a5..6c940f56f2af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17784,8 +17784,7 @@ in { pyflakes = callPackage ../development/python-modules/pyflakes { }; - pyftgl = buildPythonPackage rec { - name = "pyftgl-0.4b"; + pyftgl = callPackage ../development/python-modules/pyftgl { }; src = pkgs.fetchFromGitHub { owner = "umlaeute"; From 282216c635a4da125cac615b17f4812a6e4a2533 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:01:56 +0700 Subject: [PATCH 10/14] pythonPackages.pygeoip : move to separate expression --- .../python-modules/pygeoip/default.nix | 24 +++++++++++++ pkgs/top-level/python-packages.nix | 35 +------------------ 2 files changed, 25 insertions(+), 34 deletions(-) create mode 100644 pkgs/development/python-modules/pygeoip/default.nix diff --git a/pkgs/development/python-modules/pygeoip/default.nix b/pkgs/development/python-modules/pygeoip/default.nix new file mode 100644 index 000000000000..a0a92ffc287e --- /dev/null +++ b/pkgs/development/python-modules/pygeoip/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi +, nose }: + +buildPythonPackage rec { + pname = "pygeoip"; + version = "0.3.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "f22c4e00ddf1213e0fae36dc60b46ee7c25a6339941ec1a975539014c1f9a96d"; + }; + + # requires geoip samples + doCheck = false; + + buildInputs = [ nose ]; + + meta = with stdenv.lib; { + description = "Pure Python GeoIP API"; + homepage = https://github.com/appliedsec/pygeoip; + license = licenses.lgpl3Plus; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6c940f56f2af..9db0ff7da8d5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17786,40 +17786,7 @@ in { pyftgl = callPackage ../development/python-modules/pyftgl { }; - src = pkgs.fetchFromGitHub { - owner = "umlaeute"; - repo = "pyftgl"; - rev = "0.4b"; - sha256 = "12zcjv4cwwjihiaf74kslrdmmk4bs47h7006gyqfwdfchfjdgg4r"; - }; - - buildInputs = with self; [ boost pkgs.freetype pkgs.ftgl pkgs.mesa ]; - - meta = { - description = "Python bindings for FTGL (FreeType for OpenGL)"; - license = licenses.gpl2Plus; - }; - }; - - pygeoip = buildPythonPackage rec { - name = "pygeoip-0.3.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pygeoip/pygeoip-0.3.2.tar.gz"; - sha256 = "f22c4e00ddf1213e0fae36dc60b46ee7c25a6339941ec1a975539014c1f9a96d"; - }; - - # requires geoip samples - doCheck = false; - - buildInputs = with self; [ nose ]; - - meta = { - description = "Pure Python GeoIP API"; - homepage = https://github.com/appliedsec/pygeoip; - license = licenses.lgpl3Plus; - }; - }; + pygeoip = callPackage ../development/python-modules/pygeoip {}; PyGithub = callPackage ../development/python-modules/pyGithub {}; From ac35d9884bed0e39d6206a982b6e13e50b0484f4 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:02:11 +0700 Subject: [PATCH 11/14] pythonPackages.pyglet : move to separate expression --- .../python-modules/pyglet/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +---------------- 2 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/pyglet/default.nix diff --git a/pkgs/development/python-modules/pyglet/default.nix b/pkgs/development/python-modules/pyglet/default.nix new file mode 100644 index 000000000000..8d5dd53f80ac --- /dev/null +++ b/pkgs/development/python-modules/pyglet/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchPypi +, mesa, xorg, freetype, fontconfig}: + +buildPythonPackage rec { + version = "1.2.4"; + pname = "pyglet"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "9f62ffbbcf2b202d084bf158685e77d28b8f4f5f2738f4c5e63a947a07503445"; + }; + + patchPhase = let + libs = [ mesa xorg.libX11 freetype fontconfig ]; + paths = builtins.concatStringsSep "," (map (l: "\"${l}/lib\"") libs); + in "sed -i -e 's|directories\.extend.*lib[^]]*|&,${paths}|' pyglet/lib.py"; + + doCheck = false; + + meta = with stdenv.lib; { + homepage = "http://www.pyglet.org/"; + description = "A cross-platform windowing and multimedia library"; + license = licenses.bsd3; + platforms = platforms.mesaPlatforms; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9db0ff7da8d5..c0748876922e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17790,29 +17790,7 @@ in { PyGithub = callPackage ../development/python-modules/pyGithub {}; - pyglet = buildPythonPackage rec { - name = "pyglet-${version}"; - version = "1.2.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyglet/pyglet-${version}.tar.gz"; - sha256 = "9f62ffbbcf2b202d084bf158685e77d28b8f4f5f2738f4c5e63a947a07503445"; - }; - - patchPhase = let - libs = [ pkgs.mesa pkgs.xorg.libX11 pkgs.freetype pkgs.fontconfig ]; - paths = concatStringsSep "," (map (l: "\"${l}/lib\"") libs); - in "sed -i -e 's|directories\.extend.*lib[^]]*|&,${paths}|' pyglet/lib.py"; - - doCheck = false; - - meta = { - homepage = "http://www.pyglet.org/"; - description = "A cross-platform windowing and multimedia library"; - license = licenses.bsd3; - platforms = platforms.mesaPlatforms; - }; - }; + pyglet = callPackage ../development/python-modules/pyglet {}; pygments = callPackage ../development/python-modules/Pygments { }; From 80ca1cae8b72767e2b27164e8c499e7ac894f36a Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:02:30 +0700 Subject: [PATCH 12/14] pythonPackages.pygpgme : move to separate expression --- .../python-modules/pygpgme/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 23 +--------------- 2 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/python-modules/pygpgme/default.nix diff --git a/pkgs/development/python-modules/pygpgme/default.nix b/pkgs/development/python-modules/pygpgme/default.nix new file mode 100644 index 000000000000..85bf262837f7 --- /dev/null +++ b/pkgs/development/python-modules/pygpgme/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPythonPackage, fetchurl, isPyPy +, gpgme }: + +buildPythonPackage rec { + version = "0.3"; + pname = "pygpgme"; + name = "${pname}-${version}"; + disabled = isPyPy; + + src = fetchurl { + url = "https://launchpad.net/pygpgme/trunk/${version}/+download/${name}.tar.gz"; + sha256 = "5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1"; + }; + + # error: invalid command 'test' + doCheck = false; + + propagatedBuildInputs = [ gpgme ]; + + meta = with stdenv.lib; { + homepage = "https://launchpad.net/pygpgme"; + description = "A Python wrapper for the GPGME library"; + license = licenses.lgpl21; + maintainers = with maintainers; [ garbas ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c0748876922e..bf9076850bef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17805,28 +17805,7 @@ in { }; }); - pygpgme = buildPythonPackage rec { - version = "0.3"; - name = "pygpgme-${version}"; - disabled = isPyPy; - - src = pkgs.fetchurl { - url = "https://launchpad.net/pygpgme/trunk/${version}/+download/${name}.tar.gz"; - sha256 = "5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1"; - }; - - # error: invalid command 'test' - doCheck = false; - - propagatedBuildInputs = with self; [ pkgs.gpgme ]; - - meta = { - homepage = "https://launchpad.net/pygpgme"; - description = "A Python wrapper for the GPGME library"; - license = licenses.lgpl21; - maintainers = with maintainers; [ garbas ]; - }; - }; + pygpgme = callPackage ../development/python-modules/pygpgme { }; pylint = callPackage ../development/python-modules/pylint { }; From b9eebaf8bbcc9d01beb04146ae5f8ab9069715d9 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:02:44 +0700 Subject: [PATCH 13/14] pythonPackages.pyrr : move to separate expression --- .../python-modules/pyrr/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 12 +--------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 pkgs/development/python-modules/pyrr/default.nix diff --git a/pkgs/development/python-modules/pyrr/default.nix b/pkgs/development/python-modules/pyrr/default.nix new file mode 100644 index 000000000000..fba7a0b27dd9 --- /dev/null +++ b/pkgs/development/python-modules/pyrr/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchPypi +, setuptools, multipledispatch, numpy }: + +buildPythonPackage rec { + version = "0.7.2"; + pname = "pyrr"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "04a65a9fb5c746b41209f55b21abf47a0ef80a4271159d670ca9579d9be3b4fa"; + }; + + buildInputs = [ setuptools ]; + propagatedBuildInputs = [ multipledispatch numpy ]; + + meta = with stdenv.lib; { + description = "3D mathematical functions using NumPy"; + homepage = https://github.com/adamlwgriffiths/Pyrr/; + license = licenses.bsd2; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bf9076850bef..e606bac98c65 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17817,17 +17817,7 @@ in { proj = null; }; - pyrr = buildPythonPackage rec { - name = "pyrr-${version}"; - version = "0.7.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyrr/pyrr-${version}.tar.gz"; - sha256 = "04a65a9fb5c746b41209f55b21abf47a0ef80a4271159d670ca9579d9be3b4fa"; - }; - - buildInputs = with self; [ setuptools ]; - propagatedBuildInputs = with self; [ multipledispatch numpy ]; + pyrr = callPackage ../development/python-modules/pyrr { }; meta = { description = "3D mathematical functions using NumPy"; From 489bfcfa0f80c3bac4877ef0a1fc13d0ca7b20e7 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Thu, 31 Aug 2017 21:03:02 +0700 Subject: [PATCH 14/14] pythonPackages.pyshp : move to separate expression --- .../python-modules/pyshp/default.nix | 21 ++++++++++++++++ pkgs/top-level/python-packages.nix | 25 +------------------ 2 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/pyshp/default.nix diff --git a/pkgs/development/python-modules/pyshp/default.nix b/pkgs/development/python-modules/pyshp/default.nix new file mode 100644 index 000000000000..4629331e52d5 --- /dev/null +++ b/pkgs/development/python-modules/pyshp/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi +, setuptools }: + +buildPythonPackage rec { + version = "1.2.3"; + pname = "pyshp"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "e18cc19659dadc5ddaa891eb780a6958094da0cf105a1efe0f67e75b4fa1cdf9"; + }; + + buildInputs = [ setuptools ]; + + meta = with stdenv.lib; { + description = "Pure Python read/write support for ESRI Shapefile format"; + homepage = https://github.com/GeospatialPython/pyshp; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e606bac98c65..9831d3021118 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17819,30 +17819,7 @@ in { pyrr = callPackage ../development/python-modules/pyrr { }; - meta = { - description = "3D mathematical functions using NumPy"; - homepage = https://github.com/adamlwgriffiths/Pyrr/; - license = licenses.bsd2; - }; - }; - - pyshp = buildPythonPackage rec { - name = "pyshp-${version}"; - version = "1.2.3"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyshp/pyshp-${version}.tar.gz"; - sha256 = "e18cc19659dadc5ddaa891eb780a6958094da0cf105a1efe0f67e75b4fa1cdf9"; - }; - - buildInputs = with self; [ setuptools ]; - - meta = { - description = "Pure Python read/write support for ESRI Shapefile format"; - homepage = https://github.com/GeospatialPython/pyshp; - license = licenses.mit; - }; - }; + pyshp = callPackage ../development/python-modules/pyshp { }; pyspread = callPackage ../development/python-modules/pyspread { };