ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pygreat / default.nix
blob92526b465b17bb429dc4866e14375f44bab34751
1 { lib, buildPythonPackage, isPy3k, fetchFromGitHub, future, pyusb }:
3 buildPythonPackage {
4   pname = "pygreat";
5   version = "2019.5.1.dev0";
7   src = fetchFromGitHub {
8     owner = "greatscottgadgets";
9     repo = "libgreat";
10     rev = "14c00b7c8f036f4d467e4b1a324ffa3566b126fa";
11     sha256 = "1h0z83k1k4z8j36z936h61l8j3cjr3wsxr86k91v5c5h93g9dkqh";
12   };
14   propagatedBuildInputs = [ future pyusb ];
16   disabled = !isPy3k;
18   preBuild = ''
19     cd host
20     substituteInPlace setup.py --replace "'backports.functools_lru_cache'" ""
21     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"
22     echo "$version" > ../VERSION
23   '';
25   meta = with lib; {
26     description = "Python library for talking with libGreat devices";
27     homepage = "https://greatscottgadgets.com/greatfet/";
28     license = with licenses; [ bsd3 ];
29   };