summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-09-10 15:09:42 -0500
committerGitHub <noreply@github.com>2018-09-10 15:09:42 -0500
commit579e206bdb000f0828c2da0d90c5147b41c115fc (patch)
tree2cb4abc295412745a118508d4b9d2c9dd424a005
parent5cb824f4c4d23cb6a9177700e8e6ccaa2ff116fb (diff)
parentde61d0da203889a6ebd07085a406ac8d3e90ee30 (diff)
downloadnixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.tar
nixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.tar.gz
nixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.tar.bz2
nixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.tar.lz
nixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.tar.xz
nixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.tar.zst
nixpkgs-579e206bdb000f0828c2da0d90c5147b41c115fc.zip
Merge pull request #45323 from leenaars/ydiff
ydiff: init at 1.1
-rw-r--r--pkgs/development/tools/ydiff/default.nix45
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/tools/ydiff/default.nix b/pkgs/development/tools/ydiff/default.nix
new file mode 100644
index 00000000000..c2f72138db5
--- /dev/null
+++ b/pkgs/development/tools/ydiff/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, pythonPackages, python3Packages, less, patchutils, git
+, subversion, coreutils, which }:
+
+with pythonPackages;
+
+buildPythonApplication rec {
+  pname = "ydiff";
+  version = "1.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0mxcl17sx1d4vaw22ammnnn3y19mm7r6ljbarcjzi519klz26bnf";
+  };
+
+  patchPhase = ''
+    substituteInPlace tests/test_ydiff.py \
+      --replace /bin/rm ${coreutils}/bin/rm \
+      --replace /bin/sh ${stdenv.shell}
+    substituteInPlace Makefile \
+      --replace "pep8 --ignore" "# pep8 --ignore" \
+      --replace "python3 \`which coverage\`" "${python3Packages.coverage}/bin/coverage3" \
+      --replace /bin/sh ${stdenv.shell} \
+      --replace tests/regression.sh "${stdenv.shell} tests/regression.sh"
+    patchShebangs tests/*.sh
+  '';
+
+  buildInputs = [ docutils pygments ];
+  propagatedBuildInputs = [ less patchutils ];
+  checkInputs = [ coverage coreutils git subversion which ];
+
+  checkTarget = if isPy3k then "test3" else "test";
+
+  meta = {
+    homepage = https://github.com/ymattw/ydiff;
+    description = "View colored, incremental diff in workspace or from stdin";
+    longDescription = ''
+      Term based tool to view colored, incremental diff in a version
+      controlled workspace (supports Git, Mercurial, Perforce and Svn
+      so far) or from stdin, with side by side (similar to diff -y)
+      and auto pager support.
+    '';
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e6d2b1ed3b0..f48704cc514 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -19604,6 +19604,8 @@ with pkgs;
 
   yate = callPackage ../applications/misc/yate { };
 
+  ydiff = callPackage ../development/tools/ydiff { };
+
   yed = callPackage ../applications/graphics/yed {};
 
   inherit (gnome3) yelp;