From cbd65e79801170a0d3133900f6da5cb29cc76d87 Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Wed, 1 Nov 2017 05:49:01 -0400 Subject: [PATCH 1/3] pythonPackages.rply: move to python-modules/ --- lib/maintainers.nix | 2 +- .../python-modules/rply/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +---------------- 3 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/rply/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index dc2281401e04..797adae97b15 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -443,7 +443,7 @@ nicknovitski = "Nick Novitski "; nico202 = "Nicolò Balzarotti "; NikolaMandic = "Ratko Mladic "; - nixy = "Andrew R. M. "; + nixy = "Andrew R. M. "; nocoolnametom = "Tom Doggett "; notthemessiah = "Brian Cohen "; np = "Nicolas Pouillard "; diff --git a/pkgs/development/python-modules/rply/default.nix b/pkgs/development/python-modules/rply/default.nix new file mode 100644 index 000000000000..8dee7bcff2eb --- /dev/null +++ b/pkgs/development/python-modules/rply/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, buildPythonPackage, appdirs }: + +buildPythonPackage rec { + pname = "rply"; + name = "${pname}-${version}"; + version = "0.7.4"; + + src = fetchurl { + url = "mirror://pypi/r/rply/${name}.tar.gz"; + sha256 = "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"; + }; + + buildInputs = [ appdirs ]; + + meta = with stdenv.lib; { + description = "A python Lex/Yacc that works with RPython"; + homepage = https://github.com/alex/rply; + license = licenses.bsd3; + maintainers = with maintainers; [ nixy ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0be1ff17ee01..cbd573c2f680 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18308,24 +18308,7 @@ in { rpkg = callPackage ../development/python-modules/rpkg/default.nix {}; - rply = buildPythonPackage rec { - name = "rply-${version}"; - version = "0.7.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/rply/${name}.tar.gz"; - sha256 = "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"; - }; - - buildInputs = with self; [ appdirs ]; - - meta = with pkgs.stdenv.lib; { - description = "A python Lex/Yacc that works with RPython"; - homepage = https://github.com/alex/rply; - license = licenses.bsd3; - maintainers = with maintainers; [ nixy ]; - }; - }; + rply = callPackage ../development/python-modules/rply/default.nix {}; rpm = (pkgs.rpm.override{inherit python;}); From 6743ff237983e1ca6d57dc9689fcf15b70ba714c Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Wed, 1 Nov 2017 05:51:50 -0400 Subject: [PATCH 2/3] pythonPackages.rply: 0.7.4 -> 0.7.5 --- pkgs/development/python-modules/rply/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rply/default.nix b/pkgs/development/python-modules/rply/default.nix index 8dee7bcff2eb..91f802912143 100644 --- a/pkgs/development/python-modules/rply/default.nix +++ b/pkgs/development/python-modules/rply/default.nix @@ -3,11 +3,11 @@ buildPythonPackage rec { pname = "rply"; name = "${pname}-${version}"; - version = "0.7.4"; + version = "0.7.5"; src = fetchurl { url = "mirror://pypi/r/rply/${name}.tar.gz"; - sha256 = "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"; + sha256 = "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"; }; buildInputs = [ appdirs ]; From 09bdae2dd77257c659ebf0595562ea939d73b79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 1 Nov 2017 05:14:33 -0500 Subject: [PATCH 3/3] pythonPackages.rply: enable tests --- pkgs/development/python-modules/rply/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/rply/default.nix b/pkgs/development/python-modules/rply/default.nix index 91f802912143..912b3fd6ab06 100644 --- a/pkgs/development/python-modules/rply/default.nix +++ b/pkgs/development/python-modules/rply/default.nix @@ -1,17 +1,24 @@ -{ stdenv, fetchurl, buildPythonPackage, appdirs }: +{ stdenv, pytest, fetchFromGitHub, buildPythonPackage, appdirs }: buildPythonPackage rec { pname = "rply"; name = "${pname}-${version}"; version = "0.7.5"; - src = fetchurl { - url = "mirror://pypi/r/rply/${name}.tar.gz"; - sha256 = "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"; + src = fetchFromGitHub { + owner = "alex"; + repo = "rply"; + rev = "v${version}"; + sha256 = "0v05gdy5dval30wvz96lywvz2jyf000dp0pnrd1lwdx3cyywq659"; }; buildInputs = [ appdirs ]; + checkInputs = [ pytest ]; + checkPhase = '' + HOME=$(mktemp -d) py.test tests + ''; + meta = with stdenv.lib; { description = "A python Lex/Yacc that works with RPython"; homepage = https://github.com/alex/rply;