Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 isPy3k, 5 fetchFromGitHub, 6 future, 7 pyusb, 8}: 9 10buildPythonPackage { 11 pname = "pygreat"; 12 version = "2019.5.1.dev0"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "greatscottgadgets"; 17 repo = "libgreat"; 18 rev = "14c00b7c8f036f4d467e4b1a324ffa3566b126fa"; 19 sha256 = "1h0z83k1k4z8j36z936h61l8j3cjr3wsxr86k91v5c5h93g9dkqh"; 20 }; 21 22 propagatedBuildInputs = [ 23 future 24 pyusb 25 ]; 26 27 disabled = !isPy3k; 28 29 preBuild = '' 30 cd host 31 substituteInPlace setup.py --replace "'backports.functools_lru_cache'" "" 32 substituteInPlace pygreat/comms.py --replace "from backports.functools_lru_cache import lru_cache as memoize_with_lru_cache" "from functools import lru_cache as memoize_with_lru_cache" 33 echo "$version" > ../VERSION 34 ''; 35 36 meta = with lib; { 37 description = "Python library for talking with libGreat devices"; 38 homepage = "https://greatscottgadgets.com/greatfet/"; 39 license = with licenses; [ bsd3 ]; 40 }; 41}