]> git.scottworley.com Git - git-cache/blob - default.nix
Start on 1.4.2
[git-cache] / default.nix
1 { pkgs ? import <nixpkgs> { }, lint ? false }:
2
3 let
4 # Remove this package definition after https://github.com/NixOS/nixpkgs/pull/93377 reaches stable
5 backoff-fallback = { lib, buildPythonPackage, fetchPypi }:
6 buildPythonPackage rec {
7 pname = "backoff";
8 version = "1.10.0";
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "190rdpfhpjvb6bjh99fhdkgfsfkjwky7nz7b0nn5ah67z8hs1yxq";
12 };
13 meta = with lib; {
14 description = "Function decoration for backoff and retry";
15 homepage = "https://github.com/litl/backoff";
16 license = licenses.mit;
17 maintainers = with maintainers; [ chkno ];
18 };
19 };
20
21 in pkgs.python3Packages.callPackage
22 ({ lib, buildPythonPackage, nix, git, backoff, autopep8, mypy, pylint, }:
23 buildPythonPackage rec {
24 pname = "git-cache";
25 version = "1.4.2-pre";
26 src = lib.cleanSource ./.;
27 propagatedBuildInputs = [ backoff ];
28 checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ];
29 doCheck = true;
30 checkPhase = "./test.sh";
31 }) {
32 backoff = pkgs.python3Packages.backoff or (pkgs.python3Packages.callPackage
33 backoff-fallback { });
34 }