Files
nixpkgs/pkgs/development/python-modules/icdiff/default.nix
T
R. Ryantm 7af1ac8b7c icdiff: 2.0.8-unstable-2025-11-11 -> release-2.0.9
- Fix newline handling regression
- Simplify terminal width detection using `shutil.get_terminal_size()`
- Fix buffer overflow with Python 3.14

Co-authored-by: Philip Taron <philip.taron@gmail.com>
2026-01-19 10:42:58 -08:00

67 lines
1.3 KiB
Nix

{
lib,
stdenv,
python,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
pythonAtLeast,
writableTmpDirAsHomeHook,
pkgs,
}:
let
inherit (pkgs) bash git less;
in
buildPythonPackage rec {
pname = "icdiff";
version = "2.0.9";
pyproject = true;
src = fetchFromGitHub {
owner = "jeffkaufman";
repo = "icdiff";
tag = "release-${version}";
hash = "sha256-ykQLF2b47RZSlrJXYpZ03evhpcGfVyTYwpO2UbmWqrY=";
deepClone = true;
};
patches = [ ./0001-Don-t-test-black-or-flake8.patch ];
build-system = [ setuptools ];
pythonImportsCheck = [ "icdiff" ];
nativeCheckInputs = [
bash
git
less
writableTmpDirAsHomeHook
];
# Before the wheel gets created, fix up the shebangs.
preBuild = ''
patchShebangs test.sh icdiff git-icdiff
'';
# Odd behavior in the sandbox
doCheck = !stdenv.hostPlatform.isDarwin;
checkPhase = ''
runHook preCheck
./test.sh ${python.interpreter}
runHook postCheck
'';
meta = {
description = "Improved colorized diff";
homepage = "https://github.com/jeffkaufman/icdiff";
changelog = "https://github.com/jeffkaufman/icdiff/releases/tag/release-${version}/CHANGELOG.md";
license = lib.licenses.psfl;
maintainers = with lib.maintainers; [ philiptaron ];
};
}