summary refs log tree commit diff
path: root/pkgs/applications/version-management
diff options
context:
space:
mode:
authorJaakko Luttinen <jaakko.luttinen@iki.fi>2017-05-07 17:54:36 +0300
committerJaakko Luttinen <jaakko.luttinen@iki.fi>2017-05-08 18:58:37 +0300
commit1745b7e949d563f01f9bb92ac872374ec7ca3a70 (patch)
tree97dd550abe89554e1c220c20d9c246ce263b0eb6 /pkgs/applications/version-management
parentf303480f1f8d9febc0d1bba16f28fa34580805d2 (diff)
downloadnixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.tar
nixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.tar.gz
nixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.tar.bz2
nixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.tar.lz
nixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.tar.xz
nixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.tar.zst
nixlib-1745b7e949d563f01f9bb92ac872374ec7ca3a70.zip
nbstripout: init at 0.3.0
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r--pkgs/applications/version-management/nbstripout/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/nbstripout/default.nix b/pkgs/applications/version-management/nbstripout/default.nix
new file mode 100644
index 000000000000..3029d17e1705
--- /dev/null
+++ b/pkgs/applications/version-management/nbstripout/default.nix
@@ -0,0 +1,32 @@
+{lib, python2Packages, git, mercurial}:
+
+with python2Packages;
+buildPythonApplication rec {
+  name = "${pname}-${version}";
+  version = "0.3.0";
+  pname = "nbstripout";
+
+  # Mercurial should be added as a build input but because it's a Python
+  # application, it would mess up the Python environment. Thus, don't add it
+  # here, instead add it to PATH when running unit tests
+  buildInputs = [ pytest pytest-flake8 pytest-cram git pytestrunner ];
+  propagatedBuildInputs = [ ipython nbformat ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "126xhjma4a0k7gq58hbqglhb3rai0a576azz7g8gmqjr3kl0264v";
+  };
+
+  # ignore flake8 tests for the nix wrapped setup.py
+  checkPhase = ''
+    PATH=$PATH:$out/bin:${mercurial}/bin pytest --ignore=nix_run_setup.py .
+  '';
+
+  meta = {
+    inherit version;
+    description = "Strip output from Jupyter and IPython notebooks";
+    homepage = https://github.com/kynan/nbstripout;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ jluttine ];
+  };
+}