nixpkgs/pkgs/development/tools/ydiff/default.nix

46 lines
1.5 KiB
Nix
Raw Normal View History

2018-08-19 09:33:14 +02:00
{ stdenv, lib, pythonPackages, python3Packages, less, patchutils, git
, subversion, coreutils, which }:
with pythonPackages;
buildPythonApplication rec {
pname = "ydiff";
2020-08-31 14:15:05 +02:00
version = "1.2";
2018-08-19 09:33:14 +02:00
src = fetchPypi {
inherit pname version;
2020-08-31 14:15:05 +02:00
sha256 = "f5430577ecd30974d766ee9b8333e06dc76a947b4aae36d39612a0787865a121";
2018-08-19 09:33:14 +02:00
};
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";
2018-08-19 09:33:14 +02:00
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 ];
};
}