summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-02-24 07:49:30 +0000
committerGitHub <noreply@github.com>2018-02-24 07:49:30 +0000
commit3002880b668298dcad2c9c649526508ed2f3f8c9 (patch)
tree95d8f0b9b14c9cec5aa7dad2ba84abcd8a47f13d /pkgs
parent30f171d3e28ba8c331a8eae941c86465b544746a (diff)
parentdd3e8c6c1784417ff2209db9342a2113ee23648a (diff)
downloadnixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.tar
nixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.tar.gz
nixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.tar.bz2
nixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.tar.lz
nixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.tar.xz
nixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.tar.zst
nixlib-3002880b668298dcad2c9c649526508ed2f3f8c9.zip
Merge pull request #35345 from dtzWill/update/grip-4.4.0
grip: 4.3.2 -> 4.4.0, patch to handle front matter
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/grip/default.nix51
-rw-r--r--pkgs/top-level/python-packages.nix27
2 files changed, 52 insertions, 26 deletions
diff --git a/pkgs/development/python-modules/grip/default.nix b/pkgs/development/python-modules/grip/default.nix
new file mode 100644
index 000000000000..c11bcaa5baa5
--- /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";
+    })
+  ];
+
+  checkInputs = [ 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 3a19a7acb03c..1b53c0f279f2 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4896,32 +4896,7 @@ in {
     };
   };
 
-  grip = buildPythonPackage rec {
-    version = "4.3.2";
-    name = "grip-${version}";
-
-    src = pkgs.fetchFromGitHub {
-      owner = "joeyespo";
-      repo = "grip";
-      rev = "v${version}";
-      sha256 = "05a169sfaj280k7gibbc1rznjn43l5m6l1gpl6a5cmp5r8827khs";
-    };
-    buildInputs = with self; [ pytest responses ];
-
-    propagatedBuildInputs = with self; [ docopt flask markdown path-and-address pygments requests ];
-
-    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;