nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 65 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 python, 5 buildPythonPackage, 6 fetchFromGitHub, 7 setuptools, 8 pytestCheckHook, 9 pythonAtLeast, 10 writableTmpDirAsHomeHook, 11 pkgs, 12}: 13let 14 inherit (pkgs) bash git less; 15in 16 17buildPythonPackage rec { 18 pname = "icdiff"; 19 version = "2.0.9"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "jeffkaufman"; 24 repo = "icdiff"; 25 tag = "release-${version}"; 26 hash = "sha256-SbgUBWaNT8akYKXYef/94vqZqJannZv+TxfbCnHKQtw="; 27 }; 28 29 patches = [ ./0001-Don-t-test-black-or-flake8.patch ]; 30 31 build-system = [ setuptools ]; 32 33 pythonImportsCheck = [ "icdiff" ]; 34 35 nativeCheckInputs = [ 36 bash 37 git 38 less 39 writableTmpDirAsHomeHook 40 ]; 41 42 # Before the wheel gets created, fix up the shebangs. 43 preBuild = '' 44 patchShebangs test.sh icdiff git-icdiff 45 ''; 46 47 # Odd behavior in the sandbox 48 doCheck = !stdenv.hostPlatform.isDarwin; 49 50 checkPhase = '' 51 runHook preCheck 52 53 ./test.sh ${python.interpreter} 54 55 runHook postCheck 56 ''; 57 58 meta = { 59 description = "Improved colorized diff"; 60 homepage = "https://github.com/jeffkaufman/icdiff"; 61 changelog = "https://github.com/jeffkaufman/icdiff/releases/tag/release-${version}/CHANGELOG.md"; 62 license = lib.licenses.psfl; 63 maintainers = with lib.maintainers; [ philiptaron ]; 64 }; 65}