at 22.05-pre 1.2 kB view raw
1{ lib, buildPythonPackage, fetchPypi, fetchpatch, substituteAll, python, nose, mercurial }: 2 3buildPythonPackage rec { 4 pname = "python-hglib"; 5 version = "2.6.1"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "7c1fa0cb4d332dd6ec8409b04787ceba4623e97fb378656f7cab0b996c6ca3b2"; 10 }; 11 12 patches = [ 13 (substituteAll { 14 src = ./hgpath.patch; 15 hg = "${mercurial}/bin/hg"; 16 }) 17 18 # These two patches are needed to fix the tests. 19 # They will need to be removed on the next update. 20 (fetchpatch { 21 url = "https://www.mercurial-scm.org/repo/python-hglib/raw-rev/12e6aaef0f6e"; 22 sha256 = "159pmhy23gqcc6rkh5jrni8fba4xbhxwcc0jf02wqr7f82kv8a7x"; 23 }) 24 (fetchpatch { 25 url = "https://www.mercurial-scm.org/repo/python-hglib/raw-rev/1a318162f06f"; 26 sha256 = "04lxfc15m3yw5kvp133xg8zv09l8kndi146xk3lnbbm07fgcnn1z"; 27 }) 28 ]; 29 30 checkInputs = [ nose ]; 31 32 checkPhase = '' 33 ${python.interpreter} test.py --with-hg "${mercurial}/bin/hg" -v 34 ''; 35 36 meta = with lib; { 37 description = "Mercurial Python library"; 38 homepage = "http://selenic.com/repo/python-hglib"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ dfoxfranke ]; 41 platforms = platforms.all; 42 }; 43}