From c3e076b2f2c09dd4247b60817eb0ef954f092f23 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 22 Feb 2018 09:54:28 -0600 Subject: [PATCH 1/4] pythonPackages: grip 4.3.2 -> 4.4.0 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c2317ffa0e..f4a86bc8213 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4895,14 +4895,14 @@ in { }; grip = buildPythonPackage rec { - version = "4.3.2"; + version = "4.4.0"; name = "grip-${version}"; src = pkgs.fetchFromGitHub { owner = "joeyespo"; repo = "grip"; rev = "v${version}"; - sha256 = "05a169sfaj280k7gibbc1rznjn43l5m6l1gpl6a5cmp5r8827khs"; + sha256 = "1768n3w40qg1njkzqjyl5gkva0h31k8h250821v69imj1zimymag"; }; buildInputs = with self; [ pytest responses ]; From 630574ebb1849bf09b641f8cc23f999eb23cb55e Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 22 Feb 2018 09:57:39 -0600 Subject: [PATCH 2/4] grip: Add patch to render the 'front matter' like github does --- pkgs/top-level/python-packages.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f4a86bc8213..5b4c9c6f1ba 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4904,9 +4904,18 @@ in { rev = "v${version}"; sha256 = "1768n3w40qg1njkzqjyl5gkva0h31k8h250821v69imj1zimymag"; }; + + patches = [ + # Render "front matter", used in our RFC template and elsewhere + (pkgs.fetchpatch { + url = https://github.com/joeyespo/grip/pull/249.patch; + sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg"; + }) + ]; + buildInputs = with self; [ pytest responses ]; - propagatedBuildInputs = with self; [ docopt flask markdown path-and-address pygments requests ]; + propagatedBuildInputs = with self; [ docopt flask markdown path-and-address pygments requests tabulate ]; checkPhase = '' export PATH="$PATH:$out/bin" From 4d2a0cb605a9fcbdaa516e71274bfce1da5e650b Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 22 Feb 2018 17:13:26 -0600 Subject: [PATCH 3/4] grip: move to separate file, pname (review feedback, thanks!) --- .../python-modules/grip/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 36 +------------ 2 files changed, 52 insertions(+), 35 deletions(-) create mode 100644 pkgs/development/python-modules/grip/default.nix diff --git a/pkgs/development/python-modules/grip/default.nix b/pkgs/development/python-modules/grip/default.nix new file mode 100644 index 00000000000..d163b0bd5dc --- /dev/null +++ b/pkgs/development/python-modules/grip/default.nix @@ -0,0 +1,51 @@ +{ stdenv +, fetchFromGitHub +, fetchpatch +# Python bits: +, buildPythonPackage +, pytest +, responses +, docopt +, flask +, markdown +, path-and-address +, pygments +, requests +, tabulate +}: + +buildPythonPackage rec { + pname = "grip"; + version = "4.4.0"; + + src = fetchFromGitHub { + owner = "joeyespo"; + repo = "grip"; + rev = "v${version}"; + sha256 = "1768n3w40qg1njkzqjyl5gkva0h31k8h250821v69imj1zimymag"; + }; + + patches = [ + # Render "front matter", used in our RFC template and elsewhere + (fetchpatch { + url = https://github.com/joeyespo/grip/pull/249.patch; + sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg"; + }) + ]; + + buildInputs = [ pytest responses ]; + + propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ]; + + checkPhase = '' + export PATH="$PATH:$out/bin" + py.test -xm "not assumption" + ''; + + meta = with stdenv.lib; { + description = "Preview GitHub Markdown files like Readme locally before committing them"; + homepage = https://github.com/joeyespo/grip; + license = licenses.mit; + maintainers = with maintainers; [ koral ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b4c9c6f1ba..6197ed87d38 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4894,41 +4894,7 @@ in { }; }; - grip = buildPythonPackage rec { - version = "4.4.0"; - name = "grip-${version}"; - - src = pkgs.fetchFromGitHub { - owner = "joeyespo"; - repo = "grip"; - rev = "v${version}"; - sha256 = "1768n3w40qg1njkzqjyl5gkva0h31k8h250821v69imj1zimymag"; - }; - - patches = [ - # Render "front matter", used in our RFC template and elsewhere - (pkgs.fetchpatch { - url = https://github.com/joeyespo/grip/pull/249.patch; - sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg"; - }) - ]; - - buildInputs = with self; [ pytest responses ]; - - propagatedBuildInputs = with self; [ docopt flask markdown path-and-address pygments requests tabulate ]; - - checkPhase = '' - export PATH="$PATH:$out/bin" - py.test -xm "not assumption" - ''; - - meta = with stdenv.lib; { - description = "Preview GitHub Markdown files like Readme locally before committing them"; - homepage = https://github.com/joeyespo/grip; - license = licenses.mit; - maintainers = with maintainers; [ koral ]; - }; - }; + grip = callPackage ../development/python-modules/grip { }; gst-python = callPackage ../development/python-modules/gst-python { gst-plugins-base = pkgs.gst_all_1.gst-plugins-base; From dd3e8c6c1784417ff2209db9342a2113ee23648a Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 23 Feb 2018 01:38:04 -0600 Subject: [PATCH 4/4] grip: buildInputs -> checkInputs --- pkgs/development/python-modules/grip/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/grip/default.nix b/pkgs/development/python-modules/grip/default.nix index d163b0bd5dc..c11bcaa5baa 100644 --- a/pkgs/development/python-modules/grip/default.nix +++ b/pkgs/development/python-modules/grip/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { }) ]; - buildInputs = [ pytest responses ]; + checkInputs = [ pytest responses ]; propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ];