summary refs log tree commit diff
path: root/pkgs/development/python-modules/grip
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-02-22 17:13:26 -0600
committerWill Dietz <w@wdtz.org>2018-02-23 01:28:30 -0600
commit4d2a0cb605a9fcbdaa516e71274bfce1da5e650b (patch)
tree9eacea37682f5c0346e7a546b08f3b341a87c354 /pkgs/development/python-modules/grip
parent630574ebb1849bf09b641f8cc23f999eb23cb55e (diff)
downloadnixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.tar
nixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.tar.gz
nixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.tar.bz2
nixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.tar.lz
nixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.tar.xz
nixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.tar.zst
nixpkgs-4d2a0cb605a9fcbdaa516e71274bfce1da5e650b.zip
grip: move to separate file, pname
(review feedback, thanks!)
Diffstat (limited to 'pkgs/development/python-modules/grip')
-rw-r--r--pkgs/development/python-modules/grip/default.nix51
1 files changed, 51 insertions, 0 deletions
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 ];
+  };
+}